{"_id":"@material/mwc-textarea","_rev":"713-4ebaccd87dca61e0bbf9e267de4c816d","name":"@material/mwc-textarea","dist-tags":{"latest":"0.27.0","canary":"0.26.0-canary.0af8ade5.0"},"versions":{"0.7.0":{"name":"@material/mwc-textarea","version":"0.7.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.7.0","@material/mwc-textfield":"^0.7.0","@material/textfield":"^3.0.0"},"publishConfig":{"access":"public"},"gitHead":"c8c5d01ad2103af63e3d7656b5d1acc5ccaa05db","_id":"@material/mwc-textarea@0.7.0","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.14.1/node@v10.11.0+x64 (linux)","dist":{"integrity":"sha512-X2U0Lq+nx14p6u7f6GiYdBmKxiiNxxPKp6CHs6NF47taK4VV2RniuRTl1lgtOIYoBiNztvu5chIsdiQa48c4Kg==","shasum":"8b6bfa30b15c12226ecefd49e3d0ed287eb4fec6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.7.0.tgz","fileCount":16,"unpackedSize":195708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZZ9uCRA9TVsSAnZWagAAV6oP/jCdD2md+rz8lUDyDQLM\nT+7DJ2X1XBR6Dc9VldXmInpZKg+if9YzuhP7Izh6jjF2HER5nU2wrN/NQcdF\ncvS+LjF0V0c1yKg39taCh00fNl4uacum/G3ybXVyfFa7LAN1xBCiGFq5NJqH\nYTBvJhJGw+tQpJrwZOqWTgZ3Zbmq4a9NL8mGCU6W/9cFkRN3EWNbWAAmjDoY\n9y3RxBESjye4ElNP5TbF5c2FTpAuolSVRS4L+xOqWynytWPIFJWSj3NQtx3R\nkZwt7kVMCwLai2o+Sx6InYCdXshv7Kvaecoj2W+hqcGlXicDKeMQqJ1n8l7j\nl8s7RqPnrjY7kTxltSI4bru9591EnkQxsU5VqIvEuq/L1vUWYuIDmizoOkDk\nxdeLSmrf8PH2hLMtn1W49viFnh4HJrtJdpyfxYix51snblKgqFtHz5QGDN5X\nn3ibR7hLvSwcMAr5uMGm6GS5Y9wqUP5yjslqpBWTdIVlWR9gJ4h7R9jJKe66\nWFivnEwMpAOQI8wgMSN1Z54FR8g1UsOknkkOoC2Hf4aT9K/Uj8aIzeNgONZh\nmZVOYfOj4B5oj4PJuH5bwLcdWHfEZsMuRaUix9T7BQ6H0GfoQf6Q7YYDE19z\nH5BgioaPv5zPStjLO+SCXgzdcQ7ynYdzHRg5qFrbawSvUabN0v8jQ98YlsND\njOsr\r\n=9/Iz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEz9brNppN+A6YPKHF/H1kgvFfOWgS4J8eUbe0YkMRZaAiEA/FnEC+SKbD+EBHehfrMoAMxLJJHDtuMjfgwxbWPFzLE="}]},"maintainers":[{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"aomarks","email":"aomarks@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.7.0_1566941037462_0.5878721616563656"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.7.1":{"name":"@material/mwc-textarea","version":"0.7.1","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.7.0","@material/mwc-textfield":"^0.7.1","@material/textfield":"^3.0.0"},"publishConfig":{"access":"public"},"gitHead":"f8389e38b66e6261a8578f4a748efcb7367da176","_id":"@material/mwc-textarea@0.7.1","_nodeVersion":"11.12.0","_npmVersion":"lerna/3.14.1/node@v11.12.0+x64 (darwin)","dist":{"integrity":"sha512-nsRq9J8olH7rZi/WNjfkrkH4LPiYdiswiODOYWMORrYthQhPNQZ8KC662r8edBspEsQnIAmTjZkjHTfmWr1Jeg==","shasum":"f8364b8c58de2d57e9b59c624fec71fa9bd58f8f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.7.1.tgz","fileCount":17,"unpackedSize":203935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZezvCRA9TVsSAnZWagAAhowP/0CKpKLGqcyZlub4bfs6\nNWiTgpA42ezqusu9oE/sRVZfoxLwxjAG/Ib6rmAToxYjS6qFcMYxztqRdbKA\n5MD2N5TDcphJMVfsjxYI2zxUZWhBr1DdCb7j/kVw6e3tUQqUW/TNQGMPWxWm\nQNfHqwYzUhX3PgHWOzSkCC8hexIZqwvvVFCwOJljOkfrVA3SJ480NoUKQqYq\nRCvRBFSG9sOiR8T7YBkHc+TXlJrd4Ne2fnTjFPxizrrak/F2cIZkbdwmjyVB\nsW0ZNwvWjpSAW+19ZteXZt1bsBiWN0RERo2BOD5+8VDoDpydZki0UJlNCOPP\nzxhLol4j2K8aJ480SyxJX0hsI6RA0EVBsG2NTkL91q/bi7UDSPMJ0J8j0MlY\ntgqje8PghlKQk2A9MAPpubsM8ffs9B4tXuX80ZwwQF/77byuUW9YHi3cJsGQ\nU8VTKBb8UMONP1vLPJOym8xeJqoG7TwGFFL0U5wLtI+JtAAsp7Gnd6SsOGdq\nWycy2BMmjoAsE68Z6XfHKSLw65FOo3Ojbm/JCGCUpnpfG3HFt2VTqioJ1M7X\n//jN/7VSuTMEXm3SiBarm6UlRa0QlF8t4dU+5USCkfv8pC9LsgUFugc4yBhz\n1Lr+YFE/5N63yaQRY/IWscf8f6SYfr5lqGeuoDXD22tv0gurPj5Zbl4OQOJG\n3LRw\r\n=mJqy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGf33edP6zhXOVnr0qfJqmxKRy6O15V5TogwqTDG74ZmAiBYUFuUZ4y0hiXQBaSFhqTKUxZHxkdpGRQCsp1I8ADYtQ=="}]},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.7.1_1566960878872_0.20663855789707664"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.8.0":{"name":"@material/mwc-textarea","version":"0.8.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.8.0","@material/mwc-textfield":"^0.8.0","@material/textfield":"^3.0.0","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e47de0d9d6e556ce8c4b0b92f87be25a3e18da79","_id":"@material/mwc-textarea@0.8.0","_nodeVersion":"10.11.0","_npmVersion":"lerna/3.16.4/node@v10.11.0+x64 (linux)","dist":{"integrity":"sha512-1P7OziGi1+d+8oH119ukfU5cUoEgBddhScjw3smcVTJdBzeICP4QReF3gNyK6IZCC5iLC/5/exOOOQY1MM/99Q==","shasum":"3abd8786b5ba667221e544c5e28c41635dc7ed86","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.8.0.tgz","fileCount":16,"unpackedSize":194681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbv+eCRA9TVsSAnZWagAAWYgP/0tPeCZ5YoKqSOcb+3wi\nYEBrjPzEUuMOOqwm+jhjUL6wHW3IW90VmM11pCOAIk+0DI4mdzwdhoOP6IQY\nqfRSoRuj0KgGfWsBHlNN1RdNaDJqDGumYOIEk5Z4zzLim7xlgC449qjspa8n\n2SM9LIrMJR4Yv0F8fU4KMYRH0pGnmsj5upb7MtRdvYTW8zR7k+6aoNRgaaM3\n55U5KO7bVIZiiyMTBXRJZmRZbvsfCmY0s9FIYgwlkwkg9uxCXbxfV9+uqXaG\ntHmiiEKlbwlcJNTCxsX/D3SAiiAQ7yuOvoCFzV/pA1iijIkam4tDWQSR81xy\nXZdOeXUC8miidZKkcRFFu+uqjqptcET2rOn38JHC1bl065uD8ypW9pJXPA7C\ndZnFyTrVXZa0r2/MwLYDmj34pgJKnNOu5FzYAiSn0lbhn++XquHcVJiphdb3\n53r+PsBqGCE1PuhQgztVlWH8cd2gLAz6f+dCjfYKF11kcYhUfl1NvzddFYnF\nWhtoIgsLfd21fShjvPfdbR+C7Pj0N2snteMMiy5J5U/Mdm26XtZ3UO4GdHAo\nA/Asy0Ml6j1VPJzXRQTOjG2AJw81qzTYHDxZuigwHn2TvVJCLSESvlZ5TeVY\npPA5yiT/LIIOMSkt6MgDvWhkEeGWCB2gHjLE6S+n5o1OkCV4VQKyet13bhLs\nLqee\r\n=zRWB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuHIIKgIYNWJJXEXzQt/O7vqj18NVHULtkkpXV4tgTxQIgCsBawMYCCIm7DIC3OAcrfOVmiEn2+ZrvVYi5lKu/Pnc="}]},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"aomarks","email":"aomarks@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.8.0_1567555485776_0.2891166637083822"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.9.0":{"name":"@material/mwc-textarea","version":"0.9.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.9.0","@material/mwc-textfield":"^0.9.0","@material/textfield":"^3.0.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d6db9ceafe4b21572f967ac4acae9189da8c9c4f","_id":"@material/mwc-textarea@0.9.0","_nodeVersion":"11.12.0","_npmVersion":"lerna/3.14.1/node@v11.12.0+x64 (darwin)","dist":{"integrity":"sha512-vKSXQ2vngUgfO00IVuhK0HXMnU+Hh+hKqszp25MWecgx9+7AeJvOce3QGE4o6OIeu0VG+RkBavEW/0YiVYLLsg==","shasum":"7df15a5b971283d2d54a491981665423afd6338b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.9.0.tgz","fileCount":20,"unpackedSize":212622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjWeYCRA9TVsSAnZWagAAKTEP/2S/Iw4GIJMzKmc9A3ac\ny2KKDkJEkhu5WT0KgYUz+Ci9hRL5SGP9E7ANAyPT5fRXh+RMecvX+5EEgIp7\nNaNMnT2fzsHAa3E3+XWn5shyRMPlr9fzFf0McfYRJlMkxf9Ma66/iN/CMak+\nWGmAL0IApR15EgamXwf4xVRofqIe4l22huq5JFhB7jX08XlVRFlIavDmvBlB\nJ+rtG04mkv7JcnsbxMIfDeEhEDu1Dv9/gKTEW6b1EwT6cOQf98ppjjWXCYL5\niswldT4Ay5/rmQA4So5uRZcZVlenF/4enGZlJwatkxhkgS6Nk/CWfUPOrzGY\nuJXlOoXdu7dgKEdNyXs3cc99LNlkFUr+1KhkUko0XqgevdFQDX6n0MPL0Oa5\n2RdjH0lQW/WwtKvh2Cfhs9ktHgn8H1mBGjSMTsTTqHORIkhHXM5ybAKf8LDw\nvEuN7QyX8lnAVzjweoMtpOiQmeD87WbXad1U6HhElpmJLEZCR+pS3wa1AB+6\n40xP0su5sgjIc4HHshXzrdQee5S3ZLWi+aXZ792fx57eoMGhxDJ60dHm2QmN\nmPOzlyU0ux4PK4DGM2ysBtlFRx2MgfVFCQrLnsMh0U8FTVgRFoX12x63506j\nRygVQpv0YH4/1PJ9xDhzMeAExN6xk9Ff3cG2/tVhs/hQB+EO5FU9iqkmC0/K\nKUx4\r\n=hxzj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC28OenA2muDFeIfasnQa99/2py5ochkXH1ocI+t045twIhAPLR4Qcplm0rVsEKGqbd7Y5BtoIg/e63DNqGJ9W7/ep2"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.9.0_1569548183610_0.09814340790297771"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.9.1":{"name":"@material/mwc-textarea","version":"0.9.1","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.9.1","@material/mwc-textfield":"^0.9.1","@material/textfield":"=4.0.0-canary.e851d4f40.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2b2676d71b8d393aa61348cb8e3d9ed03dd8dc08","_id":"@material/mwc-textarea@0.9.1","_nodeVersion":"11.12.0","_npmVersion":"lerna/3.16.4/node@v11.12.0+x64 (darwin)","dist":{"integrity":"sha512-zG0TVlsZ4MPJTsUS79dcLZOrGswBLYv2t+B+FMCGYm9iSrbsL8DfwPE7MrWuOWOpotreVGe8yNVGg88CfQKX1Q==","shasum":"d77c6d53c0e6d2525794cd7dfdf2f116c6fcbf45","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.9.1.tgz","fileCount":19,"unpackedSize":205590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkm4NCRA9TVsSAnZWagAA60cP/iIsf4Z9xswhigHhMA51\n+t59mpShQpmzrPQwitmwN79AwtWlmJ5h9uyLuO8Bi5R7mPEElck1jgQZC86F\nJJLq1RGS/ZVH19HVLg/ouf9KcLEW4LxWHehU6UEdnbt5nAX29St/Zilqxj2/\nrj13xXVP3gWxQu6I3ACA/iSmlAbszA9P/SlileN6oJF5C8uhfwRjyJMw5oyd\nsDJyHpP3AyWlh4qsNxFK/XjyvD4SgCdiIvwp6SMfpoOT4t4KYywMAP4hmOj6\n2O2qMVgshRmjGQJ+3G6A0xEuHZ8uIceOMIfpXuKVTUA44WUXze2n4NGJ7NBe\n2e0ltgf4h7pVu1ws7ato1Cz16fnn/gIemHlbAm0akKTBdm+fpuHmt550+Q6s\nUmeUKjkllpdFPEKFS4+y59vPKGOwD2TP+CSSk0YNrupfgGAuoPSmzT6lp9TJ\n29IRR+jdD385vO7az1K+j8rebMbGBRQyXyYPzXPeCUNcyglG0TAk6YyH5kA0\nLUGi948RIsNBtZ9L+R3+JuBi2zPm9iYiMerwnP8MOjSwS/SqUj7G9NvN2ntI\ncJuC8Pq3q4v8CwKv04yfd/spfFTah05GF1LfJug9WZrsvO3lw4K5wte39stP\nhCC5rt0Ah4Koe+YQaeDMh4B0JBJg1v4eQ7QhUdLmOYGIYo0LArMaX/3xr3Om\nYvtC\r\n=ehoi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPRSyUMU/Irz+FTE20NA7yPhztwZf/XFBBq9yW0dxDygIhAMZsVZuPwBz8bWmBSIS3uE/W4OEiSbqP981QnyHdqang"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.9.1_1569877516546_0.9589315928539202"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.10.0":{"name":"@material/mwc-textarea","version":"0.10.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.10.0","@material/mwc-textfield":"^0.10.0","@material/textfield":"=4.0.0-canary.e851d4f40.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"631e70e3a39330ccade8210d1a72edc0f22ddc0a","_id":"@material/mwc-textarea@0.10.0","_nodeVersion":"12.9.1","_npmVersion":"lerna/3.16.4/node@v12.9.1+x64 (darwin)","dist":{"integrity":"sha512-tgwMRXqHt1938FnQnGhBE7T9vsiBClB8/F4ExV7L0tjIgxrWjRinlMCeXbGTOnpWCYn/WbjAtBSeYKHz5Sz51w==","shasum":"fdf43b78b70b4ef3c0093941828b26e8f004f91f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.10.0.tgz","fileCount":16,"unpackedSize":203480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoRAbCRA9TVsSAnZWagAAbf4QAIclqfV6NWPwh64xkmDM\n45adlG15/evbDyIGLH83TvZxZSB+477C8oslZPtkaqR7LMNSOXePRIVLzgzL\n2xEVDiA09DSsqL8TMd1reLb19VEyu2BQEHEWRLhN/4dC3zBUvJ0VqttjPKzw\nag6GEz0GqAEit9pMjyNE5agIguS2k2Sh9Kcm/TdorgHwH8t6Vzl3jBVbH6Ap\nxhfWi+RoEcaeqt8sV58gokdYuKFnOKoeuFPhBjW/aeHuuVrM2MvQZGdIZRKV\nXpOUN1HtYd3Ys7wrOmXnWbCyFb1I4uK8tQsvWsQ1hGyKKy0VW86TLBJZOET/\neCx+1ykoO94jho38qL/yPdQhNgMZWNApk+lZSQaBK9oe1qxlsbfPPqVlJtvC\n5Da8mwUwQUkUE/4YG1PH6m+V13X2XMcFQBZawQObuKDzLBH5/yNeUTUeu+4m\nx7FjNmf9bMqsgGdXullsOQbO+1HfbnUSxv8NTHGlbpF7mmKb5/H/BbyAfkM2\nxy5ClsDeSGxEnfvg6Gilp2RYb9auZHpEKhy+t3Z34TQVWbP+rSIfYNprAFVj\nATpIcP+z18dUuhlMSdFzntIFMmZ2ffkrtzZ7dF1aOcp7X1FqGH4R6Ihf7jEH\nVVGMdP1QH9H2DEI+21rMTcRcMOi5ODs8KSztNTu8qmKex4BvdCCg+ZH8kwMh\nz9OI\r\n=qkQQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0wTfIf46R+sZb2ebzCMjLr/rlOCxBSV5VcBNtFPvF2AIhAM+qB5iEkhDfhTySTAqKjYoY2C7bTvBD6zL3l9jt5mYR"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"aomarks","email":"aomarks@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.10.0_1570836507032_0.36521784414795455"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.11.0":{"name":"@material/mwc-textarea","version":"0.11.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.11.0","@material/mwc-textfield":"^0.11.0","@material/textfield":"=5.0.0-canary.5729943ba.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"147d9789d99bf7a5ed28f6b066b8db58f5b9ab0a","_id":"@material/mwc-textarea@0.11.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.1/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-wiuLY6t401+FevkT0NyKq2qCCmxayPJN0nDNS5FPUJayPintRiKgOU5i6ZvbbWSeM+efjmAeKPMtj9Sq+As3xQ==","shasum":"4e41264e00faf27878d8aaaa5498002babf48abe","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.11.0.tgz","fileCount":16,"unpackedSize":200096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3Z32CRA9TVsSAnZWagAABFgP/jGK1AhNVKPZYCsC+kPY\npOsQiX8HY52VUt9tjpBlmJWrcr54USqPKwDIHJv/x3of1TPM8fljeq0qVTjh\nIRlAj6PHVJyWstt4JcGXCAsMSPUQNk85fBq9sjdkc7MgeRtX7XkIWvaU+lB7\nZJeYReLEigTuv/ynJv0BU0uFMfhomjzMPB+l3M8xwj/pVn3EFYOYDhzpKE0Q\n5Ajdr10pNmuGUVx0LgkLVeMmyncF5lc8Am7jqSTNy28H4MHuDgrXCST4YKTD\njwezUfCFfRiio8Nl+EBHDC85ZIjXeFTaveIP8HeImdi+P8MFTZXpBcwuBCzM\nAUzKj0rlLlppyvDeWGGn2eee92V/3Lxo90Be0wYjlSz12fPlRdfwRrju/V1n\nwpgY6GSjcWhfhXVIcJrPjrEXG7E9f/9GqPWmuFZ3CIAB8Hs7rYITKDvFjr8k\nAl4uM260LRTml7fyVM762mWXUiVbaRBmfGPTHXemgaRgKzvF6ekQwc6rbjTh\nDtk3cUWNc/aZzdEE5iO0SRG8cZOU1OWJmSNBvR1wms8deiWeCjpeJ/zqah2C\neOqDfGQW+hO9P60wG4g0pG+QqOWsvkNSE90D1W8Baq2SX5Q1q1YLYsjBRiwN\ntpEqNEc+u3FrpPNa+Cd8wAarvS6dTtDibQIPvYXzTU5TGEo/0v+KrklxgEE3\n0Wtl\r\n=dLdg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPjUWyhdCMvtDuPwylWLuQWqGMlIXLVTvUNeRc2GPYZgIgM2UDp4oxACLDUNpciE70RX9EzT6p1i/Hdrpz97eBZTg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.11.0_1574804982307_0.6837003561665373"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.11.1":{"name":"@material/mwc-textarea","version":"0.11.1","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.11.1","@material/mwc-textfield":"^0.11.1","@material/textfield":"=5.0.0-canary.5729943ba.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"395c02244bf15c2658cb110eb405ff2e4c0477fc","_id":"@material/mwc-textarea@0.11.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.1/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-T/FOYwzVfIoSZBQ+jpfIiJCiub29EUhpXCq5/0MrtkIZx/JpsIg48DFxSW97QNFWyYl/RlQl2MI+1if1xUZbnA==","shasum":"ad69e64cb868ef089972e8167e13dd3171708f49","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.11.1.tgz","fileCount":16,"unpackedSize":200096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3cLECRA9TVsSAnZWagAA4/AP/2LS5E7Hq0pmwygTp5tW\nXxDA4UT/izTjyGE0QlKwAOvAK9hCQ24gf95FWLJHwNWe1qBob4b8oCKJmdg7\nc2BPkfo/rJJiDvXRVCrlgXBvWIP2nK1KP/ma/Zf0ey/He69zMnc/O7P9Tu/C\nUTBn4AzFcbHBnZM/J55aK2x53FPj8L+RDao5EdRutPM5XHOcEVTrzs+bjcP7\nHGalGxh8ymeE95YR/3SlF3CmcanOwF5bEBp/0fZi7o/U8gEsDRbGWYE0E2Uk\nY7y+rr8n8y2kZdHdOhp+nBzlCrVmxo9+uTaYHIWsTOpalqNhuByMXf8MCnAW\nTY9vNdwxJjPedPX3ILyDaBJjwuM9xAJz9h+bqJleUEXWgnq5PYS90Hjqea0V\nF5M/IrlgMpZTswpcIxjrj5liepVlau/2yJtZQssuLWH4KW7iouK5ry/3bRqh\nhJGiwmWCUdv3Wa0hUW0RBw5wNg++itgUSP0EXNShBr5TcbwZbXz9AC6xJD7N\nyuLb3Q1Zj8BipJsUnGkJ+vk/NKFhiyg7ng/sSZa9T8SZSBN4K1qrspJintOA\nzvTK5jYiyaOtA+XBsZEkBGnhAp4ww3rJs+PR3VfhBgZndsOIcD9TpmIOHAR0\nkbK4sZ+/bfsgCxoxUiBa9RfMP/RrnmCnM9rSakhwGRJ6lIDUftm6bNln4UOf\n228B\r\n=w66g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGjB35A1FZS+LVZm40E9R6e7zCVqKp95XoSDsxdJUhNOAiA21S3YDCPu5KUsqJ8Ew5/7xaZt59p0u2T5H73+ZN+jwA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.11.1_1574814404056_0.6090885183365511"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.12.0":{"name":"@material/mwc-textarea","version":"0.12.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.12.0","@material/mwc-textfield":"^0.12.0","@material/textfield":"=5.0.0-canary.1c494e567.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4c0dc16b89066f24fca4efcf78c36c87657f0a03","_id":"@material/mwc-textarea@0.12.0","_nodeVersion":"11.12.0","_npmVersion":"lerna/3.18.1/node@v11.12.0+x64 (darwin)","dist":{"integrity":"sha512-53LLve3jAR1ScsRXSG5p9A1lX0nxOa8Me0gLsoGsyASrFEaniTy401GVJnbP5WnWs0fQB4w6Y2aEM9CVmqGf6w==","shasum":"b2b878d0e3dabebbcb6c089d5c5515f044717c58","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.12.0.tgz","fileCount":19,"unpackedSize":206916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+WkvCRA9TVsSAnZWagAAh4EP/35cUHue9AKkWG0FkzT1\nMsepWQvKd8TNR8jYZkzs3fSEZ1cSPGhvksXgUMvi/J+o4CrWLtsqV9QdHkpk\noIj1w8X8XIZuW/oE28NmOFvIBKFgPruqXvgIYUjBcfQcO+nWiECQBHdXNmgl\nroSN39vZRz43Qt7uDAQhLyn7KJztl/fcCXIgBPK8MfLunFnDqW6Dn0KDXTMJ\n+05kUN7PHPN62xJLXccsN/ixo19DZz0pTP7cm5qfZof1/GTg42gwOjVa+ZOw\nfeWG/uUttQ5fJjOrO81CKXWbkz+qiZBlhuwW3qE2up1OZm+92rwFJ6cwwni7\nWGcnLXZSjEDDNyrmcuV+Mlx8tag2+7ODVRpMGevuQxNjD88qjTtPTMM4FfwU\nJlq2drxoG5QQLzrkDqqpG6YRIsquQ+y7hulbeEoe7c5K/7321a837LXYFrCv\no3bwOkKxYpgRoQTl/oyjFcIn/tqgw8XptBc289ZpoDLBsXCQR0c9tVehxobS\nZVsAx++jzfqEdIRN0NVrWFabm9RVCWijOT9GmhMXWdbeMToDOvmLouVpf04G\nqSUKviYhVpDpAGXVRqimSMaLamr+SF8Iw/j7BXHkozXJAYsiuHcxeN6PQwO4\n6ssHcYML/E7jPTJSvdkp+GHFWeCctSQNmyRc1LWJ5h6IGohL+JOTGltTMzn7\nvYAs\r\n=alJv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRh05SVoaNVz0xvMlDLU0uCgEUUIUXSHw/0OqiW84YnQIgXm9emd04jOYMyaHzfGLKI6fm3uVwtgCAAYWhoM1P+IQ="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.12.0_1576626479115_0.4285217189958599"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.13.0":{"name":"@material/mwc-textarea","version":"0.13.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.13.0","@material/mwc-textfield":"^0.13.0","@material/textfield":"=5.0.0-canary.a1a0deb3e.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"054d0d234704a274e8aaf7d8a8a0399f525914eb","_id":"@material/mwc-textarea@0.13.0","_nodeVersion":"11.12.0","_npmVersion":"lerna/3.20.2/node@v11.12.0+x64 (darwin)","dist":{"integrity":"sha512-yc15ZTuy4euipRFSfvvcV/OsgVlDYGTn2Cdme4WuIOeXHo+I3jZ7VPyRjzDcJw6AKUwZ7yjeAsEzgzNJ0KNTNQ==","shasum":"4f6f5aeb15982cb84dc0ad9294b4b74838b73af3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.13.0.tgz","fileCount":16,"unpackedSize":197651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOPc0CRA9TVsSAnZWagAAYQ4QAIENw8wrodkyAtHCeGsH\n8Di/X9oK7Pnb3aY3C32kH7fd8nfrX/fbm7BKUV1MRLgWwosO1zmTRG1ubuHx\nWrZMO4kafxtQx8FU+GOM+Gru54um2vOimc0PfPzmEvICzFEQPAP+shoilr1p\nsmYn/ot2K9OyXYj3E5OpCP5dZbpae1kCPYpCBDWQDtBoCGvvQ5cqVlOtJwoE\njd42ieoHvp9Jc3MMad7HzLJwRYJc4iYFZYu/9jpUTuRKutc1PUO1gmsegAgm\nhhjhW4GMDoOkVEYYt2AimHSkY19rEKBmYWpSvh+f+XDiFyhzNXnlxcdhFZbg\nBcYCmwQNh9ooYzagrnQ7MI4PVkbj1U+243rRoPNC8pT/NGjZChGKCHd4TSV/\nDnw6fQuRsJv+CIY6WZUzDKWmcgPM5qKZKpzhbAtTyqsQjsxmRFWuNghy6g+W\nDBuLV22DiAdkLq350+vTHnDLmkDgOl/1m8O9DTfZ8aH5rJ6v0B4Z5j1hfKhY\nAnNSJ/GwDU+b4sVpZ5yRCTbk/5lyHY1SLe4C1PB3T2tfqPui3ZO2MLojJjD/\nKNC08jxrwYALlCmwrY0wDskQSWAyknFxm9VcV5I4FjDpQiAqF6CB6fksmMD1\ntLB3CIEfygDsH+60tYwWNUCxORgqsmGWViOQrOY1PK6vcFGt2tmGl56Hq0aU\ncnjW\r\n=B4Oi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsUjHZSM0H8iLj8Mg89hx5PpzHOynoGZbr2X0s0IdHKwIgNenWxLJJtDunr8FTdP9QDZByhHXlQk3MubPQJFfS9Fw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.13.0_1580791603827_0.6786304908760952"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.f790f713.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.f790f713.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.f790f713.0","@material/mwc-textfield":"0.14.0-canary.f790f713.0","@material/textfield":"=6.0.0-canary.781434a92.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4ccf0f734c9b727a925e62b9999d4380351c7936","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for Edge and IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ccf0f734c9b727a925e62b9999d4380351c7936/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.f790f713.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-Ft6aZLtsrH1ynzxnUkCBOHDxwO2nLT1pgDcm0zyDxh8FedvWX9zB9j44cT0C41KjRX93CcN82iflykS7DNlcEA==","shasum":"101037d2cfbcaaf0c8f20cda9d928015e02acd75","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.f790f713.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWHrWCRA9TVsSAnZWagAAvRcP/1jxRqzEF9zpSiVmgmdM\nae1AwAhnbCDH7kPBIFw8rPO8B48q+LWLuSPjGitMp0ABvOdOrDZIT/i+d9lu\nxHkDZEpBFM5PK91eY1nv8ZlOZmq2SA+gBUaYztmyeAp1oB1139AN8sig6wSl\ncCQW+7OvKaRZ3Mx4imMnZBhI2HBCGpBqt4NEEribI1ZBYv5br84zWcERep/J\naPfHiFzAxCFW+5EHIhzFaoE8zfwsljd2U7CvEJSiQzl14x4XglH9BuDwGhjK\noLMIHNzer7EPf5IDnPk0wi7EWDM0rHiuR6Wd4GTUY0DVNWFHbZyLLMgRkoXX\ngRWXlRsP08k+IB15SARJKQguvhtFc4/1AbEHdwruQ217bXhZyAprlsTTWi39\ngyhRgKbHpfbLXjejKiltv62VQKdul1nBM86p7OEV3Ve8LHOuBO6EcjsEqCz+\nGZ3TPsGG2H7lqQoBtq0lNVaVhjKEUoh+KbqapxoVjsu9vH5DxwFBeTyy78RI\nJSOOqM8NfREqfCeNsWJs/fVRnIVBwdRr/+UqMYQy8pHMVAcmhVZdJqL0BWO0\nisF+UYKm7GxnaEBnp6USTHWSBoAP/bIhArLjUrRvKZR3C+aBkDCWDLIgDHOr\nSZhIyPIkUM9uRx/WDEzKfLAiO+ZQ93NhOk/hA89bclqwzkn2f9zPlZEdATjS\n8Luz\r\n=vFH4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdEQ7eNdJBFIRNW0ixsr4NkMpWA/7F0mjUtVkiI5JXwAiB5cD5xLYa1M7E5EgucbOra/Jg36o+hXznfkwz2FgaeYg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.f790f713.0_1582856918414_0.8892537257021471"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.c759cfbc.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.c759cfbc.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.c759cfbc.0","@material/mwc-textfield":"0.14.0-canary.c759cfbc.0","@material/textfield":"=6.0.0-canary.69edc6e28.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e0a8ac49c085c004f390a2995879e67aea1010e7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for Edge and IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e0a8ac49c085c004f390a2995879e67aea1010e7/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.c759cfbc.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-lfiTKNJLI9WgmEltlHqISL5x+FQi96y+sHVWTqp9+q5cxjajoNyyLsE+XXO6jD68wRmYa0pR6ZXbVb5BsMIjrA==","shasum":"fdcc8ed94a329e445bd854b6a440b8b57e2d64d0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.c759cfbc.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWaq7CRA9TVsSAnZWagAA+PoQAI8DtkEAr6c+jhFPWVId\nqyOv4rYvoZZy1hoHwEX3Ww/ZapsGmZsiU03eqs2acYwQMA/Gjfgkflfzj/KW\nqokVi3PP0CPRAg2ByIPRAfzvOJTZMrroq79Uy/kEQUkydZddBC2z3JNAWQx7\nNOwtz/RQpEfRqxAI66syHQAnInAPkpXG7mmzEQ2Y6qY/TxUKPqsBfgz83ZeA\noCBPwHUK7157O+NeKVhjMYnzHWey9snunCn8DJirXJvXq1oMUy6VekDh9hRX\nlYJdovphl+M70FTUHwhEmoZMThdBEvogopN2ZUkobkvt72XgWmavHGgqGNlm\n5f8YdnCyt9lu1Fduqz78mZqTRANfYKB+OvodBEdnjTijKD5lKREHa17Kwbox\nMI/Ko6PM6RlCqdIFlIrEjS1CEkkwgVN2w0p8CUANu6lXDQhqkBdKW9ame/Oy\nBEEnB5vQFl0cZ7MdeVBS9PvHd0XocvbiTPmpxlEuAsJF222unyVgCWu5rUZj\nZFIaTZSebiURumPAvRe6LKLafUN2+K0e2oRPmKngkleNGJZkY20gtxM+QXhz\ncMjrtwiZGlEUQo+14x2QO/+Uyu3Tur7PV5k7Zc7bIoq3O8m/mg8i+4weYcnD\n4Z1Z3IHig4N+F0cxDfuy2iOQaMwVD3v00CaZ8X3HLoQbX3e0Y+fB2wm+rnM3\nAOaG\r\n=a6Xt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuF+FiJ6UqVbcWgbphjKS+gn2jupeiqJo568LGJ65hYAiEAjWHexXf2SkSSlmR5gPwjRN6IeTEFkzWZGjUFzTS4oNI="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.c759cfbc.0_1582934714646_0.3083329379076247"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.97ef53d8.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.97ef53d8.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.97ef53d8.0","@material/mwc-textfield":"0.14.0-canary.97ef53d8.0","@material/textfield":"=6.0.0-canary.69edc6e28.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c6865476c6b2c4ccebc9f20145aa8fdf93e1252f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for Edge and IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6865476c6b2c4ccebc9f20145aa8fdf93e1252f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.97ef53d8.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-sdBtSIKiD6IUbF57+so5wjHiIH7oMzm0SF9GmF4ncyNnbyOPqeeAB13vZT9zHAytdnx5hWFKha6yafSOT29+hw==","shasum":"5a5ac4279270264e2273756e26a2e82f45fdc93b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.97ef53d8.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWa3eCRA9TVsSAnZWagAAk94P/ROLNBAqWRFebxtCkrfx\nrNAX9aEvhu2LPPgrirdQk+BORTy+C5EK+ZKwC1Nb6nvbnBBfS1GhSilYWsVV\naxIeM6lFzR28MVQG9Is2LObV5YE4wmiQFWhnpJJUrwKBhH0nGR9vOMTZ8DJB\nJ2SUzR0IoDz+fdVwv2XTvtDigy9ecHT//mHMBxQahWk4hKpBZUdYNtsoTwB7\nMV8ljNnssfsO1haW7OK0ZJlyU8GaRJIPlisRTI9LrgxvIyaXElhlzNcbUoVE\nCGvG5eAn0bDJhHTSIxPdLIeADeDdtC2Wugc6yvk8qQdVI36TsjBFQMiP4qXM\neaBwJ27r1xxogJ48f1KqcGUdL/18L7b1v7Dz8s9OrBx1Y0SL0yKQnopsChrf\nFKC8dbHfdJufpAGEV28aGWjXf719bonTbYzQGZ5IVquE0RRvDGbJLamXk8Mr\nD9/WBYhnPEIZS4Vq3nnDFQwme1VeOnB1LkSxTgx6pCB169BIno+RxwjnliOO\nAMKFVrAxu35yRe1lYAabHc+zL2t4GvuUUBr53n0O6F1KcMm7FI7Tk00uQiuJ\n2mtVLEMVVsDXJUhZq72mmQNbmX+ZHmsg9UVS/lyDDJFhXHXH8N0/LmS6o98B\nvU79BMTXNaepKQfcZlMNX4q8TDJInXXN4/pFDECQ/jQuD6E4HsL2n/0ij9Yc\nMe9k\r\n=U09A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICDauNMA4C9kl6xwGTocORfce9MUJ5fE5ACgiynB8k0BAiEA9FwmKgZ59ILR5P/up1KQwE3CfVCltyp1WFAMCElGY8c="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.97ef53d8.0_1582935518337_0.04889816121412949"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.24f5fa6e.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.24f5fa6e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.24f5fa6e.0","@material/mwc-textfield":"0.14.0-canary.24f5fa6e.0","@material/textfield":"=6.0.0-canary.69edc6e28.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e884595521a6f82f63b8dec96fc4450410e37a09","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for Edge and IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e884595521a6f82f63b8dec96fc4450410e37a09/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.24f5fa6e.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-g3YL9wpeCnBvTeM7snVPZjzNyBfSpvUSgDv1+OoxUc2mUz7a7u70X7s7kgMQSRLir6EWqJMnXdNMGsjiDgWYLQ==","shasum":"d94b27c3cef65ed18c27795f2d7f3e8a2eb34e1a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.24f5fa6e.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWbmuCRA9TVsSAnZWagAAN6AQAJ5yZoMHCaAse93p/hC/\nOZUeZhNdLNfdD4bkT+MP1fqzjz1yEIcGd9+6qquchp5f3M0ZfWGUobhSoZpR\nTXw2eMt+Kl1H6vhsn7LLZig0RckbTgIYXcpIvZUbfyNU7YI68iPyL2dB1iMN\nlmGbyKQEo1dnWPSONEsuW9oVprDKJzHxASzu6w9wdEJ8kqyoTlzeQCIy/FUN\nFHJ0I2As0hGk9GX2+uiWv9XV4jbSFX8TVPA5J5WHomvg/bLU4r9QlwNquZzh\nP75+iFQ/Z5tJ8ObwAd9GKk7FnKc6N7JVBMpSHhm5PziE907n/pN7JgxEgt/P\nC+xacV2Koo9arqkdl5MtTBB+CybI1fYi4VS0dn56UxzpxeW7fy3+jmCM7act\n5+CHRvmuHBoXt9Uk137YBE92JUwRaExh7NOKlMLGZ5PCk09k+IGzWsApVcas\nBR4DokxaS7W2Ui1JAEPHRH2wOVKhPH+UABJawC889tUuZBvEFMTJOp9GfaRm\np5659o7/whu5mmeXrnuTTQ6BwmLOCRFSaEPIjnkLfvV1E3TqQIMvERjkkO6S\nhikh15KCRsRmwW+5T/sjwjOgGhNIlDEvApVTImq+LnqfLd25VV4KPThKaOGH\nhWYrOubSgVG2Ifd1Nk6LtrhbEb67J2Q0BUCGIw520qEsEN3ye2zH7TlGuilg\n9oPk\r\n=X4OV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9ZqYA+nyUHptzOdu5erzMJZ+z1TuPSPEVlKgKntfimAiBLeHroVUclXBsCtZQ/GpaC2U18wd03CUqkMEHwd6SNYw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.24f5fa6e.0_1582938542192_0.43598904071299205"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.960e214f.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.960e214f.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.960e214f.0","@material/mwc-textfield":"0.14.0-canary.960e214f.0","@material/textfield":"=6.0.0-canary.69edc6e28.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9c56e2bea6eda03e423f3f7ba00cf95f684660f2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for Edge and IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c56e2bea6eda03e423f3f7ba00cf95f684660f2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.960e214f.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-P77Eoblks8E3Ba0SQYD2LWGpCtDfyfy/JXE1g41TL8EmH54grOL4hytWagb+qhE0jylZuWW0g1EYMXx3lhmEvg==","shasum":"d3077440dbed3f7ffe6389c8dcc174fc9e06e8e6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.960e214f.0.tgz","fileCount":16,"unpackedSize":204500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWdXjCRA9TVsSAnZWagAAfEAP/RLmpdS53LCUqnwvs4m5\nyii448pXGbTrG3giAqzhOI8ebpLx/xaEYVCoKHZt/y3fTc3d1N5xhX/L0ecl\nNFaZNczyilPFzthbwcy2pYNbuRVn+bgAv8u+rvf+o3IPMydkhjWbpqZSYGtF\n64n6+945fPgu2JLCl/hexmt1/vfrQGD6o6jlcX882yePON7ymAEmGDC/Fg5y\nVju0WBN94RlJpeec0aFhKcs6WV5NKsmT/1TiEVmpFebaMyDJgLmAjzKoGsGA\nNqyAbXCE57lf6uTje2FEczkGQoKKaKq+ozqgAjhjrysyuoKd8er5Ds7Lrpoi\nWLejHfE7im3SOuT4fXOtG5SHtNrQ/hULKbuZzrtNRt6lNA5kvt3A8BJicLSL\nn/nMlkq5ogINMO2/xm1m59GioIUaoUt/TrorkCv8ZCTOCoxyGGwqpePH9RUj\nqoU9LnXaOEu+N0IZy6z1Q+MOlcwAbIBTwN3Oi/4pr0o/uoW57cYp0T2/+ZVC\nxhp1O1UVNKaU0q80JaoquAZ2REcl/feVTGDJclekBhN7ECbVq7ibOUIZY4ms\nfWCAFtjWOT4r4eAdK/f5lFDs3ca1a3WPA6t6NDY75FREtDFIVujAf0YhvZfU\n4NZkOTcwrj2DMMrzi4JauEI7wFMdc8hBQltJFm30WeoIYdDWMssPtpGqEe8u\netXD\r\n=6uL2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxUfWMGR3M80KiDInZqyEpef84IDDXdbe3gn+IgnYWuAiEAukA+yBr15llk/Ktsti1ekPBnwxGf2YBV39Ux3L3+kTw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.960e214f.0_1582945762922_0.20592222230512047"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.a2f046f5.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.a2f046f5.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.a2f046f5.0","@material/mwc-textfield":"0.14.0-canary.a2f046f5.0","@material/textfield":"=6.0.0-canary.69edc6e28.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b2845ca1286088f29e79c96b6d5c5367873cce11","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b2845ca1286088f29e79c96b6d5c5367873cce11/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.a2f046f5.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-JIDCqiugTJuQ9fZnXO29qI8ASqg5mmpDikuwoJ/NYWF0+dX0xEsDIblSTeuQk8Vg/c1z74fgbcn3r32cVMVONw==","shasum":"92fe94cdf719eb0107e809c3233c70a60fb53b68","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.a2f046f5.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXatbCRA9TVsSAnZWagAAfoIP/0cXFCRLE+3hwUrn8zzc\ngJ0FjWaUIQddXA5qPqW0LD284P3ct9dfUD62+OrTVU+iJs51E+WKmHNOMwV+\nDLxf37k44AXhMNXtaB3zIa5gu9M5CiMsqhtG7EpBN6whb/F/jaHFUrG+Asjy\n4bI0RZP+iBACsLPRbVEZCRmKMga9mOBzQbcu01skP2PaIlYWW/Rwpy8oU2nK\nKqUC5NYUGXAMzhpTAXlPDIDgIhytQqYAe/PjnCiF8fgvEdeh9O0eiLtmpIIv\n+OPqyw4wh6wo2T+BLruEMf5OnRCV41Wxpnt0iuksM+xWGX3G4PNp84cOf1sc\nR2h+AgdVae7jmOsLxdsmcwof606eyYzUjT0d0CBErag3Q3Xn3FR1nAtQ0ZqC\nBtpH5mrPn8CjpsEYWC0J8qu6LkZV4g9BIDRzoDdakSmyRsJ45GkoWMhOx8BN\ndM6wxZaTLFAVAEgOIyDSw3e3Ukbl8GQkPCQUcRFRDErgmD1+SRMyGhpS4dYF\nxnfwIkB//6o8NdmnCDm0QHCa0cyd0n1a9Zs4/JWMGfLWcVpx40Wg+vTvGR9+\neX+cB7j58wkXINFHEno6VUu/xBi/FFzwureCyvyhDm6eDfSC1cga6ss1hHxt\nN8ecNTCN0YOhUiuova5VoOeUmECAcd+Lj21pd7P2ITSA2kGcMeLjWA0UBQhl\nmsp1\r\n=eKEu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdNsTfC5pDR2I6mrbwRHA5M5dOVfDWOj74W0Klr/acgAIhAOKhBH4QtBXeZJZTKw2T3yNzcnf/JdbIW1MDPPdLvFA+"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.a2f046f5.0_1583197018722_0.4894230060318243"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.024f371a.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.024f371a.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.024f371a.0","@material/mwc-textfield":"0.14.0-canary.024f371a.0","@material/textfield":"=6.0.0-canary.69edc6e28.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"efde2be2f22a9a7e20f2b0d57c4cddee405ada0b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efde2be2f22a9a7e20f2b0d57c4cddee405ada0b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.024f371a.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-KUrJIfRjQHz/XVj3/iQU7wbF1rTgyuJTaiwaWBuIB6BllcpHfc2+KO0YhjM9Kwudxw2awvGkMMwWZvWOgWGNDw==","shasum":"31b74165a95ec06567e782612be28e86530be17d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.024f371a.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXbLrCRA9TVsSAnZWagAAt+oP/jyQnGTSpz6oHcRy9SDC\nma571zzI9f3BQSL4AV74RDodu3nZN0XW2LQYeJ3UvJGfnT65Mq65haLkYRSF\nazz08T/Sd9HHDrU3T8yCKU7OMc3462dyeVy2+o4ACQwE4+evwCZzDXB3Sm/x\npVc1hISownq2e2cQYvKAunusWJbJvV/AdBNk0nTlBMCmpOEFUqYu6hMngOzS\nHBCQRGGPDAY7cVFtcyFRU9wXEgNZxR473skMXMZ13IFfh0dAfyh6nh7cid6B\nsUA+Rshjvm0cmrmj7njbnQetAisShKLvq+0ITWGMsdt9txQR06Sm4qLBtDt+\nbmuSwZvlNY9eqP5Hbncr67cK4WcNHs5cIjz9e8xDniVuLw0nuoJJZsk/0q/z\nYrUz2dPY8hzZaPLzZpyvyuZbQ/xsZCsFCv5DEIP90goncnUD6rM2J8co91an\nUtcLWYB5CC/BU+uCOBUIbKbCuIWePtSGcuf9/hQpIQ055VLsCZCvQwcLD4sd\njIGvOUSdOU0E+WUe7mk29r2uNh4583fMW0jg/oj8AXM9dp0Ddc4qIDePRPUy\nNn3pSzg6Il8MlF5o+bumNGZvmMZp2mTYpdFWDxHFnfkKvW+QHZrc5gl/WsZU\nGpUHfXGGaGF5FrJ/qkjtsFEXgHa2UL04mNZMIHot3gslgZtEaf9egyQP+DRX\nZp0q\r\n=QPcc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMj690AVCMG+Z0BuqkVXmctcbed1a6LHNR6Le+sVK4qgIhAN0Dtk0zlRNddfs62mPHBCK1NE3ZlCgVi2cLIayGz2NM"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.024f371a.0_1583198955533_0.5581341584295927"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.2f164110.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.2f164110.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.2f164110.0","@material/mwc-textfield":"0.14.0-canary.2f164110.0","@material/textfield":"=6.0.0-canary.9372e4939.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"288331a2ec51b59facb4791d01e4d2ba8f4b7cc0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/288331a2ec51b59facb4791d01e4d2ba8f4b7cc0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.2f164110.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-WtNLg+5Bc+in9kQhhW+bB96iFwKSbcB7yYjN6Bf4oLRH4fygE4FdFYoHMCez+0JMQ0s91nXhVZKtStG+NxGSJA==","shasum":"a3fb23ac903b15abe706a1ecfd9faa6a528c836c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.2f164110.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXs1PCRA9TVsSAnZWagAAwMcP/AsOXQ5q8PVOBVbkQga7\nCkskxUeM0VIs6M5l6oyH0ILQ0sNUTwaMsnTFbBIxwuglByLvwgbY+/MYaj8e\n9i7G1RjDFdddcixIrdHJGdySB0Imao5ukCQSH/wDpt8qumo9mcin3jG9pI0R\nYLGOjEgLpMpUNG4nlqiME4m5SCj+CiaL6WZHEF3X3ChCLaWf5qDJG5fGAIBH\n5FUI9TvSYHVuymp71Kn6Kb2B55BCx0AsD6fvJMZpp8+wLcrGgS41Q3Rldk7o\ng5iVKDSJatLofbfwe0GhQFJACjUesfKIOWXSexPFYZDdHSe5JObcnyXG5Z0+\nnmJJZRSD6IoCvjJiEOxJPjqvwnDn3Eu7UBmUX/570GbhVpxbXod1FjaZjkEo\nNmuj6Oxvxk52tbUxE7nc4r99YuVVPbN12wA0kp80Am4Gq5U3aBdMjwHJtBrQ\nm7sClZ9o5TavIvaDBa22vMiGFzJ2fW5KffJHd+qvWc5tPp+e2Ux4tgFGF+VX\nO5Hdx8s60E3QToe9z/h/Eoj2tU8RBXcaCWVNrwAOxRlmNTLzPD8HDN+H6N7F\n4KuiH8GuJeWhLxKUmj/ez2MaajDaTd6hGg24LEM8fEPFuI6T3YsF8/p1dJpt\nUhHTodrrjGLFCzhzDwDqy4psfEsOHwesCLKhYu5S9au05hWCNeWVZM+b5XWJ\nwVzd\r\n=Ohph\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFncb7wEfpZJ8jS0c2hiquYIEfUkEmLrWSXlLYJIvaG+AiB4dMmWQwR05WEVbcnZ8VKldy3myoJ0+K/bifyeraiyMQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.2f164110.0_1583271246706_0.08139660046363217"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.edd465cd.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.edd465cd.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.edd465cd.0","@material/mwc-textfield":"0.14.0-canary.edd465cd.0","@material/textfield":"=6.0.0-canary.9cf5e9842.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3954ee24dd2fd1d9171cd7a967586e7d2b34ae38","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3954ee24dd2fd1d9171cd7a967586e7d2b34ae38/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.edd465cd.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-hifUklqpn8YTh8o+8sy8woarCEjPrTZIpVz1whLCcZPp5KbwHqLk/AcF13tXSe8/a8F3JCSm5r43w8i56Ha6lA==","shasum":"113f97c6599c81a4c1622d8f2bc23c86b27c0b26","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.edd465cd.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXvIWCRA9TVsSAnZWagAAY/sP/1BTwIdVEqFN3Btwo5S3\n48Y7Ktjn/7yHzmC/fBmre6JO6NvsJx/TfWiR+JruLEepNNUGBUhfhlYCI7p+\nIG83TWTIP5oj+lT8QCI2gsgBZxfL3C745ZKREnb0qQ/HrqFOUgXmSn8nsRXc\nerZww1p2Ce5gNRqZU7X3uEs2UM5nuK0FXFsRb3iHVQXVi3UadjP1xyZKMkqk\nwCsirV+blDW0c2r9ysS6jcYI2XTQ2ALHDGUwX0nyXDQrdvtJwPhRMnDOpovf\n/7NR39S8PRd7SR+CpQgiz6HQpzyuVHq3gZpz3IHD8bdxkIwJxg/wFiYNlwvU\n4MR1OmL72udOYcTVW264BSMIZr+kp+Ynk+kRwyAkftCzfceNqC9E4eCeO8wf\n8hB2FsUCjKWN+RjRRTXhZHZHxKW4CuKt7d9y5f3IzrzEMSJSuxdgS5yZCAWd\n2siCuL76P3xss5iYuFE6EZ5kMHTMI3MoHirC4hfdJKvUyYFL6kCyqEdLu7pH\nNcmk1PVGnxnz2b/vc3KjOuR/OmxUo2DJIPoak0spO3uZIQ1dx4Oy81tf1JsQ\npUER+tI69D4/LOegfFqRn4LAg/OP9FxLbUqKGhVtOZDHas2/vE67uht5q76/\nIrQrNwI5sFsC1WAf4I5a+UHkJrjVL+sQEYJEfZIKdLn1SbcanuRiS0sNlIY0\nrXGo\r\n=zINk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq/rxKiZIj9ib2IYBD1wEIgYhF0VyaA/RtAYklu8QdSAIhAI2Gk698g4QeX3G7euafCOGXlkGbleyyZuT92137vIW4"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.edd465cd.0_1583280662047_0.4016052350537511"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.2b02d017.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.2b02d017.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.2b02d017.0","@material/mwc-textfield":"0.14.0-canary.2b02d017.0","@material/textfield":"=6.0.0-canary.9cf5e9842.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2f2999d0bc0326feb2bf856866fd9238c59ca246","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f2999d0bc0326feb2bf856866fd9238c59ca246/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.2b02d017.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-MCoi2FxIUp2d5M6UGuemSP76wFttfpoH3urMi0/lH7S+UL2MboWzqFvR2Mlv8f+5iYHqceMybCheSNl6i3DkOQ==","shasum":"352f945f2cbb90fb70a97c015dd4c836159f822b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.2b02d017.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYA1TCRA9TVsSAnZWagAAaYYP/1ANbD6nTJzAw36Dp7wS\nz09lGr6pfrzGPWdWyq4vLhUbjwokVi9eIui5/gR2dEDpqPM6sF3tr1NTAYvy\nOwpgPh5aJW8X6YptpjkMJ+V03jOn7ZmNLaJM2R+OFmjXxFt0O5V5rGNcu0g/\nkTlpJ+tnTekKJ7cwzNRJkauKuPyDdpRFLAWAPi3daNojDDwVIAcEe9IRcEpt\naVQuo+yj/0vkmJpiHuOZKdQ1qr61QWwxIBS9bCEfG9vBw4L2qMhFBodVNGzV\nBpR1Lul9MjvQedxcqcpBpaKxckrdvipCJeAFa58twKi9ulRHnLC65t+23jLe\noLYwK2SOPpdG4a4JF/yPCSnWPaEI5dxdppEs8JZB+Sd02Sgy9WipktNZ+uU0\nkILj4jTVVK9b6ELzgAwhqZLXQ0HdzLWy62nXb3OU3gzIjOEQOI/t+sZbQiP0\nYrB5ErAIPO8OCsjjwulL9t1n286mGu+Dqr/Oj4Gomu8cgnDj8iAnUknFP3d8\nr9Vp1OGBr9Sb41NvKmnTqE1t14/ZREf953iJ8Qzt9pr/LlMr6nzt9DmVf6Ru\nxIETdgvddi/zfzEDKtzmknCpwnNXFwZo2jmC4L5022fx9fFZpanZaPtS+w7J\nlQIDEHY4fxOCmHFYPiMgrTd4bemh9QwIHaN+9JVUYE5MtQWjY1DNAOGE/88a\nJalw\r\n=ks6b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZ3TslL93O5oWy9IOuJQ4tX5msiOewgFI1yH4aSyh4FgIgHkrkQVUsXpXUuu15//DyzupUCscakad0FC0lvPLCGWU="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.2b02d017.0_1583353171297_0.016663271818973868"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.cbdfe453.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.cbdfe453.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.cbdfe453.0","@material/mwc-textfield":"0.14.0-canary.cbdfe453.0","@material/textfield":"=6.0.0-canary.3657f8863.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"473c76376428d49a6811e677bf7e1450ef90b5cb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/473c76376428d49a6811e677bf7e1450ef90b5cb/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.cbdfe453.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-4RmRrAe6iCjsJDs4cW184cEiJw5Y/yszffLpkC6glyqIkWTKd8pS8L1F9nwS8JTPlODKj8ZHA3JJ1hN7w5XEVQ==","shasum":"b9205edd6a37829e19e2217c86ed28d3177859a3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.cbdfe453.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYCFaCRA9TVsSAnZWagAAdo8P/jRMLcdB/YUYlaWG4RMW\nC0V9dPddbsYqe44XST2WWVF9ZDCOWX5YYcoau0EGXi95JxGaNmJKsIm6R9Xh\nlhoVwzN8L475zttYT8kTSdk2IUowkNZihJEy5J8F11FS1N3cA0IOBkvvweW5\nCHW3a/xkEDTyi9Ol2rpqNdVfGG01hOHVTJwENoTJ0f93usSVO4wWenM7vFWn\nGGH7drAjLxsa9kqRqOmxPHZ9WfyV1ddlNK7iVtaOo3uJqR3DV3QvL5Ou6vnI\n5cEOtTgG1t2iqpywnbhA0Hp27FAY4e56rVnaCfb+rBsL1RYNqZufbpivJpA1\ndthuC6dfvL+NmNSfK83tD+cbaShjCnw1PqD53i5eUN8AMqbpUSsTE8jEILgH\n2XWCn37hWciUpUUtAd5yDsY4+FoTKbGGMaZ6iox9jxGhXJQ+AHnuSOLUoz52\nReakLQmEGLDDLx8a35J00Ii+fp4vrWIqCV76vHsOu0W43qiSxVoYDftLtkDT\nWdEnshjrmX1Wregw+UGSToPNQZOawLL8qjpATLeNkE+iJCd1rh/Bze+tRB1J\n/D4HXWlwPSCV3odVkAUqw4rBDqLtnZoOaih49LUOSiXjCY6LYu2nU1D/45aJ\nwrc+xlqm4aq6l9RjSYHZhhR/jHsIstvC1O6oGb6fhTzh8UKC9ra0tGNq6d7J\nWEYW\r\n=4aY9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMnYbxbFfz9up1PywV/BsvKg2gRCuySxcQ6W9/cqURVAiBVbGSpyP5NgPugsPBhiSt/wLTcCGaNw+33bra/Dv42CQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.cbdfe453.0_1583358297992_0.9062406514276347"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.02aa8a98.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.02aa8a98.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.02aa8a98.0","@material/mwc-textfield":"0.14.0-canary.02aa8a98.0","@material/textfield":"=6.0.0-canary.17b9699c4.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"97bedf50cad33662f192490eaffe0e04894aa3c1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97bedf50cad33662f192490eaffe0e04894aa3c1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.02aa8a98.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-L0g3aOJYXfAgW8Q20ZZ/VpSfptJxV8tU3GD3qcmr9FCv2MreTOCS0w4Pwccc/2HcCIGvsf7oTLnyRW85rptjJA==","shasum":"e1e4ad8c3363a8d174f1d06cfb15769c7de23fed","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.02aa8a98.0.tgz","fileCount":16,"unpackedSize":204491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYtR4CRA9TVsSAnZWagAAKkkP/2VBZ3YLgOD8MAiorYGK\nOkJFOPsZBOCTNj/DjnVqRbosN8iEXeweCrhkWLZu2BWUHmnC6Iv6voic/eRK\nMUBNj+CsV2nBFmbZNnzU4HP6s3udNVGAjj+ihGfoVJvLLBrz/ne4DJXp3MjB\nTpc/x1WIZ18wLPmzS0gyys0AF/uAbV/bRxviC0J6GptAIu7BK24caaXf4A1N\n9naZ4tchMqu3wX1z+QqyA0aVH3YnmBtKOyGjp4zFuE8KC4kg2yPuLB/ykKYR\n2X4/RYH6OthSa9okudig3a1xcuQBC6AznW/wzBYaaNHhmjkTbp0HRYgWkNY0\np9Y7SsXPkI5EoPWOY3PSER/YAFYHm05zyiMOkz0DyNO1Qg7u5QiGD20WSmOc\ndQXLRSHWMxhNTuKSUEInZF29uf2yQZQ255uDLBequmMdvGP7LeRhyffxxgR8\nxlHkuIMRVok1hktW2XiG7SUIdhnGOEZLhqNZE/3to1aE5pdYeIVmTNzAyCvE\nlW5p0pyKKZTsK3gTDoy44V29fOwbFGKm+Lh9qFU4yJU6ZbrDrgnZKgm9mOcR\nuzPc1VxldGfw+cIPxi3aGx2k+C1yPEn4AA2DIOcPQ259IUfkul1doo0nu6th\nyF30ENdc+zzSNBV/DiNzzm2fqxe35T/t2ufeRcbzLNIaGd1b4m3vLfMKXtoM\nLoTh\r\n=wJdL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF1CUGsgEPYCVeRxLX7fxLzlMsXqJNQzq69+Qua5WsG9AiEAuEk2ucJspreArdbB0qd/bQV+icTHMIrZ1v1fCt05JNA="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.02aa8a98.0_1583535223706_0.20176873025374986"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.7cd5aad6.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.7cd5aad6.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.7cd5aad6.0","@material/mwc-textfield":"0.14.0-canary.7cd5aad6.0","@material/textfield":"=6.0.0-canary.17b9699c4.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"02d47be94c90a6674486253c11ed001b63502d73","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02d47be94c90a6674486253c11ed001b63502d73/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.7cd5aad6.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-ew//cDZ5pgGEe1WC9HxC3gJPzncv8CjyUgoCyFHEC0S1XmNrcFrInZtiQrnI4fkdN1oESovKh1Hi+5/8o7bygw==","shasum":"00b0c2ba879be800fbf35e66e07112b661e9a5c4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.7cd5aad6.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZs8/CRA9TVsSAnZWagAAZlEQAKL1aLXcRXPcLq98QuQq\nxD474hfBFo6NoVmbvuWLBuO+hWGKw1Ig1TIQR0P020LWCJNQc/fSrx6LpfLP\nkE35+MzBuSF4mMRcmJhYcaHoZparoeQ9LPfRSYCE2PVQmwK+5b7ulMAE6GxI\nOuUE0HAoAb8oDJq9OWCrSIP7sEIliObIurofPlRPeeKV05qx+cGgdKDwzHU7\n+ogWNJmH3pbjEjy4JsjQ678US5Cdqwcs5pr6xU/2TjPL3KINLd1j+w2dRzGt\nVjV9B+odErA7OBAI0JZ4kY9zWieZlZXTbAVspYBkTqb7rZybC6u+N+kXbnlM\nWx79GrlTHvr3lvEyxgZtBaB+jwRLrRtAYgpcQQWiuYoCUGKNUXuGHDt8rBgB\n25yNmISbqc+eF6aty87E/IMfFAertG7mpvFON79EsFN93V2RdoS2y56mMQQx\njDDBZHrBzvM7/zBZ5FEDhTCGSffjiQ6z53m57u76mHdToHgSSzuu7fjF36Q9\nnmgwpK5nQVYEYa2Q6IpLMc10Eipl+vrYYTPkxAgaUvKQHw+fb61236IUbCtg\nSi+LnS8GtfYmHLqyb2tbSdFhVY7rz+tMbnKN374MJXquVgTFDA2qX2Zjj8AB\nH9xhAUUFpHd/Ctgxj5cP4TLiK/fTNQGcB5qGufj4njfGujg2mN9KGR+ntjYu\n0XlQ\r\n=qKQp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDauaYYOC4UxDHKLR3N2Rqd8S6MvB1ssxV/VilrnqJPAIhAIFpjBvKoqqmkrSf4huYgHl5gXfkgtud+PniOGhsyMX6"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.7cd5aad6.0_1583796030801_0.8444141064825847"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.3a79dfa6.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.3a79dfa6.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.3a79dfa6.0","@material/mwc-textfield":"0.14.0-canary.3a79dfa6.0","@material/textfield":"=6.0.0-canary.bd33cb56b.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d8c4d68989d9c1489104002dc0f43cfb89ad0488","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d8c4d68989d9c1489104002dc0f43cfb89ad0488/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.3a79dfa6.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-E33cJCZyciUGUVEk+2YOEB8e2ZIrC5H4IxPUPPagYKWyUhaFtr3eRFPtxhSBlKjEAajy6/CNStr9uiBz9hLB7A==","shasum":"0cb979ffa348c824852f3812d311b6d670e31e03","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.3a79dfa6.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZwHiCRA9TVsSAnZWagAAkSkP/AmZUgXJmlDsaTYEBXGf\nYJE+arwTSWX+Bz6GoPC755v2dKKmkEgxtrS9YFPn3lKMrx4o6Lsllgsb0yiQ\nST+cImNY+lT64b/Ko7W5yoSKNgHGj9rEMSzZlma/FKqYtEt0BOoU4m885oOW\nNnCPLm6Otuozwtlt/YDK0X1V+0s4HsNXllU998TC1ll/VLKbkZsUYO2MV8nS\n2dwOZcBB9NCetzraSkmKxT7QF5kbgHXJUOCV+fjwaR/rqTsvAvm568vGDjWw\n9deVlLbqAPV/TpnV09x6c4YIzgqJESVqOvwQovuyeuo/MD4QZ94RUksn0KZ4\nNkE95cA0pgz54D7vb11M8nRL7Dkc28k5Aixz/hItQ7L/312NusMvmsIAtswi\nERFXOGlTKPJPY6KXIdetqVstaSQy+Z0fX6VCVjlTyIdTxgbe/jPAd0n7YCMd\nsygykZEIVA3IVA6FfKN7XSpqtzc8tVI1RFC+zvS/3vG52DhDu0q42V3E3fE0\nmZLI38TQNXOBOCiVvwJPekUCHUH7hPwSldgYauRraTbPZlie9oQzVi+YhbOS\nVVw6G6fovNpXE5pdhUlYUxC1kzuLDW30qXbHPFO3ryz8L5u21Lic1tWn1Eic\nhngTSLkh9lxmnB5zbgj9u1PHcbRPe5ugECeJGNr7eujeV+EnM6Wqs9rIesRp\nbpqg\r\n=5B9z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbgzsRDUkZ2YdiJ/xzeiL90Juog0IBytpZ8Ev/xYywIAiBWW5VPBKH1Rn9F3e9yjyTZVjNRfmF7JDddfbSmaiVUsQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.3a79dfa6.0_1583808994370_0.45335157339312837"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.22e0f5c9.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.22e0f5c9.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.22e0f5c9.0","@material/mwc-textfield":"0.14.0-canary.22e0f5c9.0","@material/textfield":"=6.0.0-canary.bd33cb56b.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ccb096ae11e367b4590851e53c023abbb22d2774","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ccb096ae11e367b4590851e53c023abbb22d2774/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.22e0f5c9.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-xxgcmz4XWSqGNBSAtvDU7lqS/lVsZLLPw3Okq9NXv80ub5XH8yXCGhrXWtJGME+TjFQDhDJm/bqgYAaiBl847w==","shasum":"cd4997f793dc91e64b4ea78608052db87493ada8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.22e0f5c9.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZwLTCRA9TVsSAnZWagAAfKcP/0YgfhC79qTQSS+XIb6W\nu3myATG8SD8OXF00dZ9zxnYn9OBbVngRdlexo4vQcrGwZjBUPaaZ0GxCET2e\nJ47bmI2AtF7cizLF6jXQjDSyqBDdc0sVIzA5Ib6Vvs/qa9O8nJ8I6XG+Hgdy\nvn1Ppf/QBomor66L2+DrLo2erzOpRx9Rhth6uuDOa3TBLeyEdrbaKodHumsh\n86g1b4OqJtN+QtumMuMNt17k+eaODlhWTlYYJL50Xld2MYLM40JNp/nOfgur\nXSp9twaF12cbuYl9MjZKjf8Kf+Z60ilhfZlsWYsS1kk9JFI9VioBrq7ckAXy\nzXDqLwjZEG8Xelq3/15G15/AwmVj0c9Mhcpmd12uISNWzi92e8zxWq0/l2ib\nzjohtAQLp+i4z2vz3S5f5EYC7Lz8d5MtQNHhBEcZnz/XkT5E5yespy5fkCIw\nT5Rqaor31wkdeOzhvwYI3LCfN38AHDEma+T3qpMgMLRWma6/sB87lxzPG4FP\n7g95+qYjDcHwI5s2vINrprr9qSSJDDWN5ydt8Z46ZMAHTSZxHirNNx7clFPP\nscAKM7UwJGmfIeUUhTdf0jXYp7kaipH/I6oS3HwpEp9jZRzJnWXK/17pt72O\n0/tprXLIMsRso7tbC+cJkYtoC1xBefePT/kDiUTSbPL54k/c/1CSpJP4//5e\nz+nX\r\n=DbfQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDenjYmh3J8YqmzyxFfnA7JKLE4a0hS3E8xH1WRam8PiAiBFst3qqoXTbIWbZ7bXeO6FGYTIP74BL3nroDWL3AAR7w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.22e0f5c9.0_1583809234841_0.4091077393700302"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.f23a1d1b.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.f23a1d1b.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.f23a1d1b.0","@material/mwc-textfield":"0.14.0-canary.f23a1d1b.0","@material/textfield":"=6.0.0-canary.26c049afa.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"625010e9abdb8adc901198fa1ebdc99269b946c4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/625010e9abdb8adc901198fa1ebdc99269b946c4/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.f23a1d1b.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-aDVATyl2KCypfF3CiS/sZMIKkQR9S751ARRssi2XHQbMsI0iDAjW7/4WiwgcHA9kLkK3ie+CZr5RFh4F43Ou+A==","shasum":"ee22d582eb76d011ca529f32b329b53d44640e4a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.f23a1d1b.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ/8UCRA9TVsSAnZWagAArBQP/1u6XCEDM64gMZT7t9O/\nPWhFZ22C+aQAgK1021TnyHrBm4nQ6iuduyzk1YSuBmyM0tJV/6xKAaN+Um/2\nSCRs2PaQVntAWrlROUvEhJSMNEQvdhFgtZ6SprkdoDEmqfhvvbY6CXMnCAzy\nv//+ab1BCwRv84eU1QT7qW8ceitknPsUzp11ZDa4wuU8bGDuna0WYiLwF0kl\nuq6U1ETiXVJxrDO/TkBgQScn905ob5oQZovISucIgxGuNgJC+rPAZGIBdyf7\nzzlCMyKLXQCgJtI2yK0KsjlJye1HzVGFJ8KSPy6NQ3kHY9QRgX7YPU46O16K\nj5unNYYKGs/ZVJD0Z2kzDU43YIvsunjTjmCvL0ieQBbVbHYg4o21WZ+mKW3P\nlHnWimGl/vFcsyHifWLSSP1kURMRLpkGcG/x0rcW5jgYXNd5uTm35+5hr6CO\nRO+DVYqfdR7OW+2EGfGT5vpi4BmC0xsoUzWxWZN8tG5yzAvVDxM4Zf/ybEsb\nxj1Tk21SnWHbDwfA8S68S29/jCyXPIUI24bjvVAqf8U+XZnnG3i1yVEpWC2+\nQ8m37nUZ09IktMSdfsx3rsQE6dcO4O7NtATiH7U6SB6atH6J4gaQVG5KhI/b\nz9AMNhJ8kXqmzllBWUV/S1wlLTnORIZw59bZj/pbEfktFvE1Qi+nDZwVO6ze\nMHNp\r\n=UHsx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvZ4Kz9yqoQWl7SgO3O3YYaiYGgmdlJpeYUuQRDFxjJgIhAL6Uh3LhPWy48demTkUutmaoNfN77IkEZFzaQbNEz5qS"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.f23a1d1b.0_1583873812282_0.907088415820194"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.34b2d69a.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.34b2d69a.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.34b2d69a.0","@material/mwc-textfield":"0.14.0-canary.34b2d69a.0","@material/textfield":"=6.0.0-canary.26c049afa.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b40bf9e324ad010a2ec93cf8677b25b843ad9c46","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b40bf9e324ad010a2ec93cf8677b25b843ad9c46/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.34b2d69a.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-WlXFFaCO1bB+5wzNs7f+AIWFNWJPASkZ4GBx2dfGRstvYzVhauq3lGtIgc8g5P/l7C71q/7ru2cU0fC5YHeK0Q==","shasum":"d69106a85155f224d60619831209488773f31524","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.34b2d69a.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaANZCRA9TVsSAnZWagAAIs4P/22ofUqRHreE0JAJoZ/Q\nG0e9GSGCiPJrQ/af2zXv4Ch/kHnLF2IU67Ev063OO1rWCgqmbYP5wy5xnxb0\n5394kwSTBf/KmKFuzsYZG6bZGPpmJEuK+FurhO4+8pIfI9LDXMZ9Sdy2SPtc\nx6YqORAY1c9LXx25aK/vP/euzvsPNAbezBqpPyxLIiLrieA3nK4/O0rbecQa\nLlR2tgQqlcHoumBUj0t2gA4R7Lyi9S0kjyydVncNukvpid33eYEcliIRCdu/\nmXw6AyjDsopijlOKFyclIrYI22ILTlhNBmjhH86aHYzSBwjDNWVe2pEzQ4vB\nRxfdK5tD6SE5fEBGztFpD453wJlC6S5XbbC7Yl09pX0POeGJveaHvVY0BWke\nHwUYNV6mS40du069wMbtNrrdOd0EgWic0nlJHMbhdYMs6ziXizSi/1nFEldV\nXxFdJ/spRZeObB4p/3Zb5I07V73L0oUrkjPg2842oZabfEWpH4Sq/OE1+fRR\n4hYjyQF3L4ClTZfngEeY4PXJ7rKgHYVYn6agL/yqIBvIvseQWkBf00/PM6xI\nFXTByGb4wMf9a1r/oACX5ESOsfZ92xhx4S1xPGa5kgV2x5neLQw5woV0WExp\nci2lktf9+20mbYUkHdfUZGwwhdKh+KtVJS/bVMAe/7GM/G11K5Zupyzgm1va\nrz66\r\n=q7TZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAPo4dRetj4KXN9WwRlFCcH28y+VfQyDX2SS3xcE+3L5AiEA1Q0EfT0K/VIouk1EXCn+5RbVm3R5Otllj96DBEB4Hy8="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.34b2d69a.0_1583874905455_0.8377267481455224"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.dc04abe1.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.dc04abe1.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.dc04abe1.0","@material/mwc-textfield":"0.14.0-canary.dc04abe1.0","@material/textfield":"=6.0.0-canary.1db5c9fc8.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"83603c5af2141bb893dc17dc4ff73baa5dbc7b64","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83603c5af2141bb893dc17dc4ff73baa5dbc7b64/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.dc04abe1.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-0bZEfYNy5M2Y/iZY1GA0t9mGbpnqfa3tELwDU8Hc3lhsGxf42wdjMjA2nwdKZKfjUEcXTTBJvk+bl9srHG6b6g==","shasum":"8313aedd5540e9f096973db27406ac05a66eb2ac","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.dc04abe1.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaA59CRA9TVsSAnZWagAAnN4P/Rfj23lMQzGlOspHJFy4\nyIiVnC9KJ2qxmox/yOlyar0Pho/0YYg+lSWXnfThdQ0RC+FpeUE6198H8Hn+\nQnKCpg7E4gA3PCZu8t/ypRtXf2jNxH9q/mkrsaB39uhDURxIZnivLWKZW5i2\nac/6V+VBa/CffO5SQIvConxKYeGLK153EGAZ0mE2vn+kgppNGn9gLJp29QcA\nkLSpkWPh+U11OfC4SLwVXQHG4N+XjerhX7uE7pGG/+BMkGDvrPZXjz9cG/ha\nY+7XPjQMnXpnGo4FKtUsl9ttOuRIL34nYJzTugeCSiIbndOo2fnhWtK9ldms\nTuaaKbw/EITFRyDj3P1z4ic9GvZvHquymB2bbt3HgeEfmOjkdbdeLGH3KD+9\n9tk8np1PZ1idziuHt6CwfkmyeiQUg5f9dUkcGGiUAjiemt6iRvxlLEbLYc5O\n81+ysTV6V2Tv1lMvFShF6jHrNQtHyZxUqNoznO6tKGKKGIxhEwQkQDtQKIg8\nhhEe8sAvW7RRn4uko/5fm1KbLMQEt4tS3G2zBxW1nBGsv03K+vYC0a+YdtTB\nbfaxGY/JMZnJ3rtPwCKFK3coopEKlr+VT+MeIQheLuALspKJIVe8eFKQvj4M\nWFpmRS7Vmz4lej1YLuD4JloZejSVInE0uSMbcVJOjurhH2WUbGh347vR82an\nbQZb\r\n=p1ga\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkCxAkM7uls+QyagpmRP36q1JJhuY8NeZfU5mnRnuRyAIhAJytD09fnHElL9kKe3+m9zfWenJnQwIP+Ql3+iLbmKUl"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.dc04abe1.0_1583877757521_0.47770510303891967"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.04ccbc88.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.04ccbc88.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.04ccbc88.0","@material/mwc-textfield":"0.14.0-canary.04ccbc88.0","@material/textfield":"=6.0.0-canary.1ae8130ce.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"bfcaa800a510585165a925b6961a7e6316f30f57","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfcaa800a510585165a925b6961a7e6316f30f57/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.04ccbc88.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-unKzW47/bSGIiHBGR5Zxd3elVgnu8P+e1ad1JadPOdHauldFpOLNVNEx53ZmWSFYW1LziooBftmFII+8cBRLAA==","shasum":"29d18bd340399df926034d271e6c3de0f700d49f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.04ccbc88.0.tgz","fileCount":16,"unpackedSize":204632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaDJACRA9TVsSAnZWagAAPRIP+QFAJUQBKW7oJINmVYWP\n7+FmZsg3MpM2hO413sT5GU6Xbyk6C2i+evLNbRXEIWxsjH/Oq/HH0z1lMQBn\n+BVz8FMtqncJxCE/8cOCFdYLW4+4Ynh69ABVzG8jKdHli1jAdyWZoTcfPncl\nYx43HvfgjAAcLzTkStgNekdGXB/Vy44sp4HO3h33+AQSaH314T0YWcokdbeB\ndGJ1FG+VtN6j4PKoGk1r4mWwKhc3YZrfqT4eodaWTZatd2kX5FFrI8nKFS1K\npghtZ+tegVn8C8xJF8TBzjyZ6ef2ketCAOvt+1JSEvD4uwNcfViALDG3+Dfi\nb9ZfNTF/Ha0E0Ir9/xzFDetJWR6aF8QS5eRvLCR2I2iKesBVudrVoxwf9tIO\n2i+Ns8cxl4nYOVtaZFgyCxOCEufZZ4sjwG5B7KTFpENzoMCXZbuC1rRPeuDo\nVtLhpYtEewPsGdI0vCE338x1CdepsU0KJWUL2Jb94PB1jYDZSNMN9N2y/zB2\njmSPacMBvBKqbtyA/lhU1oQTybHa/88RoeB6WvN4qhMVhbreXOyst3xM8ZD1\nK6jnl+YtaTK4DxSatGMDgcJVB3GZrPgy7XZQ9OG5uUNXpuzpsIAM4C2f8UOF\njO2lritnIjz+LDteNnnrpQXEOeTMXICXd3/yJh3bVK6jvnaNUX+1WAHelZHz\nZBC7\r\n=BKOR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAUcFF73Bjs8AbEks4++i5+tF1q+MNfyl91EztXPcTpQAiEA/dA68sPmQ1yQ0hbvXcZhKgjeL7eu9UMammkfRaXjbnk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.04ccbc88.0_1583886911921_0.23875338251629508"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.55338c25.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.55338c25.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.55338c25.0","@material/mwc-textfield":"0.14.0-canary.55338c25.0","@material/textfield":"=6.0.0-canary.1ae8130ce.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6251bd82d8c2b37985e6a165d6904180ec7a96e3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6251bd82d8c2b37985e6a165d6904180ec7a96e3/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.55338c25.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-M0Aw71rQ9jgmgLJVjLVrSbDqsZLYyfqLdHF84p02bUMeAD0u3qCIsyFxlAp6f1yRj8rxJXEJuqpTPVpmFunsqg==","shasum":"601a1d41a3198e23aab9e344376c3e1d640a13e0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.55338c25.0.tgz","fileCount":16,"unpackedSize":204653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaIXUCRA9TVsSAnZWagAA28YP/RZP/QhJiqHMJdLvlPdR\nABXuVUlE95/2IxAWcgGVZQ16rJAu7jsuPNSJsB4xdCxD3mOOwsKmR4QYG0SO\nX+wUhT7MEi1lN9ZBTW+v105w7URy2ugucwrL18NnK3Q4hrOvn/QL0mIib8Dx\nq8d9h8+oTf/X4wyTooh5Egz84At2A+616eJ9d3omDaPqc8Qsc4oSivB8Hbv5\ndZfXrEwNm9/tt8564RN+3GQwN8Aoo3C5NRu/FNgPgnHwvblP2PJIlU+ArOZd\nOpU+xohGOcGPJWLZ2c/2vWLyiEe6o8LpT/ine8BY3NiqhgeRfdMe7FOE8+5e\nBRVj9uFGb1vnGDUIWfH3d3TRQWSjiskuXC45y7vHo1Q6ZyMQc78+4uKVk/xL\nd5aT5oVKgcWwtnZeJZjpABt50MVbIPzi1h4Gq94hOrAP5S6CdqC9FGXq90Qm\ne7hPLoeGrMP16lLD0A6K9P7SmbnmyGvIMddb2MsvL8K2hask9njD9BLvWUzr\noLAe+zPhX+81w8aifB1JO5bw8mHFDJpZ1ZxtNd9PO1L6/oNppns384VrMSDr\nki0+ddqpoFYY2NnH/YFV2Yn4mo31ehg9TeaOABBxCV2NPS107govJ7/xIeso\nyBbfiG+6e4zJgjNA4CNnNQ2j5/ezbfAdGoSjIIZ8yXZ34yGFz7pUciSOhZtV\npwfm\r\n=wci4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmckG9gb8TA9Z3remF+JHp+Wdbqb8gJTzme8x26oAH/AIgFhbruCmkTkKRGbomIzOBuhYoED2HhSHaK+IBux6NVqs="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.55338c25.0_1583908307732_0.41535418006817104"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.b7e388f3.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.b7e388f3.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.b7e388f3.0","@material/mwc-textfield":"0.14.0-canary.b7e388f3.0","@material/textfield":"=6.0.0-canary.1ae8130ce.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1ce172712209d5abf28a65e797f46fdddb7ea704","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1ce172712209d5abf28a65e797f46fdddb7ea704/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.b7e388f3.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-PorsycpqhSH9VM2rqToXi+HoUB8DI0CQmfoDqHe/ydtLTNNUSMlZtSUicpuOWqH5mbLlx1YDCXMbbLL9Ne4R0w==","shasum":"ab28a33c172246c5d261417f5ce1f4b7af8cc4b6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.b7e388f3.0.tgz","fileCount":16,"unpackedSize":204653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUf0CRA9TVsSAnZWagAAkh0P/jcryPZ6UIkDDr+qDu8r\nWW9jGikbOuiPfXkI9ONAkIqNFC0i43I5UDXKLBYbksiOiLYI++T/IJHd0GUq\nUQFBYGfsSgLhfKIkmEbKiYLh4IACKR6cbg/YVDpM7VO8wUbmAsVIyZSFGpEF\nqcldfoTMJRm23IoezLj9mA5AKXfAcg+8E0UTRKgE3dlGuAEKOwlOXAHXSvTX\n7nviDJNDxH8wtFEJzwD2aVj6fQHqkslcIUCCxGLCYw+XyJVDO3KzX+gSsLXx\no1BZHBXOw/5mZWhxTJwAYkujStUKmXpZu+nKJq0lTzj29c+npALfUew5G7/s\nKEjw47B5NdwNoOmU5reGlBNhvrziaP6dd0E9KPrOQK3aSOg7+3DTr4Q1P44Y\nrngPuNbRT6qHk4eG1oyeNlQbvsveWnvaRwRP4oapAtkqTbNu0kyhV65RgUAN\nUaENiPLhSBjsvbNQd7C+DjeJtxmOj2M/acaQylY4nuzITA9XlAYu8UESe9a2\nbEyYO8WRG+s8tAXHKTVjAsizJeaj1jNElI9mKlNttFjdH1i3vCVJ+o+YRtpL\nx6FfKQcXMfoBMsED0AJuI3z1DdqJK8+y6imBlGQ8uCl7gB8eY7PQC6O/Ca2+\nQUcQHjiT9kScms3i31GxW7FKzgSNLxL4033vs3zO2djkn0Mg5S79C3PNk3Hu\nF2pm\r\n=UDrB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtFDNOI9aihJ/lHtKEb8uiaxRlGdMlXzeEY0THEYF3uAiBbWWjmXoZ2LkPX0PTmMt72WqHU3+1o+RYD4Cv2ibxUJw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.b7e388f3.0_1583958004613_0.2928625893445189"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.b3211481.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.b3211481.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.b3211481.0","@material/mwc-textfield":"0.14.0-canary.b3211481.0","@material/textfield":"=6.0.0-canary.1ae8130ce.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7b6c73b4ab63cb7701379685a556ece3324d1c22","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b6c73b4ab63cb7701379685a556ece3324d1c22/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.b3211481.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-upi4Dh5+NrqgbMyJueQF/g8Nm1NejtN7l122vE12jdEFWA5/b0cu9BYwh/oZTLcge6FADxsivLk6ZWdv93POoA==","shasum":"cd6bf299b03ff0b524dc66a217637fc986567216","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.b3211481.0.tgz","fileCount":16,"unpackedSize":204653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaUjvCRA9TVsSAnZWagAAZg4P/1gV89O+KlGPL81TsotK\n6ZSHoVdjaPcoboiLocp9sqm9I4RJTaAZSl+gRT8KwQvoBCkQfgwnvAZ/Gy2l\nN/pxg6HbbLWsZt/KQ/kdaEIJ42ZDuz6DQb3jWRbAeLiCiJ7zkIe6SavqGYRx\nJaEpE3GAmdUYKlW3+4BTY4MGHkIRM/1TbP33nGHgFChJ94jVWMztqcEVdtNB\nst282BtxgdVhq34yUIRGN8g8834UiFamMzWvX9K5uYeJErkYA6SY5p7AFnbz\nqs6RAU+z/C8Gz+QLGWYHd/sXoociM78TVwmTc5kaVnOI1i1f2B5AkJq4twl2\n3l3abdg2rc5FZwVhFJzGCwwkTfxge6jnqJ6q8o/XQOw5gRlVwIBcjeW/EKba\nWmTIh6ThG9V951gLsP334M8psEkfeRm+6VczJvMF42JDl4Cd4e/3+naIe0Dw\ntV4N6LYG4xtnetttbTvpOngkJ+hjcLge1pmGxKF8HpTZZQQQ+6yx1N8W2/Q3\nw3xO71UztDCEGc8jF7wUHZVq/f6HFWYvidYD8MKUT/WdPfkSjRY+ukclhLE/\n6LfTC1Jael2VuAmMGPtGUaVdW1z7hSJwT6HvERLOEUJmO7vPzfM1HG87Y1AD\nsrNEqLQmQuHlA6dyQ0xAD7jaIhSMX1tW+mlMxKWbYlwPMR59jYjPd5SgsxZT\nBUSi\r\n=78W8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6QxhpVoW4/eDVbTOf+oolySrnJfP/782lK1kIxHnfEAiEA5JGNO7hsY21hIo+A0D4IL4XIr7zwgFKq8h+bnLcb7HI="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.b3211481.0_1583958255165_0.18215968117560055"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.0b5c7f23.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.0b5c7f23.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.0b5c7f23.0","@material/mwc-textfield":"0.14.0-canary.0b5c7f23.0","@material/textfield":"=6.0.0-canary.d5808057f.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c142ca8fe1db14da6fd164a99ca71277489f9b16","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c142ca8fe1db14da6fd164a99ca71277489f9b16/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.0b5c7f23.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-/swZf6IyLwVV2WN7Qy4uVEJrQ988ppdGGAQtn+YZ0asery5XFyKDNAGFRXefyQX1MCNen7nLpmloW++OCFwmCg==","shasum":"627cc4f7c3b51090cfd1918b6d093e11f03f4873","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.0b5c7f23.0.tgz","fileCount":16,"unpackedSize":204979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaV4CCRA9TVsSAnZWagAAL6kP/314rF+r6hNgDxiBdr4g\nHUvwFURXQLuSJCZd4DR18yKotoSdMwSBw1uEY5/7rIRVd9CiGK3k/n4wOqXB\nHHOPQdc/ZA7BpBfL2QWEU5mF4YsKER5ti/HDPklSSTr63u67khPW6vP9xqE7\ndA5hZ+fwambfmg7xPsAYLFxVmTIVpKQhzbDYCoKhXtOovhhigMhFHvyWEyX9\nfSlu/mTuQDq+M9mX0CiraiTgoK3id3/fnc6JO6KgsjOHjLcqrWK6O9zDtNPr\nR4Q1mje9sdpBTPQ5CnTXoSZNld9f7NQHjjXfP/YLnTAlowmYyb4RUhBIIjiN\nIB0y1MMSSIkKfFx3YqvenismVPKCQnAimJbMh87vQfk8asXdJHoFU5rR4NT/\noaVbf9mA/tzQOc1psrSbE7qtqDD6MjvRKsZKMhVRrIfXL7YWqaEsxErlDW1B\nSfEkp3UvBjwlPaMwE+ZQGkHqtVv3BvOauHDNqPYa3Pxm1a/LSwi8lhjfTQhb\nfnPZlfqmvl4J0RiPlHph+1wA1Ec0tJKQX13wMC3MD+qJiJkSMzvUDs0AQoVR\n7I6qxVj6NpUNZUTi+6IsfE78vbFLf/b/k/UyZ1VTrqFUAQMjEUR06IM+/fVq\nJ0wfWJ9kLkJUG20KU0GjwZ25rGbALKF4SmUOfGA49wgeIjprS+8qbNDwMF6W\nWlk9\r\n=cvcG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK4VqxJNG97moX/JVtKy19L6M4O2wBjPpgSayJiAe78AIhAIgBIxwXuI0IQhWZkQOQQhot8UcRyKyNW6xqFUzdhgNK"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.0b5c7f23.0_1583963650110_0.41240888658020913"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.6c0f0b27.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.6c0f0b27.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.6c0f0b27.0","@material/mwc-textfield":"0.14.0-canary.6c0f0b27.0","@material/textfield":"=6.0.0-canary.bec065920.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"642e3027b591cf821c0ef159a9bd31f56677de91","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/642e3027b591cf821c0ef159a9bd31f56677de91/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.6c0f0b27.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-TO2OVFQBF+9NkOMvz2w1yKBrPvA+QRvRCKg0pvXVz3CrkmjazSh7Gdro+nBPqKNpf6U6iwsWXeXBCqaUuRW2GA==","shasum":"c7dbfc5586e5342f3228bc7094e710b50f587582","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.6c0f0b27.0.tgz","fileCount":16,"unpackedSize":204979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqbrCRA9TVsSAnZWagAAu3UQAI+cWz2wi7gfG7KWkCgZ\nC5SyjNccts4ZZEnTmASyTBS5erF+8DbEkpWFXt7bwAHGCIdK7+PUK7X4YoGB\nWJIZq7visUSkuYtMazps78aOzG24UaPDezaesCv7FwNIdPKEOxEBXX6LEb8Z\nB/hO06y4u3IDS2QxRq1euRJaAWV9v0mpaZvCwvfyu35KjG+Rlyq2BUYQxyHh\nTEbwKi+8r8E1poN89C2Em57zDWfALxfqBo0bRNIsiOiUjq0a03lcS1hwZeEA\nu5BK0u+S55X//SwOBEYS+/TRaeV0bx5gzF77noNDgebq7pa+Gv3DFq3b061E\ntl7Bnd3V3OvKmtDjI5dfGhgjyYJLvaWlXF1QSX4Smw1boR4jfMmcpPfubWOR\n44MhPWv2UWHWRw7I2s2PubeucIEPmdUVpIhBpuj019ZbEvUD+VQJ6Dve48Sd\n77x6pZi+tYUtg8VXtpBNPVwJLI6Ieik5KEZsSYCVUeMFohY6kitvibR3xNpz\nfRpho/dOXEylaJ5Eo5fTXABVTfRBkFhguFMYXiZROV/+L1vws3I8V+n3OiDx\nmOCypIBe+BHo7zFqZPTDE3m+tc5K9d57iYN+ARWCzl765KUnlMUWqvyW+h3m\n9qCBmaT+ju1S2DU3Wq5HJZlkpYecFmac6FPYcqRJE0+PQEUPpvYzuBTagN73\n22TW\r\n=4HGE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOYb9pNwLe/2s+dlL90YoPATTwEaYWjPEDCLIyTrjqkAIgDnpY9IjzGgSz85teZdWopCA/Q9OcF4sirz5ULwwkr6E="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.6c0f0b27.0_1584047851317_0.6987409638574555"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.b6c53425.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.b6c53425.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.b6c53425.0","@material/mwc-textfield":"0.14.0-canary.b6c53425.0","@material/textfield":"=6.0.0-canary.bec065920.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"21e9310c19b1139fef9125fef8610235d0ef0e4b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/21e9310c19b1139fef9125fef8610235d0ef0e4b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.b6c53425.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-7tvCRnRVL4+fUNG6/fwZWu91GKotqb6ZAjWzE0q/LuJCLcka7ZmcKOMjgO488afEWDgD1rlQlB/bMZDe98+54A==","shasum":"25927a0fa7aec6e5192034c0d22cdf9e121a0183","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.b6c53425.0.tgz","fileCount":16,"unpackedSize":204979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea7sKCRA9TVsSAnZWagAArboP/RrKTXY8jlQqinMviwGt\nGWXgdnoV3iqo83CPYXcGmNKzSK9NyW2xHZEAKonG//J/zWZcfmqewBbvD22K\noJ+8/6HabQIHvaOo3Ozxh7FFrcoCjGMmcwauvvU0KTUmYnWkwRduVBnU64t7\nbpLEasF8Ksvgef8ORh//XMWQa2m8hN0xzbWUqYcKXjh3B91jXDwiuaovr/YV\nqsjj+nuvlxjAVrMKdZHgyW+Y9Ti5Ar1LmKwb9FB78TDZ0eNTVteB96CFZytz\nckkDUkfoM95FNDL4kLBY0yaWD5UekMzgy5MytNMAlDIQ/bObesCglbvJ6QYL\nJo45d9FvhULeVz2DiwDr3twAaNDSAF3/akLrm5JMNqpSvsHgUu4QmljtWC3J\nlqPYeeC1QgY/FwJf7XKr3NluyTKKo3f0g2Sqcn4Pl7z9J7IaBedtpvh75IWg\nO7TVENb5sSALrV1nW1j+Ko+/AvYysSTnZ7Tv2XQhuwqHz1DCW+AI48Mf8qdI\n75k9PwGaL6DsvKAXUVrTrn8QY2d5VoA8R5ZSMrFUg4YKQ3ejnFInt3As3EXG\nC2YZ0ymbYbqKudIXDw/GnCoKRkUq0FaOrilzpLeJSlpSI9Cv6+niZa1VZjCK\nrldAOnRh37YrZqm9xm6KjM/XUtff/yE/gETcfbw3cqmbrJLTXVZlsAMzZ9fR\njZz5\r\n=QKBd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLdGKG6f73zqYLIqlcE2HHsn1x354p3hrfD2oCkD5S/AIhAJRcGlCzf1iC5KZEsbYzIQcRXObKPhzjxE/c01j5ir6j"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.b6c53425.0_1584118538251_0.6041068011784185"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.306cabed.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.306cabed.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.306cabed.0","@material/mwc-textfield":"0.14.0-canary.306cabed.0","@material/textfield":"=6.0.0-canary.bec065920.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7b07db227ed0e98a8a55068a9460e3969aa14b37","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b07db227ed0e98a8a55068a9460e3969aa14b37/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.306cabed.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-y//eO2jdZEo+eweQgzOVoMnwdQfyWLgWCXpEqC1SWYSFUMXCaDFDev7WleplsLi00SstE0lUEwEjczBhzRK2oQ==","shasum":"5a6eaeff851036d18432501a267d00a4e7fd7a9c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.306cabed.0.tgz","fileCount":16,"unpackedSize":204979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecT6JCRA9TVsSAnZWagAAbY8P/if8ULEhKWuzbq6rjEpI\nYQhXRn/oEnXCTGnKi6iyRrMNPfu5uAmUS/3a/B2ryQ0Hgkt+AdUxvz9DtOPm\nJIQeTrT07dKSQ1i1yeEirPvb9n4p51VcCTlBt8QX5t1rjuovj5emDvLlpL6J\n3pAKZpKGBzVOuefYi8Pswyof/o10GyPMQpL3WdJpnkUWE1hrXK8aPqPbaO4A\n1Q9SHOAlOxyMQU55QPimowkQ7530eeUEIPHAByfy+AmQYMhUFee/4y6ZewX9\nhuDkn2DbHZ1Dk5fwQHtWOqhdjsZT0N6I8jZw+lqm3S/fTjJqvDefEz6g+5ln\nXIm8vv3F5SW76j/kuC6t7qB7sF7xrImdwDqwwMpDpvF/NmXJsMVFTVkBVnbp\njVBIYA+XvGC2zlc3FnYHrKsCz7VU7TUbzTjaE2acGE2FwWpLdKZQCb8Z+ZB2\npxAt6OuWgDBhwcOj/oLI5vsMD6w86pvJZ5HVbMEYnLWARh23dCRP9l3UQn6x\nxPRlgIdgGK213UoaQ8UnO/j87AR44kgEgsLp0lE4Xt95MsxBfJfVI5nBvR/2\n1X6jQKXxXCEljJqLD/s4E4Pwc9J1dZh8aaFXvl9j3x6GtczPI/UZO1x4Dqtj\nV0IAmHuTi+Ftyv9J3AGSaWHM6EwCF8U/quF+BjRokFKq+u4aQg4qS2CR6X2j\n2rqG\r\n=dIuI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANdmRyUfhQiHj9OWljm2nUI2/PY9o/6EAPZWgQun5OGAiASfr1F3d/xEk6QAWcNSa8gWlzNOsAxwqjh3litaTUJ0w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.306cabed.0_1584479881336_0.3147223617722599"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.4e250cbc.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.4e250cbc.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.4e250cbc.0","@material/mwc-textfield":"0.14.0-canary.4e250cbc.0","@material/textfield":"=6.0.0-canary.776291ef0.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8e0b10a13a5b20d13409bc4bec6f11a4ff757663","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e0b10a13a5b20d13409bc4bec6f11a4ff757663/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.4e250cbc.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-Zps9nHMMadT0Gq+0kLJcjsbay4AT125T1tMUTPFYg6xiUC2gDL3OfuBQgacU+lx3l86nLuFaYj8MvgyTaCNFOA==","shasum":"a2ee1a42c1cab4b66aa70622c5de0994a88fd027","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.4e250cbc.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecT/+CRA9TVsSAnZWagAAri0P/0ShWsoI8lWUJbhCJDA8\nLr5xYSbKPCGSv/tKKcsZ+0GFJKXJnkRGtQAEYTwCqQCzcO2iapdehkPUR/AO\nHpsLvOZrXXEuiBxNx6lneVlRgf8bVb9OkXd4C6rdZVk7JhJp8XX6dgpq6W/F\nBeD/1XeicIAAQO6E3FgFuM6kuGutVQ9Fq6CuDsUyPuFyrJxMvDiAexw91o4c\nSuRdv4w+QOmIa0g/QFbTXwUh/HdiZOZSGOvDyrnT8HFGKx6G3K91RA4jYPxK\nui31zaC1vUynPvqoLosKm9WI1O7cbEDh5ZlArFOdIrjkodrFYyiE2oortxVc\nSV+WB06YAU/Nn3qg+Kuul7KW6M3aDVfAXncFBDNOfikuvnWjKNRqgHvfeuq1\nTtoPTAoUP1iYfCUmrypqurVF2t2mUVrahvnewINPl6W/UxyzO6PrOHWL79kL\nBPmwwNgrMZey/4SzJmTcQMw5bKiIk8DhOtn9LscSTNiD3Hs0o4HH69UmGFK3\n9+Jo5+8WQY+UvkqX/jAy5X9EedH9kLO/gFs80EdMOArQYUelFQgrdShSlLMv\nH7712KEjM6eD+87v60wsE0a5RXKiyLk7X3BNAr/QJ8ixVriVoP/G9U0be6Ud\nSkwrl4jAxr01lu0OXvLOBVXh7vUkcVEpVkKn6IaVfZDGUasE5xn7MzwZDMxo\numNS\r\n=fHZb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVW7mwbuwTQkK+2Hgo/k/gEGtgBm8chjTyPp/uRy3CiAiAO9AnarJXhgkE6Wl9myIrQCG+wiXbKjbZuUk70Vmllwg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.4e250cbc.0_1584480253588_0.17452695497443593"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.ff82d9ec.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.ff82d9ec.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.ff82d9ec.0","@material/mwc-textfield":"0.14.0-canary.ff82d9ec.0","@material/textfield":"=6.0.0-canary.6b48781bf.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0af402cd2ff3748cfa5f7956ad2211ec9271c83e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0af402cd2ff3748cfa5f7956ad2211ec9271c83e/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.ff82d9ec.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-YUpK2SxFJsaVlUx5rNvb0OVvzDhz1WqZa2kktTY2oWNqPkhGVOFvXEjjovA3FE5nsiD5pv9LgGxMUJJllyaosQ==","shasum":"9ab2f78eb54de883a58ab52ad69c716d74df9084","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.ff82d9ec.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecmZOCRA9TVsSAnZWagAAgQ4P/1FNXCNtImBZ0CqtvEjY\nFCnpjxpIYqWEBQrWuVZcAVf1wDXHEf+FC9Pc0R/nLnmOYg9Byld5952/k5jo\ndN5en6uwMV+VAINQ3Y0VZ235NjBjYJrxUn0zK/R2O8vMUTxEdjPAbfX/G3tn\nUmgoM4x11kDdto2dAHTQ/RusNBLFsO4PfiJ7wc5T7HlNAt6iXMzkA3wnOsKB\n83p/+Z/fuzfdztqVlend7xSXny9jcZWNl4vvsMK50Xr02nfgd9a0cG56AdMf\n5dKTTtCxx6daGi3ED6LBR37Mc7+9IY9ZmnfFzg1zC4nHzGWmiw5Wh9hFP3sa\n3BhSoJ3i5KGeRalLnvmc4aFR9wTQZ5mj0q6hM1/c4nfD4sMmkQBqwsREAxv1\naxUzNRM8BkbVqAb3D6Hj3OFPrJA34i22SMDZINE3M9Ceqo7k+pj4shL6bUMY\nAmWcqQG0ty7rZHo5sqHDFDQfIKO7y6UwkeBl0rPE06xzZgAqNu6sdjNSvPk2\nJlqzDg/8rSvKApcmboEepxfut2cOcpWcg61G/EVfjkXvqFHofoAkjFNmBA5v\nSO56/5AS1jOhJfy1PIL9td4rxjSsGpxZWAePvwOpTbAyP5wkxovtlxFkTYmh\ndkz0513rVoQLzyxEFIP1bd0o8Xd61quPttummHobBRMWPn9S3a54WzYVoJhV\no5ed\r\n=YW6u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKC0fhc41mypJNkFdkpfETh07dSaJkIH7PxIUqz1QCIgIgPQKptx3ecimK2qvCc0ChkR4KoDbpguC77SdgYJ3kYdo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.ff82d9ec.0_1584555598564_0.1845185813862098"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.f50f48ef.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.f50f48ef.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.f50f48ef.0","@material/mwc-textfield":"0.14.0-canary.f50f48ef.0","@material/textfield":"=6.0.0-canary.6b48781bf.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0c4d2eecbe04ec4e08549650e593ff154b7d7e84","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0c4d2eecbe04ec4e08549650e593ff154b7d7e84/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.f50f48ef.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-s7P2d/vVpnxyH8unS87FsIxoLoh4uEoTQCdVgY61yQB3gSVgnkpTgZY9z/6XMzGurN9zJKvdr4eYrv8Zw6Fjtg==","shasum":"1122944dde302dc6877bfb51c366b7c6ed5d203a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.f50f48ef.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec8AsCRA9TVsSAnZWagAArXYQAIajkc4v/l/vamf+rF/J\nYihQyeUnb3PsT89GcpprvbrK3rO4A/UL2UBz8yP6IN5FP+CH0E3ubtyuhs2b\ntXmXzzSfhBgdKl2zBH73Pbw9nzHkkOoHu6/n/b1N0W2eLpDc6HMvKeMPPFJN\ni+mDIIflDBWDwHuS2O4YdFfMmzLYg5mNj8SJN9XCxNKumw6yhacYjr2FCXGR\nmo9nftta1xuGurIQZ6J/Qd78ktGL6ZHfKn66q9lVH6vKakqMcmSMH6mgpgaY\n/pVrjfkBGR6SXI/CMfNqSBoWu5F3331We1bwb2PAHL7KB0wcuV4BuXQfCSHD\nFCRegFFOrL+8UzP7uYGENuapT294KzcDElA1Fqu5/P6UL006INW4m+u3Vh3b\npJak9z0N7afPFJXVUPDWGizOk7xyONM+ipkk3rOAzZ+LfU2cr9S87Tw+sUKj\ntZhwPlm3oTMNiIF5o9gm4vdJi+L0y/W275DcASoUAJmxWmfKBnuXSL8UzQp5\nV9MWVE0SkD9JF7HoUQ1E0RwkeB7XZc+/zjv3ojAYH3XwDjxC072Xs0AUFsC7\ngOWQNQwaFnpgiqq23hb5GZ8n9EkPSkCr3NNaPOaQzfWId5yfK/MIy6nRrq3i\nQmJDDWm8KCtQ54yGKWQSyGNYUwZVAOg3DQwNPNDyBkMBCU5Fitl+fjsA2sn4\nAovE\r\n=cdys\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMetMMugAE8PFY9YRk48OldRoIILhXyuFwU5AZ5rDuDQIgLi63UlS7YuKJDc72jFINGzS3qW4usbuzAhvBaZMZoiE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.f50f48ef.0_1584644140302_0.6775186066389063"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0-canary.134cf877.0":{"name":"@material/mwc-textarea","version":"0.14.0-canary.134cf877.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.14.0-canary.134cf877.0","@material/mwc-textfield":"0.14.0-canary.134cf877.0","@material/textfield":"=6.0.0-canary.a88c8e4dc.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c237581285beb5a84c39a5ea15dc95e9a865e057","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c237581285beb5a84c39a5ea15dc95e9a865e057/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.14.0-canary.134cf877.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-MQbuDcAzSqRTbQp1Hb3H3C3qOoYPWNjKNNyv4b58ZiYMUsgnVNaviYPRA9K5bh+mkpqYjLMCtvHEV3ed0bMvDg==","shasum":"64f6e51ca7bac0ec615688cda9de9acc4a0101a4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0-canary.134cf877.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec9iECRA9TVsSAnZWagAAI54QAJp428t0L2jKu85oyuYA\nqBqyII+lNDiBVEXS5CH7134i3Gf5XgQZP4gSj+xZk7p6oLSmAX+whhUjSLJM\nKE48CthDOycogB68zq9DpyMdRWvAg7+wex7RiCdYx7P9BkTIKNZq/kx6a/f6\nMOvutdfYeG6ron+j1G6JqpDex9LmSX/1ZP186yhE4c8rX7r+5xqoWo1tSYSF\n4MXdAlfOGo/l5B5aloMnt+ph86dJnmM34ECtqI3GjT5rQnqNI2MB1h2HAsHq\nF1qNxHEDm6Z8nHU9+Q5uq4DH3WCenYO2DUsNZvGHieyGW3L4D8AUcrWGP9mI\nEwRfZkI5DEkZfZ4cQcoDCHGGGjsQoOCUxWXR0bGu576oSGxqjCCJogbo6oTt\nNSfFfjiZWTKTFTJ2AQ2x+rq35GPiMFSRAFmcfMq+N9+WsB1+/qDT4Vem7dFa\nOhsofmZoy98zEtNQ7VZxGj/3/f1F5kO8YiYVNX0mzW2jV3Saqu4P2sGSGp0q\nfYtfq/LsZqR0MPb6w97xywNzQRcPqZ2RcbRClJ1mcc6zKlByfiAiVl0TpHyQ\nRMT923BO9RPfEaIKyI0i3tuhF+mSjWgLs9pUxRoIGmXMbUiqcx8MPrkK4Yv9\nS4WQ3PhvbkWY3SJJ4Yh+Mtw3E4nBGGPmoPaGZCWPd4AK+pJH9MBqibG7c7vR\nFsZ1\r\n=vxmO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEbeaEbU2xEGEuRHGoG4T7321bZKwIKAyYq0SRg02aLgAiEAyuHvfjH71fHp46R9Sb9YhsS2/hdAIqaM7RCCuibRARg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0-canary.134cf877.0_1584650372008_0.8430077833837724"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.0":{"name":"@material/mwc-textarea","version":"0.14.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.14.0","@material/mwc-textfield":"^0.14.0","@material/textfield":"=6.0.0-canary.a88c8e4dc.0","lit-element":"^2.2.1","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ac28113f4d46ab2f986ce0aade128eb66d3017c0","_id":"@material/mwc-textarea@0.14.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-0ERQbw7KMgPz84JZZ9ec1pkvRN7O/gImhTDv2B3RUKgAnFhY/rrgNGTi7Km43tAcUFxMNmnc2/GPUFWKMUkQIA==","shasum":"4e78e1bbc1969cc8a85d5bfeb4c8107eb8aa80ef","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.0.tgz","fileCount":16,"unpackedSize":177642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec+QNCRA9TVsSAnZWagAAz+AP/Rh24sWBo4PX18gvSEz0\nP3n5IAG9Je8V9r8ZXXdJuq2b05ZEUPvd8zzGgRJNSLzHn58BbfPXLIvz4KpV\nOnqNznPCuBHVM+AwmhneqgxX33Am4GIXKURqq0DSVMKXKlIg2bS7KnZA7Ewe\npC2Uko7Aqc4IsQwb2/c4ZeKUi0Zs3sEVKUd1DQbV0Nf5ISaiwoGCiDeHu/7h\nPQAVWga5WB+H700zG15465KD8GPp209VeNm6wEZIWZny3SdGCQpHo3Q/SLRt\nPkv5cb0b5YMOkFfrbCZhvSO5bXkQnkQv+03ughTDv+kmeHYTcd4XRNT+z/KZ\n0cIeLt563mnkwVq0PR8U6/1AG3czvGzBjr94EUdfBkmaEpfGqzcERl1gnXje\nKzK83VdNpUy9rPDKNSTBAB63CLUGuUHDS1o4T09ehB5E/BbmjrJM3UPWOFtZ\nXcAon2ry85d4xYrun84UI8LSOn/v8cwg1fO/sXGEr4J1PtH2h50zIX24GBSD\nqsTxvJMDszMhfRZhXqdAknfiXIM2zLUu9WPbiToF5UghpTYjP1tLkt0tUpPA\n6ErGuPsb31UGH9kSO0e9OpsO38SvFISl8T/+T3XagSRT95q91xjHBu7camoC\nacmjOSUEkknhOZXLIFXLQ3VRcpaRuXSQHDnVgRYDSbXBuZy4mZMUPbonovkE\n28pb\r\n=mv5r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuZPyaiCcmw/YjeCmfKQV9SrtjLZkdBTMKCp4kmgqORAiEA1t6MxiqG2pOiA5fEB9JBZ43uy/HKEvaxUvNpXWNP5Y0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"azakus","email":"dfreedm2@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.0_1584653325381_0.3277306929522992"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.2c1a4913.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.2c1a4913.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.2c1a4913.0","@material/mwc-textfield":"0.15.0-canary.2c1a4913.0","@material/textfield":"=6.0.0-canary.a88c8e4dc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8d9a4fb2b0ac4979d966b16e203b2dd0f388554f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d9a4fb2b0ac4979d966b16e203b2dd0f388554f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.2c1a4913.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-ELNefqseYVIMkb/bvsMxoE21CHmcBQbwMwfUpl+0CCVrIFKrGPIRnzt05FtUJXYCoLoOjo5KAigFnaxVKVqG9w==","shasum":"4e1da9453e2b3c3aa417ba5f7edbaa683b9d4578","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.2c1a4913.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec/m2CRA9TVsSAnZWagAA5qAP/1U1Za7PyI9JWFr/ag25\nWWCMAdrBgH5wSV5nE02LQFhmKe4iDVuaW24UrOuLQohCMipWFCcFWYBoUXsa\nfmzUvumDe7kr2M2DnttYit+7S34d1+uag74Z9nJKkHShRw+MAA5VNDYhEr/i\nZV84KWfoGzm5utkrYosCxsNUpkmkqq+Qf4GmmKP9n8Uxr33TNvaV9Ej5mddX\n5Lx5/HtWvnp5vyGKVeDqXGdn18H4oZaacjFkT+Fw2OXfaugSSdHwJci2bLs7\nlqgavTA1kRyWkatR1EOtQTsRNOb4jf6rh79/Z00Pg0L8NbRxoJ0bOIFZ0qir\n7qNm8tAnT46qkj+SlMmCUdhvFZ9Cfl8Tu8bwb/yPQRbxptBcsFRPXCNsAApG\nn/HgWhjxWKu9pkuewRvU/IUKAmpSEztKWyC80rCvRfOtVCTtCW41C5RTXWgf\ngjPsQ/MzCM8bbONifafQhpwgi4DXh7NX8d2xYpX3hDjRu16/rzIDTf6ik7Ky\noZldGzs+JyRCJYgVcuW5ILpZYK77TVAAVld4WOydj772PDpYiPmu+jQ37lCZ\nFXtiwL4pZJnmZ2Xej39Tq1AXOGnTdu/LMaifYn4VJEXMUbIZMvn91suDX7/7\n5HmsFXGJGbeJHw1a8mAofa2g7KbZlXdXOdI0toll3Dq5S0QN61o650izRjRt\n1C7b\r\n=kxg0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADJaJHFHHjeWTCPzfLqPH8Kxao8QwhdEhsKAz2nwdfGAiB+zbM68DWmvQh97Cv7MvnX3aHWs9mu79OJtQz/6riVrg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.2c1a4913.0_1584658870536_0.62890729819401"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.3a6e481a.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.3a6e481a.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.3a6e481a.0","@material/mwc-textfield":"0.15.0-canary.3a6e481a.0","@material/textfield":"=6.0.0-canary.cafe18860.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0d89a3406dea7d2d2540aaeb339072cc01d18e2a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d89a3406dea7d2d2540aaeb339072cc01d18e2a/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.3a6e481a.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-+DI59v/NODD/zZ/52EFoxtNK935UmCC4kiwwuBb2FkPwEfGPwi9rW4dTipRs7zehJGJjSqXqyjBPgELuMhcjdg==","shasum":"52d92a6fe37e031db503e755cebae0b083607575","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.3a6e481a.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedQfHCRA9TVsSAnZWagAA1OwP/AooHySJXyw4pzUwoj4l\nESXZV8CvZEUytOaA5Ic76DMrR6H43EYv596GKawT6EKu01ODWB7Pi/Js5kCN\nCqDYAXXiSd8RUdfxunUZ7Zdc55hCU15tikhldbFBBBHKWtaCZRHA3Ae5h0CE\nc1UcddBIq7UsNMvbJBf6P+oo4g1NYmaJzY8FiFARChZs7v7ThFWgdYh0RTg7\ngGzf11Y1ySIWO/cEUm+8Pkmkh8G1TROBrtAQh4FG8aK9jgIr5HdYoE4af/vI\niqV/wUQFDfPxnb+KPnCZKby3oH+RgkoHIiq5LDVa3KEM0XuMcR8MW8DDkSCZ\nF7gOq6bt/+bE0wo6n5XtWl3RMIbV270LvIT89LlevRS7lOtmorYeIYF1dU1v\n59olYsEjEmj9mDCi4UtrJG3ZtyHT/F7Giy1oIhELLXaNSM0TuDUBmSm7BgCp\nVo6ljlv29QpHMH/dgY8OqEib5ngJZAPmVsruo6ZKHT+WAirMuNTuLt7ZVPCL\n22/OGcOEOfZXmpbxiwQ7rDRo2qK/+Z7rpse1RjD9wkGH1cfDoElpioa/yt8u\nI+Z71zSLUHPwrJdU4ZpfoB/pFop3AQa1qpmuAX1JziC+6myO/dOUSiN71h5m\nGTUxioa6Meog+r/XGB2jHvzVmeE6oXuyaMNpva9Sf1Fq8zYXF2GfWbkl03zF\nKYBs\r\n=PhZm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfTVLlYXMuZp/BNsJKJtOrGm89TYxtczUDpJ5m9GMyjwIhAJHf7TjfQfJG+FNTUP5w8StmDCC4HxKvPMUEoqDLiwmk"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.3a6e481a.0_1584728007614_0.4883284093878957"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.603d6eb3.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.603d6eb3.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.603d6eb3.0","@material/mwc-textfield":"0.15.0-canary.603d6eb3.0","@material/textfield":"=6.0.0-canary.35a32aaea.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c12dabbae50536d5adf2b5a785d4a5009e53208f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c12dabbae50536d5adf2b5a785d4a5009e53208f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.603d6eb3.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-Od778AQfQq2axxe8Ros8FdAZdx6WMZtdNuxGN03mgCy9gDJuO26A7aGQpWx2iJxh2uFf+SKfXXO9lyPJ+Oee1w==","shasum":"e315cc6f88c7c0674e2ed913d05f09f9d53db8c9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.603d6eb3.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedTdLCRA9TVsSAnZWagAAKbkP/14BnZ6DQEE1XrMsY9B1\nCrNV9XVgSiUSyC5qZ9MdUOSXwR9FHXB3SeDXaZEd4L/U0cMk/jyic/wStMg2\n/xOD8AUAh4ig3N9WyTgGcwMTtoBgyF1TwycGnNACncsabCxGOYrXT33HLGYm\nNI2BbmmvzIQY4bL6RraJ7wJMeoYV5onGXXcQ1qYbSW2eJoZVRcWa0Lcf6lcD\nM181KribpxGJp4Naow1Ulv7H2TwuW6gCHCoEwVLGQh1DRCAY8/tQezXe+OGx\nSZCfier26ko77+h3QXCmuy7TQjeEEfiaMZVvx9CjIMBoKYEzc20/QWK9GpeF\nQoBZgQKvFWEaHnJZsdhKa4dNKB+0DkrB0V639ovayDe9vsUmiuMw8vOSCTUd\nFIC51ZAUkmycyVNPrCKlinJ5I/u+Wk+XT56zhdBncaVirSgNI2LrhY+IYJz2\nOm3ZjuxqukIS92C8YsC+t7QcRAZgLbi16Nri9L4jVaguWCb5op83ZL4d8Hvd\nKXHvQBhJaG32vOpV2biplopYw9ZxjMkOZUGUFxsgd3LqtN4kLiqR2nRHSIei\nFoBUL1DdEvXCqo5s0u42DdpqGMWzz5rzh33ctL/IOLwoXP7tRj4c+4OOUVdj\nKil+4lTq+tvBztOWWM54G4jCGrYrGN8ALhCcfZrO4dAPs4zPGro6Ju/Q6r3m\nhu3B\r\n=GoSF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdATcyceXHV2yYqCyxYwrIZLY7XTzPqBt2zTlDNcXGzAIgLTihxnTKtAlZ5DpSkIdKpppG0ubgkHFlxRZBbfafXA0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.603d6eb3.0_1584740171316_0.2067875131347059"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.05c6a93c.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.05c6a93c.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.05c6a93c.0","@material/mwc-textfield":"0.15.0-canary.05c6a93c.0","@material/textfield":"=6.0.0-canary.35a32aaea.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"62ce85b6b0e7c20ae9938ba7b42af970a40f1f00","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62ce85b6b0e7c20ae9938ba7b42af970a40f1f00/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.05c6a93c.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-NB5bRA3xNTyyQPSpG02kOuhl+UCiQkj2zmitAC3sEK6oa9gndNwvnZ+Y+YZBFDidciHYAfWTd35GrBhn/f15pA==","shasum":"c5a7dca67db4242afb6ae2e594e18cb706d372e2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.05c6a93c.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeOWeCRA9TVsSAnZWagAA8lEP/A+IJ50fg15vQCXF1Nf4\nnZvDiMt0zG50m35Hc3zF0QuCQrKXgp5xoB/F+mnxZfVR1A/IVVIf277rrHQ8\nJccEJl1fEwfhimoF3rO504Ai8Zyat6b4oUx33wl7ohHH3kt1Qw7cUfPIj8GU\nKxriN1E6X4oY48y3sCVhRt6Zci3RYwpw2xTfGwi59i1mT6cflLzPLPS5jKyC\nXytbHhn0qenYyterSiQAOJencZSPMELVZoTrtwHiUy4ovedxm4kjx7Xfmt+7\nhDezTWqEWhb6yuJd9/RKMTWcNI837sUvIz1fLVHfvOdhD9sSYhWcvLXMGYEJ\n/kPzW9V+/lSHR54+eoJviyhzqRcyMeW3PTEI+03n5mWY6oHaZvlJfT+et4rM\ncddRMyGltyWRxf01b7Fr0eQ4jCSXrI4VBjObVc2U3n2XsO4a5aioeT+g6scc\n/cRc3smFTrvrKhcFr3x/0DlDPfmoqQgH9mqlNRU2uXxpnoyiI4XHirlbWN55\nwmzijWC5BfRdm53E6U4NuiVFrtPYQM3S+/eP39Gv6sVDljTVQDW9M0xyMJwr\nJPyEICInHlp38w1xY/EuKFr8tBivopE2J4OvhFxZNwLZ9K3GgUBuZHU/GR+1\nWIaS4qfRioy4bKLGBiUNtjMatuNJ2wcVGjYfC1JbboPqqNNPe/27pOlmFpBW\nO0cN\r\n=W8WL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE3dDVWIAFitUoi55fdlPaqhd7mUl2JkDl7edc1btVLXAiAsKc4IeMXcqkXts+y4HuQgymbQ/oYBOISpuTqC6ljiaA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.05c6a93c.0_1584981406418_0.5887802170861844"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.14.1":{"name":"@material/mwc-textarea","version":"0.14.1","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.14.1","@material/mwc-textfield":"^0.14.1","@material/textfield":"=6.0.0-canary.35a32aaea.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b0de4ae05c3088b277f5c20ed01e4d684cc6b8b1","_id":"@material/mwc-textarea@0.14.1","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-+taVTUtx1tOnXPEliQTyunePhWvCzoLgaUPMV8f638bhD/GF6NJPW7UElzov9TgvmLo2QLAgRPdkhbmeA+0Guw==","shasum":"637b279f4eef6f7e86aea8334f7408a6b97bb2ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.14.1.tgz","fileCount":16,"unpackedSize":177642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeePibCRA9TVsSAnZWagAAaWUP/A0PER7e8rijh7EYBHJo\nZdvpPwF9vslXKyHayFaCQGu8ONO5UXtmNxATwICP6IOsBsZmwTmruPMuXZzh\nK/RjJXR1QpFk9UCpf+P8VnAsXK6BtbFXiVeiqZwaWAPyE8PW/E74SML83rkH\njpeI2hmGv3zR197hvtKYsjPQY/3Gnzraki5aT32lPOPU08wPqJZBnhlryA3p\no33JOdfIe0LUMlnkWJfPELFtX+r0Po0vFjQycyuoOgeps1giLnyG76Q9C01C\nGWpp3CYP5EBynefUy0BXvNNFQFZw98qKg/PBw1AjlKJkbgF6/DQ3qpVBBEI3\npoNKW5fk8bpexOEJcopBio9++hucb9cw3jjLncSBEtsTE4Gnkd/27oVCNIvx\n8S4kPAA1A7U9RWrYiZXqJhhWWYkLuVaRFeCXwzI3cqyV3GojIcNkjOAgtBd9\nvyBNHMR9pf45t8jbpCYTLUfHy+srl5pjtfJ3V1WhMC7XCQDJLAvrP3Q5J9fy\nCV0YgdLC+8ZS6K6f8YQ9Kgz66KroNRJl3klatNuVAOM0bAqrHS0fd7E8T92d\npr81hzBtV+q33Twvram4GQHymcJOrxfgULEz89tDhc2Zeu0MiJp0qzWH6w7W\n6zIOS8NBWgrTdvDFm2+YbVOH1/bWuLgcktYCesg3rQ5lS1LtCc1O7A/vCuhY\njC2E\r\n=KwN5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCp8HBE1HbESo3iNB4axWOmkDlmfzenjSpOdxC+pZusowIgNROqZ71MffYmuw2XlkxjlyM+z2Qkzp4m0DolGkbTu90="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.14.1_1584986267180_0.07279257737964318"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.4e6be3f4.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.4e6be3f4.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.4e6be3f4.0","@material/mwc-textfield":"0.15.0-canary.4e6be3f4.0","@material/textfield":"=6.0.0-canary.35a32aaea.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1512aaf308db7992eea7201d4af81bf1e616d5d8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1512aaf308db7992eea7201d4af81bf1e616d5d8/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.4e6be3f4.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-fvfW/KG2mVDurHh7AgLpaJ6nU0vpypZeUU/Mt4UWMiGHAYw8QPEXuSkdRr9i4EA5mUi9cqzagTeS2YMU1qkCoA==","shasum":"c8bc6b86428123e1519a2c36eb6e3278d4a3df42","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.4e6be3f4.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeenSdCRA9TVsSAnZWagAAaF4P/33+Ahl6PITck9k3wDV4\n3knSboQOq5QITGufo0XD+hnRSxEdGUk+kj9hK3MzBpNOu7U/3cQsKfnZ3SeU\nCU5ch/7eEftER2hohORbVf+zB3GacXZPVmZldkZZYjcZJuVMedK8NthJE/oS\nGqEcdnNIaOMhpV8Q67vW5KIM6OQjXyjdmuW9VpZzr8pN0CUnE9GKsajBg3oT\n11+NJS/0CB808cKYlMtFJmlo2Kqf3ECAZ9DwkzFJgQEd+W2irb+dV4BUbB4M\nxl4trNWxIVWtNtso7Nwk8STe2XfnPDIw4C3+BL8pfolzf7sWVd8fi/hPE3pq\nJ8DWFgVSy3OsVr5Y7hOe6qe0eIGNrtx43jk1n/PAM8Uj8iEzrdt5WX3KZR44\n7oxwx7EZn0acaqMTm8Z9QE3wVScVYtXSfXiwSAul8DF7fz7Cabyvlmp87Rvk\nhXwO8qSmJwnvPrv5fteRb1O2ItzgOOjnUm63TQRu4AhvhQ8ueBY9tntkun1f\nqWxeWdvsDpa4nGl19vFnB9pjkMZWapYx2MTCb/YdtyrG3+1JiY4JY+vEkbks\n1BZvtTjYLZeppdHEqZDAkn2St/VR/sYyD7kqzypW5lwmpkQXkFvJpD1dJ53/\n8FslP+Dls2F0eL1+uB4/8ELLAG1sv86yJVbzHx0CIn8RWDhDUxFYigL13J5N\nIA28\r\n=mcRa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICvhmv76Z/hI9PLDjc9S1+aNlo40JkLFdXk9sgeFW2sDAiA8o5XnqtQCySxxqMhKQ29+Hi6MnkQpGvwJfn7dLC9Zeg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.4e6be3f4.0_1585083549277_0.9762168703289449"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.c29a683d.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.c29a683d.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.c29a683d.0","@material/mwc-textfield":"0.15.0-canary.c29a683d.0","@material/textfield":"=6.0.0-canary.8707953b6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8425a605fcff9f0247ba649d1c8b16a70fe79720","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8425a605fcff9f0247ba649d1c8b16a70fe79720/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.c29a683d.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-HppH163c75UEGrOmLNR4P0QV7R67bkeSxohSgjlev4VDCSE7ucIwVjh+QAhfIOSiEy+VQA/O2AQ/t4HNq+7nfg==","shasum":"1d2e0fe0c530cfed6fdc2ae974cbd9b19e3b98c3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.c29a683d.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeenjGCRA9TVsSAnZWagAAmq4P/Aukty/3HabGWVUWi5NI\n1fsf0aTUeXoEHHkTzkyA+P329tK7r+SK4TH5ltoMHfR9+Fw4hSRwCSFxl3L9\nqIc3OhZW0XA0iWMIKKGRjccAtmAqRe0oqGPqiX9zkrxMQWMWLhAhZ6xxwifP\nM9mNfF+3SBu/Jwe6/t0C6ez6VJo0Amme6thqvZ4n4bbmcHH3mvPYBXYqGxJB\n1PyzXY93D/QXCNzAF6xGRL3WfCcNfoshIOWACztUhPONZL05xGPxFCNhNzis\n4Ym4wki8h15wljUamxSXwFc5ibBiPt/l2w0MVN62KOCfWB/jXYQb7brgVMuu\nX4GDKJ+0ZM66l+kRh3FtpdVgTNPjZ+QtVmXwy6k/vuY8bdtOrq7tFHiYXqNF\nfYf5ytn6WzKtGrosG+CxIfZJJPyyb9VA8WX7GvG/We7QZxO7OKs4tjxyZQOD\nGcvPtlpLczERf/XxfvAuIJ6Th/sdZZc85EcX7xyBd2IHqKkCTN32WR8fuTyi\n0w/L+6QH3OQ7xJeMz19DeXo1OD/7boGucm714A3W+oEEQYEkkCHW9nDB+MJD\niEwdeRWf+htO2CANwjY5dLoMtxBsdDCoLgRbvw4C5zOW6OdEiFWRIGa4Sd96\nn8VHjAkAxRbj4IJ34xULTl2aaUrSy6wZkSrWNPAOQ1iN66GYexTSAQSfdIxN\nD3P4\r\n=9Z05\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuPjjMheHHp9zCH0CC7fsKtFiY8grf01JifntWIXudxAiEAyf2mcKVPl8Z+NC98CYIwUNd28jpp9DkTSxGP5YjmwUE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.c29a683d.0_1585084613829_0.13997724217093688"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.fca3dd9d.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.fca3dd9d.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.fca3dd9d.0","@material/mwc-textfield":"0.15.0-canary.fca3dd9d.0","@material/textfield":"=6.0.0-canary.8707953b6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3eb322e4775d836b8959bdd2dfe63f09dd0e0fee","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3eb322e4775d836b8959bdd2dfe63f09dd0e0fee/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.fca3dd9d.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-CuK44dy4cxeuB15v1EKLxtunKU10D/qtdEi+Hwaeu8ROZc/x7S5UjyipHgDuNlvUQdLcj9gXsfajs9teNCcoyg==","shasum":"0033296743d74bd8394de0da6209db4fd4ae0675","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.fca3dd9d.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeepsbCRA9TVsSAnZWagAADpcQAICT2CNAfaV/9ZKCcgvw\nDiRUVe6sy7TOSfyZgIPH2DUGwvJ0wAT4H1hpVxyHFwQxHvqaf2apBt/W1A6n\nkN6EFN1LZka2fCMScENJwSS/qyTSt4AJOw+jRv7AxVUYCaObANeVhZq4KCtw\nx6r5PuG+efHUHUPoD4tdTlQVWKYQQHN24WQ1w4khp0v/WMBI8FKcZRKgmR85\nhrFYzrPGpzsqLjv0Bv3aLweRZOwIIg4GVDvj6em6E6RSN9cOlU4gzZfgVKox\nJ+mmbsk7ds1ufXcZsoW6VY1+pfT9HIziaO8tzMGEj6mDzJpdhvWzKVcJQkpx\nVpy003Rg2e1/ad1cO3hs8Q216XDlkAIMpusTtEQSwBrrnFxXPaUaFUSckql4\n18p9kTrf8jJSR//7NqXjUhZoytEQGAkI0gxLuWPffWIPpeweOeIoXiEJTJD1\nf+zcAMD1JqxPQEbk0I4P079AXEyr8QSQ4/8joSlBgW8WM/aLBCbLjJNsQTQ2\nqOqaFxJaob/7YZ2rGNhdM/I9hrKmMLWGDCEePoqBNmrnieDo5DGeDtIXr+tk\nfsU0wO7i/aj5xScawlIZBkZyr85yrTR6i3wyvfXtvYEQ69spqa8+84i97Adb\nzLVB4X5/Y1xeiean5JpzKDqgSMinJN0hOVK2LO1ZXrKb/aFeAlOelI5A80oq\nbLNO\r\n=0kpS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDuSVYA9TL7py2wAcCH2obdJLfkQGHQi51xyN2OTTyZ0AiA0wkR/E1mJKyN7vmm7MDDlr/dkE2bB1F5sDf26r5Tt9g=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.fca3dd9d.0_1585093403214_0.5387013098441298"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.1e73da49.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.1e73da49.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.1e73da49.0","@material/mwc-textfield":"0.15.0-canary.1e73da49.0","@material/textfield":"=6.0.0-canary.10af6cf39.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"cbf63b814d242690910ae4946b6144120c317eb0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cbf63b814d242690910ae4946b6144120c317eb0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.1e73da49.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-ogQ4z9+UhWCd5l0IWr0GC4vXWaQeiWEQDTKeDgoO9XJ1Z7962fi3Dt39PI8hBCK2Y40Pg/eZ29lgQLDNlCts/g==","shasum":"62313cd4bfc06424760658059151cc4c3c6afd6c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.1e73da49.0.tgz","fileCount":16,"unpackedSize":177694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee81oCRA9TVsSAnZWagAA/K4P+QF99HM9V3pz395RoXEh\n28O0wLG9Bo5v0vqpyYOq+EAkhCSkLcy2C1CylPhHwIW3spaW+8F6/YLsQKEZ\nIef+eyJ4ERUB3pOZUp4Z6XadzU95WWLn1epUErasCmxNLLnqjPFHYgX3aSsF\n1btUSQleWb0aXzsS0x0bCIlQujB6IkO6gNAF01incJQUTAoknJF2tZ1PnHyd\nQvHkUKJcNl5sdzfEM2DNgywZJCzT8VgXQSUmXqQXvgDw3JGdPGQm1r8YQAx8\nq47MxnzHgJl4zpZ0mle5I4IvYFa8RdVN3Wa75ddSRVzuvM1vrmk4E6RRpxt1\nD7RokStdvVPtRz4j++VyL7G+H1TJRhN0bXt1rqMA2IEdDyKCs74SO5CQRw+Q\nzWQh4/kc37B7eO2PL6VGvk1Q3G3ruZxbVk0a2fulgrzYtFdCunUCPf25YhTo\nZNsOu8jmnKFSGIMkAmbhw4Yg7SYHftJNmTA20FeUZDBaqBISJf+Xi8lFqHOx\n8P+R4kxGN0xVBlgg3vF5hw4zEUDAyESCx9z0yvBokCIhJQkbUiRje3YcCVFk\n+okTmEwl4rZzR2EhUiKSxOA9fHKUkHRqfP/IbL5M68T0d2usOhvLR7JWXdaB\n/fytzAadOhNKgAmqNOJZ/slkbyR6SRDXVy97K/zLwPXk3PwV9uxwYLxNjIoI\nc/5L\r\n=PHUD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHaWjBx9g6ngCrQOkCFz7PEjjo5kyEtCdUGF2UFVB5YEAiB2vyidQt/+bZBpTH634kuaG9S7urFCQnF6NyCOkCjCxw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.1e73da49.0_1585171816087_0.6413891770822029"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.bb6dfc5a.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.bb6dfc5a.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.bb6dfc5a.0","@material/mwc-textfield":"0.15.0-canary.bb6dfc5a.0","@material/textfield":"=6.0.0-canary.10af6cf39.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb2656148ba3ea8e2b2b5053396cd8d9ae8e52f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.bb6dfc5a.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-YMh2ZTFc5bvlkKxVfw5PGob0fXSScOHPCjZd3DLNa1ZMZflx6jNoqaYmb0F2iS6ogd/nKm7Dw0pi83sBfCtjCQ==","shasum":"03886ccc1eebab9746b003d59d669e61474ae089","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.bb6dfc5a.0.tgz","fileCount":16,"unpackedSize":178759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefVWJCRA9TVsSAnZWagAAPkUQAIk8r56cdVeEBMKgPw0Y\niCiUwARprBpv0QGabwwaMEqbnjm5lkpMqZR//lqz6qafAalH3YCxxapiw/6B\niGBrL6Lm8j6Ei17WV9pnLkoYaJ7BI4KiWgL2vEM0cxJpru1dgErsWPV0rn/y\nWOUSI+fWWTPteXmKo942sf7EB7lkorvZpx8En0EPWGONBU4+NTdxq9fMI+8o\n6Jou2Q0hyBto9PJr4QETec49hd12jJUuD9f1ew1w2MV/StIyxpWKQHZ/p3qw\nzuGugLjKJfWIDm8v5T3GBSTWjcjKr3H9yR2UE8iLcaQkizad6FqnZ6/XsZgS\nFWdMtNEBg4LWJXdCWJLTnIKtzIXKv01QYW+u4ReRCqLe6rj9W3aIScITuhY8\nSJnTXOFBvqkPqJulGQtp0q1fCCgma6VrUjE5UiDQF6onIb0ydI/ndp7+XmiJ\noZhHKp4VC+lrXBbSqbEo/gde/59FvbOmliQO8Isfa640P3bxJdVauI/O1bZx\n9PG5lccLXxBlZaje9xpbKW4EvgNVveRatjyjRmVvUauxx+nig/mUEQIHDKiV\ndkHwGS1YPTR3f4tkqP6TTmnLyCmNu/fALmCnMAvsDOnN3v+X71JrXbnNgso5\nMEwbzZJYkae4V4SxS9kh0eJd0t5FQaNVy6CliSOn1Wflq33/9UyBFUc2+AA/\nwluz\r\n=/2PY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOSyZQ2KScibIcwi/nhy92cAPzH3BmlcWjZ7r+UXba/QIgPGuOF/+FCTvrT6089oDvw8JnygMvnyi0D6DGau5hwYM="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.bb6dfc5a.0_1585272201454_0.6441303327705727"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.1884603d.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.1884603d.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.1884603d.0","@material/mwc-textfield":"0.15.0-canary.1884603d.0","@material/textfield":"=6.0.0-canary.10af6cf39.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9a072ce4f7812e5120dbc51ed124d9669e1f7be5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a072ce4f7812e5120dbc51ed124d9669e1f7be5/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.1884603d.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-+XF55h0zb4VUOZLG8KhP09zvQEuciOC8Sqkqc94IGKMcEwWaztnockENMCHp/FgX0EMlhnlqHJjjG8Iq13iG9w==","shasum":"7a2cd132d169d7fd9729d420015bec543c68fcea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.1884603d.0.tgz","fileCount":16,"unpackedSize":178759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeflpBCRA9TVsSAnZWagAA6oYP/3upP5ROcpO6FQMAlifm\nKznrjcOyflHeoENkHbOzxfgV2QJCXsTwzUiL3W7G7by6lA0ktuSHCw9rMv+M\nd84nZVJ5Dl22r8oOMmGQc9y3YuAjuObISQnvx8yZ0iA8cjjQfGjVs4tqfx2v\nwbV34+UfhAkhbiHj/OI808gdMF1U+dCpnPrh9YGDpirB4hqgg06cNf/3LTSV\nukT45BEH8wFHKUagb8ezw8JHeJDKwgN1gjR17CpoCR5BaHdHGkkjKmAmcv5h\nHRyRv8dv4x1OJ74NZdmE2LAMhalWBK1GS0h3MYMt4NwAi40d76bxRWJ0pYl9\nFrS/P7mq23o87idzf9JtE/2Ak+O9UIo0ommiDZASdNFSbHitfqg+FRw3oEXW\nxWIoL6hKdfYcZU0lgLomiegVtFN0yllSX1ayYn3TmFvJsSs4UDBPY2It3H3W\nB1UQAPxML9Nvy2c7MeaW8Wm2JTc3Hmo3ROBXeZ+avWOrqNEIYZtBwYx/Gf6r\nG1BvLDPAifOQSlPZXQY8x0XFmjl6goCq4cs7/l3Ywv07BLo4aUd6QS6o1c9e\nOwJ5e7CN/xOy5SgVqU17M6S7Tnf8fq7qRF5MqU2OHgfJ8VBJ8dJMpDrp1OTN\ndlxpO+TEG21mz/HDfHIX54P4yM5iOkCv/RLAXF4B/r4ziwnmY6b7pkD1anrS\nYjkt\r\n=/5fL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA2OZ1SrQ6lojDcqB9llrYPolxk8udwm7ukq8GL11lJRAiBzbxJRjBSLmnWEnl2/Ro2Bo4v3O2bHxHAem3HxGctiSg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.1884603d.0_1585338945390_0.836576711326749"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.aff73cab.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.aff73cab.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.aff73cab.0","@material/mwc-textfield":"0.15.0-canary.aff73cab.0","@material/textfield":"=6.0.0-canary.d6315efe2.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"40f9b297ee5f13af191b6bf450012454426c44b0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/40f9b297ee5f13af191b6bf450012454426c44b0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.aff73cab.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-QdrZkdj59RLQ1lAjSPhbr7gIG2OlLQgn9qYOw8NCINeeajcQOORzUhIekDsEyDshLwAMhRiL7t17KVbXBet6+w==","shasum":"394d0aed986959320fc6f449a0a343e1a5fac6a9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.aff73cab.0.tgz","fileCount":16,"unpackedSize":178759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefmy5CRA9TVsSAnZWagAAkDUP+wSoJS8R4whQDGAo9o7I\n1sO/xGe6pSayt9jdK8Yh2S0ny/m59OGG+lFIXI7qP6+1KhMbq3K8AsbgoO6h\nMtl/mcvZ5DEj/blcQLhEQ92lf8R1aiEJh+v4bsi76VIEf51+Zp9QhJDY8vjp\nmw6aMxCBh/3zCyMxJ8+JhDTYXlRNRinbmXEe0HojCjjefAgriv6yFgu4Kq6M\nA9nC3ERsP8a8TSh8WlueRbz0QpkIn48qN0xC6E2Yjr9ZB07OI2AtQEzqFaq4\nC69v6mPtBHFlg3qZlEHK9qSGYpCHTOhmFeK/zxge/pR9JamXU3AsxO3jF7i3\n8DkurSHp+Eo/xLp8zjQ2ET6MzvnaDL+RMEgNa+1zBTrv/YSjkkSjN98D7Goa\ngTj/+Y1GTUtyuXCl9J1q9U0UJZwkIAsk7mfo1sJTBDTjsQX4xQxqnCGI/8uz\nA7NnJFVE4YmLAQyKLdJpxRaadiclxfWNANN3zq/ThVCza6yAv2zreUejC6T0\nTvQ3uKKLd18h+5v9Gx9xMsym+DfEJCH/F5frsXKnvPr4xgFH4O/REArMekMs\nGZcDk1ROuRo1yc/klTVX/UIhDSQWhsi9BelsXSO2yyVpl1geB8v+fj/oAfcF\n2M/HyoBmt4+0WpUdTEkglBvEQJZvwnYM+nQkShYMVZhxvboW1Bc/QwUG0pBe\nK06M\r\n=Mbka\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC34xL4kBvehdNT5ltPtSMbrJQ37WlLL3amyEPQ2UyQkgIhAK1+u0nBdTwxM0BW4K+/BS50TBwS7lQkJMvstFmwcESv"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.aff73cab.0_1585343673346_0.4067567003078043"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.63168f61.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.63168f61.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.63168f61.0","@material/mwc-textfield":"0.15.0-canary.63168f61.0","@material/textfield":"=6.0.0-canary.a3016368d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"84107987770a82843942246baa8226b37f269240","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/84107987770a82843942246baa8226b37f269240/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.63168f61.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-tCbA2UzM9Lm6Wqh/ROHZiEMuTYXkFKUZMNnXq4Xwlna7buHA9vccJ9eGTKc6iibl1OoovCPf+O/xHD2OPqYRXA==","shasum":"ecda180c9058b2bf8979afd6ae55aa9a2965b0ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.63168f61.0.tgz","fileCount":16,"unpackedSize":178759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeg4gcCRA9TVsSAnZWagAAYx8P/j4a4v/ZfEt/0DwbhzaS\nq+TisrTqtd2bdhjwqMGpYWv6DvcLUBR6sYDHjEEFofxIld4sFWOQZAp9INVG\n1v/+M16lX11ugaziZNxigRBH2f5gBwEMa4l0qIwr6LwcpOH2uL8xtnk3VMNt\n3ZcbBy/MGff9ljQ79rO0PsxYL4t14+CARwPXUGwZ//PfcGrE1DjhMQJ+TzH6\nl3bOSkD2K7ZRjzO06mHXne0PWoOx7+Om9j5BhidthBp8v0kNQMw0ZCZq9Q+F\nRlUdBkOpRah8/6emlYQpc4f0NDoKCBP6z4edpVZRTn3rGGb81DSAiRcdHV/s\n5VbpCdDj9jdNbV2LOTVMcQFZMOkqQfyKSYnTrjK/IbM6Ku1rIkwI5WynVw5+\n4dVPJXu1db0kYk1RPmR8SVu/Uq9KRT9RAMKGTCCnLntbmXdaU2KTjBzw9IZ7\njOlPcWhYKvOmE6SEpVO1GVMTJGeJn2B+JGQ0WC7qopyD1wZtr2hzcO80C6zR\nnYxTchFE9Subb1SM42eFxPBNlQCjKmI9wEF4TKWSpJTkWLPNjPViLXspidhF\nPX/tbsjH7x/3Zfv45hGJ/w2qce0NqAzMLTgiV5wb+68MLdQFuO7yH86MKAdz\npTUIq7WUtmZ2ec1AjhWYLcdtbxqlvtzlIRi4fytvh6u5lJNA0L+TpAMHy0Ir\nQ4Uq\r\n=JEx9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBvxNzxeVUHZ7rvNqTNzfdX2wENHFo5Dky6x3GYbKU7gIgL0+wgzontqdsXbg5VySTFLJrzz0u5syFgjIONpXUIYg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.63168f61.0_1585678364237_0.3586181555554875"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.9fb79b3e.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.9fb79b3e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.9fb79b3e.0","@material/mwc-textfield":"0.15.0-canary.9fb79b3e.0","@material/textfield":"=6.0.0-canary.4b45b6620.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6669949a31d7f92febd25f5d49eb40a5db4aa7f5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6669949a31d7f92febd25f5d49eb40a5db4aa7f5/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.9fb79b3e.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-9xX8nglKthtJywrAbqSC0IWWfOzcwCL5sz6AWBUWdHPfaU1GlSUZlRhIG20apGRiT7YEavPtEtlgifkczH/FIw==","shasum":"d6eba7c0b96ca157f78fff317d11777f4d702f32","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.9fb79b3e.0.tgz","fileCount":16,"unpackedSize":178759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeg7QfCRA9TVsSAnZWagAAgBIP/R75aV/8qFDoQZY2PtSe\nRDH1pLtQzwiqyP9SAs8s7LL0Lu6fyxJw0JWaR3fk3W7a7Zhw6UHX+uePQG5+\nsk5r5uce3nbbqRJtz3zLURx/zeQbP3lK173XVGXqR/yVhZe/QAMlKN92jFJR\nNwYEZ+5i/j4dpK0YU/YlDM1B3sXblJdPOsr/zWrrpQU0vDdor0bThKJ5xwDj\nrm6O22DxMKvpjSoS31Wph8EaFfsHCttiG/Zuca+U/FtYxrVDr9bdHr8be4bP\nmaTklfKEBUCkTE05VINONlsfmqMYI/0vfvU8QPISQU1l/+OLYN/JUjr4ZLF0\navjUfH52dVWVJZZ9yfoq1V7ayDZVS3JhFsP3/ZhTSuXK8RqIAEYafKNWdicO\ngsvDdyTUnRm+qS5dBNjtfeEF/ybY/QCK5YYaZRp1iu4PHJemMHLhcssKoTKX\nVn4A9T47EEEoMqITpTvXTnMxZDEUoeH7KROXwkUzMM4aIMh9Tv/F45kleEK2\nKuNBZvsVhHS8US5QCel3PV7UbGPhlZckocdgBIllr3Wl/INR2R2deFJ/xypm\n40vD9LDvEyuz3M35LwdxYe7SHDfvZH6TeD4KpWWs/oo54MjP24zUzXJ/vNC+\ndOj+lMS39GWRO1NLuoZRZ8fdo/rqrlxvCjLJw95+jOiY44LieaStm9RIqOi8\nfoSq\r\n=ZtbI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAvPvWwPpVtzO++0on7mbgXGD7LGUw0xlXbcxWWUsE4tAiEAw28nitOaDMPWRCyWojEBJT0pWWZOpTsT0XQ4vr6Rf4E="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.9fb79b3e.0_1585689630683_0.016042771875256268"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.9bd3e9e2.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.9bd3e9e2.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.9bd3e9e2.0","@material/mwc-textfield":"0.15.0-canary.9bd3e9e2.0","@material/textfield":"=6.0.0-canary.4b45b6620.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9b56904aedd36911e83576292843c11af1a00006","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9b56904aedd36911e83576292843c11af1a00006/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.9bd3e9e2.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-hsSwa5CTpX/zXu6n8dcsDsZHoCWi6xOZ85LC5sJPU9YSbcBE6hDxoJfLPrKsg9UQ+gbZbpGrLJg97XH/u3KDTg==","shasum":"f4fdc59048494ed445c22ba16020f86171580269","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.9bd3e9e2.0.tgz","fileCount":16,"unpackedSize":178759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeg91fCRA9TVsSAnZWagAAns0P/R1UrtQeSe+hyPrsY9H4\nYArKlmiuAQYfDuFzoE8kR8Xyqm4MpRsYXVkQt8LOgVJGtdczKmIk7/Pojine\nNAIBjPSy70yyAvRVPq0KXB9R8fyHpUAIgaD4sMITpqBAQsZGE9IQDUH8FMon\nS9NpW2HmtitD3fQMS8HZUmFK9kbeCVah1Yk5lFOhgPE78RvshhO1+u27DQXM\n+oOzpgV+0moi4pyeZNuPESNDHM8ymPOq+XfMrxcfXojPG/SqvunlCHg88U5m\nm8aYj9Dxpykmc8m9Ob9R+9306ioodLOk0FzEoIdB9JetqRP+C8zOklU96rNj\nDhoTigwZ4NWhtOzUUJKqfYHxq7JEi2fxeHTyUMd9FwJipJs6q1ft88lfoOUQ\nN0tS2JX8Mtqjw5Qq8wPiw8WQfM6nTEMQ4RuUfYMmNedCFxSxK6n2cB2B6Vpo\nfcwe8Y7tppw9/TtOKTXVCjlNLPuH4YF5vh1aIXSScD+OqFSeICJtMq80ZE74\njgDHJRpmzNLhsX/H+Sqz6ThyHwzZnUbNl9SL1oZbhnRXhk2zA1ISHzv8uAPN\nXFEfYqGM7PDWGqi44obX3l6JX9owmB+7DBX64rHJFl0sBVk8mElraglEksR0\nekc6SajzENupCTeycPFt0qPogK9ml8pq/cQJ2wDzMF1jnWBRRqBywa7WzuC0\naBCJ\r\n=C5HZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdYrtW3DCdcdn3ph2hb2mjIquAR98a0Gy+qf3UGntjfQIhALdyI1NFKnODPTa4j03cYj7KRq1Y4r0H4XnusQ6OO5hw"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.9bd3e9e2.0_1585700191191_0.7447270893900193"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.072084ab.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.072084ab.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.072084ab.0","@material/mwc-textfield":"0.15.0-canary.072084ab.0","@material/textfield":"=6.0.0-canary.e84b9c8.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"98a539f9970dea2ebc84f30f462c69e72dc0c4b1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a539f9970dea2ebc84f30f462c69e72dc0c4b1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.072084ab.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-PjLWKm+1ZpQRbjkKz7REuunMD8ylR+DSgvBDBAuAS8Ef1Z4Q1mZab5kKUPY29hBXZVxuSnU4oVcbI3QhOhHJwA==","shasum":"d96352c1181a34be8909f4a9f61b6e5fb8450125","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.072084ab.0.tgz","fileCount":16,"unpackedSize":178757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehOAICRA9TVsSAnZWagAAEZIP/3GrMsuNtCjF6/gjdzk7\nvTOYdAg3Sxqfgrp9hfycidPkk2+0b6u8a0VvG06a8GDTsno4zfisnBL41Nod\nk/THS0pcTaRFGXbQbgxp2LzN4dN3Nq/3QqfxKbq3yPzbJFuDJU0qTuVeYIyA\ntyC38NWqJXjUA1W3KNSjgR6vB1682i6bJZDzKNASYYOL3JE57/rzrXS3LWGk\n66XtpysYj/MBNcvTONhHmm8j7s2wy6deqvkFdmLNVfwqZ8gHjhpILKJMR+Mi\n5teeD63zxvChijBrGcf3GH2uHlJRu/4yXQbzv7Z4NSz6YUqqfirNupw20UuU\nk+/uZwoLsuXdD1eKoliRuIi88EbsWhQJ//7Ta+Tlo8OjSzRUCXyPymZdqiJL\n52S2c8RuCuA1OMZrBoNdMdMyUcOs9smsisTbVkqu2BV6kvsP3oQg8vtx/axH\njhcrl+9rOP/D94vtVW5yK+buQIFgCv4no/I7/8cA6Fjl9cODdBW1FlO/kw+U\nCGREZsBOvf0xA9EioyuIVDKtVw+MS4RqXe+/4qkx6d63AmIA40NrqWvLCTns\n0ADffcKsEXSp0j9+zFNYxL6oL2S0kCpadIZaulT49gRe9ANSnzV4IGXththO\nJ3iH8v0W2DrlixKfvbN0XVSBAIlWIiSGU/EOyxdTTS1AO+IMukuscw5lXJsk\nrZ7c\r\n=HAE4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLj4DAzOd2XuiY+3OnLoG8Eg6Kd5qTQK+kizYsAXEhgAIhANYvbcg5r1FnYUyb8FqoFaSqlquCqW408i7aRl4+sSzO"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.072084ab.0_1585766408477_0.6776560866215062"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.4dec04af.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.4dec04af.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.4dec04af.0","@material/mwc-textfield":"0.15.0-canary.4dec04af.0","@material/textfield":"=6.0.0-canary.f1f8e60.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d47dd9ed52c3dc1e1895467031d4a7a1df6cedd/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.4dec04af.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-+Zqdzxc0JNnsQque7EwefE5EZc/H4STqw7jI76k+6Buv6Z2cpSZg45Cd11mEb4cmpDpwS74/eQdc7F6zhOfFwg==","shasum":"8fef3b408e6e45416f2c195f99ebbcc1dcda8370","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.4dec04af.0.tgz","fileCount":16,"unpackedSize":177311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh5zMCRA9TVsSAnZWagAAdmoP/R7jOhbUwPRYjyrJzaRf\nZbnh/VMcUAS50kNpEX+rpzO7x63mZ9W1MPSiz1dmX7AtDXBxPJkyzC1dYdeo\nWTDXnPOpoIJ0SRzH96nJfy2+9OFGZD9wLh086XlJ13kbBzuzzf7UdOKTVlbo\nMjV/kqBIQJE/nL9fvpdj31CPL2T21ce9r1g0uLJlwbzfmIAChtEyz0ojZ+Vy\nbpKe4iba6v/xsh222v+eGeIA4ckfFkdI3avm64424MHvUoesnLIUlNT01xCV\n2bZhs4vdGA88gH/1OrJgnHicdxYxlGmW0+W9dQEV5IEdH9m2lNq2Yows6pT6\nTet57JqFhBJ29nwLKxMwvLx0uzX6WwOWCai4zFX0bN/qQWmtTcrSyBp8SRLv\nGb24vjn0jAbJ5NmgQmHY8PDgVlOTC+/TYyPZVfjT64KuMjW3QAOVpuT4vpXk\nHL62xsOZmgCSUR7WyIpB5LgaA20oZqMWfUS+gTCx/Z9Vt4ZChfD/zhRhmjYd\n7W8LDw+/BRZTCfRIjuyav9RMqC+RJNQ6sGeoaOIT9ZGrrVSTOBjOw4kwLg0R\nAMVxTMFeUJxy9kd0lvj0kRe2c9tFd+mo1OhoMjWNU6DJHWKYmsbFOHGHudIm\npK+5Q8fxjC8vA9K3uta7JDpGNxDyn6HB1JGSQFJEvhX1kxOF+ObX/Ka9SkVQ\ne5mG\r\n=RKTg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiFTdEnuDa2cceV0xGI/Hprlhwb2vbsMaEZ4njCAUG+AIgf3+e7LoocE2CEE2z3YYQkgudCutJvRh3EP84bZecbwc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.4dec04af.0_1585945804390_0.24914312161264096"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.9b676354.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.9b676354.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.9b676354.0","@material/mwc-textfield":"0.15.0-canary.9b676354.0","@material/textfield":"=6.0.0-canary.e84b9c8.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"423f1ad2d234953804097bdb30484154440adc63","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423f1ad2d234953804097bdb30484154440adc63/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.9b676354.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-1CsYLDpCBu2AKiscl2BF6QOlpjAgXERNctF8xtB65Cdwc2jQFEvwtvSLf0iUl83yuQbVAlBbbscDSFHdr6spug==","shasum":"2fd1ed085585a0935a629c952e34d3319d5e3cfc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.9b676354.0.tgz","fileCount":16,"unpackedSize":178757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh5zdCRA9TVsSAnZWagAA1F4P/jHW8BFpWckfUuAcIrbS\nNSKxILzBLb4H+3JLt1grrXRRjDdccOQdpHCjM8/ZSKrPBfyc3vG9W6tuLT9Y\nnQtIc2SL5o7C8dbFc9gatmjXS0NT7XPMPt0P5EN3RkJMHlkdBIOHqlZj8WaP\nQSaZ0qBuIdVH+M6T2TIvvs6uRO0rntHXbn3moMMOm6ex92+n+HRDomxwiBob\naaFzmqr9R0mdwYnHhIbh4BnU1icYKxBg2zPzZkkciGqL1PtLMUVSALksSo2O\nM38h8TAQDiED7Jc3pFi8O8HBiDu9Id4MBrSkTuHT+8PHiGszEcT2m/DPJjmE\nkzCGBZCMzx11ewO+6fEeLRdjvSMTwORQchjT+oowp4JHxh4/RJ6GZ6txsRGE\nseYrt217oIYqrH74HRhQfgt5XDN3C5tuxBIc0CgK+MPRexACqXM8IpawWv/K\nFCTmr/n2mizl1HnQmY+55HDAX6+7fmeC12b8GOR7EHEPzRthLpUmyST3L6Or\nwoTfk2m+Pw6rDMBk/WWvabjiLRFUXYiZrtD4ZOZnC3eIY2Nu44Go2sLjk9kZ\n8GiX2Fnbkr18BAiZy8kA1V78gL5Ux6Pr8K0Ld1GhLYgqH14gp5DHYhY0IPao\n0YqElLoES+c5IP/MjDYeCsnUxV7ktgkmSwt69jpEYHdZbSno6X5fLHtDnPC3\nx+nw\r\n=XKCd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAJGvqqfgTjlondzA0d2omUFt5H+5Of/L7JJalQVMD1gIhAOFrNLbpnBqmM5gGauBKFMy4ohGXifD9rwWlHVa+fElJ"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.9b676354.0_1585945820532_0.28361913752212176"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.6b946095.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.6b946095.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.6b946095.0","@material/mwc-textfield":"0.15.0-canary.6b946095.0","@material/textfield":"=6.0.0-canary.f1f8e60.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1b65dfb6b4d3dea0ac5681487459f46352e399e2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b65dfb6b4d3dea0ac5681487459f46352e399e2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.6b946095.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-T6Yq7HCyy1uUO098Io5fqZTGutHO9WT+UQW69cj/MFZdfEJWhnKSmXLXFrP7KXDtO0Fm2bbrjYAeT9fMG6EJiA==","shasum":"a07500396de9e365655d45fa2b8ffa2f01f3bb17","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.6b946095.0.tgz","fileCount":16,"unpackedSize":177311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh6mQCRA9TVsSAnZWagAAkb8P/A+etk83fmjWphwU5ySm\nAQYFNhN6a59M31s0/pYCf3IuAi5PMo1YCvMRkp2i3o3YIL5RwoWOJEIT/eR7\nBVkSrqd6o9IPW/ssIWFputA3OIE3kWAFLv5EvBU1682zPoyRB6uvW3VGJF0s\n25Xxz0UeENJ2LhRPpOxv6oW7hK6iDB9CBnuoxAkcOR3KA6aDV/P86jeO5ZJ4\n3bXmQ03Bcujb78fhukCHixeCnogp3bvSgR52wn4sFze9SHOVDl/Fmf3b1upG\nHfOIz6D+8xPHfE/TGhbcTE3RNpN1d3uAb0uU9/r5R2DuWe4n/VLB8t3Kougq\nlb6ku9r4lctEHFtGufBnMxpOhmsYDWyYlG80ZjLoJVUzUtu+5DmBlKXYxevc\nZyslcYGsHKdKs8e6WEN2QZkKMoOQxAw8XyUw6Skn/3gMIxderEnZYRu0n9cY\nncG7hsf8SLx+kgE05nrjdAQJhrw+IcDYvs1yYAM1ppPqwjbq1nDsggVOXXgf\nksxFiC60FhWnAOweWxeT7L/Oi0ijEOt7Uz3KRsIbd5EnMNYa453drDpJI4tS\nJ+mKtWfQb+81Rh8asy2yxTj0T26JhDtkyVimrkdw9ioz4W+/k9vxdY6wkfvl\npjMEgPjt7K5CN2JEduVkXFQjY5gKTSlBnBa+voKCaOOm9M/LUc0GjDtjXurr\nbiMQ\r\n=jMQg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDd7AlgqtYVPYytW8zQi62tSxd2vyII1L6lj9Si/TimAiEA7/fyV7W6zPpekUWe4OsETSrFS614KBFXnK5sesuiD8s="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.6b946095.0_1585949072122_0.14597337034791935"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.5ccbfaa2.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.5ccbfaa2.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.5ccbfaa2.0","@material/mwc-textfield":"0.15.0-canary.5ccbfaa2.0","@material/textfield":"=6.0.0-canary.6a40ef217.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b20d3f13f2b61c253e28c5f9e5adf15bfe26d88c/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.5ccbfaa2.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-rBiraJZh0jUYnqtAOTwuLRbnst+kbBNon2+oUkKeU4FcABLW/Gz4QOayrG6n/eKtj2OF02E2H/ZIrYdSlhDu8w==","shasum":"8b360d980bd9870af7a8ef8f35ea6f8e706dc0f3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.5ccbfaa2.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh6riCRA9TVsSAnZWagAAe9AP/jLrOiNzxqce0Y9Ztsog\nA4ZWsRn6a7Lxx6LnkxxzfcConOtAIKcbTN2brUf7yr8TTbZsbe9uqXb4F3z8\nV0mpWP74aeRljx29JiOFGXA/AxmNM7I87kldF/hCrmIDFVKlIRuuJm0QNlJS\nBW6QhRHXWe1Ng3ASTdHrND1/xsb3Z3pH1jWsO2lqXj4TPFKUzGYxVa++Tda+\nt9DGHyNQqw7qHeBdqlgRDnq7wBvxo7XgCuoBEOPniBSMGvbrOTa6tAC1aig6\neUPLGFhQ7hkGVp2eW8v5uOs8OBtqPXMUhKM6pDEcU8gu832eCJg/CQsIYz2F\nibAbxPTedsotyn4AFmwslmilPR9p1vBSbfeAx/YxCuQWZUPlfEKzkig3TxUc\nujs4WHBGz0ir1ktACHj9nVk/IVX+lZXBqd2f8gE30DzOeoIgI0/VQbR3er4X\n9Pv0bKjbDnxSzyFfQLvDR49rzTgSeig5HRsSzxe8+f0ZniWPvunYZDcxy09G\nKTsDsjTM7tnsw/xjWF4YV+xBWmgaXwzn7sD1Pfdb+ofN3bloYuF5x9cuQPCp\n+HPKou+mxOHFknTKLefG3kQLuEHmW2xoggfCwRGzdu/pZMlFoYXR/heWfmc/\nn18jU+0MsDRixR9aj/WQWE2ZyHTS/UMXqug0H/SbGipEexVsXSDGTQeO4hmD\ntiBv\r\n=FHyl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxmwpx/UKLtFfpv/pCFxlNxgK2olhidOj4BYliSWRTvgIgLY7P8p/Cmfg2hU4dhzPor2Xf9yt57MzClwqWDydubUg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.5ccbfaa2.0_1585949409881_0.846858218739345"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.a0ab8772.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.a0ab8772.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.a0ab8772.0","@material/mwc-textfield":"0.15.0-canary.a0ab8772.0","@material/textfield":"=6.0.0-canary.6a40ef217.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7db0e2fe222d87e1ee22c0515cbf02cad4b1cc0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.a0ab8772.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-o2LR+hp88gNeE5L8abLyxi0ShOJyCkkdp0qYjXZBPuTN9caHp9rz4Tw9m4vAEzIXnNdIW6eDyQcjq/l0r6PUzQ==","shasum":"281421f0695b1417766ade4f7399427f1189a04a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.a0ab8772.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejN3pCRA9TVsSAnZWagAA/gAP/02AhGz79TRIvbhbm3qC\ne4TWFhpUkWm5KPhn+F5/+cSQtTrwlNylHTK3HBP6qk4z7mQ48/+8fz7GAN4+\nCDAUoMRYls7oDyGeCnuJLmyn5N/3r/CTW3S9Z+V7lU0+JAlo+h9c/5LbMjT8\nUhv2WIbGOh3aPgu3RsUNFHGdXNrAPgBj2QimRgpsZT/JEEMac80DWttD+nq5\nC4rHUh6HaojXtmcfqSLknhULIgmWF6VGLnGKeCpu1/G9Ex0kTCfNUzbPtErp\n0H4UWOgr/CnCy8cqffif2UgxHpm3xzM7PSPmdF/7W9UeTQxivxFvI8+QcUS9\nErMmp1jOt1ROd4n24ivX5xjevnL97rng19Bn063G1oRC9bziqZz9gQZOjYIw\noeMbNhxqcvDrti7Rb9XPBxdS9XIxLPLWEk+pc7nRicXSJKdAWsXxGBFwRoOY\n4sopOCnquy1q25jUqHWJc4cXGT38MfW2juLCamCwmawIOTCHOzR0Mi3VjGjO\nah6RtujU9kLPnrm8vo9KX6HEFbeD2KmTzo2sRQa4DCtI2yaq5DhU+4ivZYom\ned4d32gcwby90qshdvvVmItm6I+rK54wE+qnDPjR8/Xs1FtY5ou0f7+w9jL1\nOWVUBJ4XIYouBp584RumciJuGHQb/6agt+inmmIfkc/O6nspZYVHjq0cH4Qk\n4aUC\r\n=T27z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHvtkxG7YY38G0UTee4QzSIQAoyN/D5E71R4nYMnIAtWAiEAnMOSltXR7OmLRBRPMCJl3MDswjyJ/h3u3DV1i1cacko="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.a0ab8772.0_1586290153220_0.9399055281861051"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.8d352305.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.8d352305.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.8d352305.0","@material/mwc-textfield":"0.15.0-canary.8d352305.0","@material/textfield":"=6.0.0-canary.6a40ef217.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d38e537751f3d38d903a5c7c03910a26cd301f20","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d38e537751f3d38d903a5c7c03910a26cd301f20/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.8d352305.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-U19y4VbS5riZBG5lwpZecpJ7PBDYm9KnYh/t4thc96yFCS7bxd8kvyWpTYK69HOd3ML1+nClvTtu7UdXRN/kmQ==","shasum":"486f8801c0e058a50f922ea838933aa40a724e0b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.8d352305.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejPO+CRA9TVsSAnZWagAAA/IP/17RuSMnnJd2Wb/CwMVm\n+cjBQL9SWW+jqGIjl1+2fQBpCbwzJjqy0xbXl3Oiywj8YtQIgexaEOwFGhSS\nB0e1GlkTyUZiGa6Htc0ig6upcCL7Ojfnp+5n0U5ggjkymbFs6hijDs2YDdWs\n0ds2Ppfj7XfARhMYtH1Ad6OWk+GhPUGlaz0Y5+E9SIEpaTylso0y9g5FkI75\nKL2hf4zKhIAuL7L4T215Wq/jtB0EwOMaVWUdMhYRNcRONqTgL8WOOk7kMsQd\n8xRbY7tHXkKVbcgxxUMBAzaXBxvUv4+eNAaJXbLExyMMGlooFcroA5S9pgzk\n3QCJh+KpaY8p0UUS3W6AjtB/Q/8mdzG1os43mKa6NC9UEscePkpU2bRgZnJg\nP8KwgkCjAUdipvm8eOjMz46QoyoImE+C2TBZ7kwxIxQ63Z9wACErCDHK+XXQ\nYeCRinYNK37bJYl4HfGPD/88zvsFhcyWP4Tt1mOs6Qq8N2PZ6sBI/u413qZH\n4kklIEXGH9HNWo2u2Y9DTUsDU2FfnPBbXAbcyfm4oqo9Dri4DVElKE+TEcLh\n18Jyr6mKslUSMx8b/C6dRaXWiXAOWGKX3MZzDZDJEtjcmzIZpZYx4Ej5Ykn6\nkceRsDClBZjZqa8rEkFHTmWvpGlEaQ9LPIQP5/YcP22hdEG8QKkIkdQwn2vU\n9fDI\r\n=nobM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB2EnNBEzveYfPAhFMDlhSrN40Yc8uQc57yTqL6J1hPAIhAJccjS4Zsr7tJjLVJUzyvZYzNAcrdHZvN+P6cpcsakVP"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.8d352305.0_1586295741872_0.024961367369127574"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.31eac79f.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.31eac79f.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.31eac79f.0","@material/mwc-textfield":"0.15.0-canary.31eac79f.0","@material/textfield":"=6.0.0-canary.6a40ef217.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"fc47d0412882f860dc7dc010657ade07c9a0215b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fc47d0412882f860dc7dc010657ade07c9a0215b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.31eac79f.0","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-ZGqeh54+YGDXB/2dSCe6DYr0uSnttkbuwW3tx1i4eoOrp151CPSBAa9lmwK2XeeiCpXKrOxrlpV56wgrPWkrvw==","shasum":"cc8ddd1544bbb3d70ce49b632e7cabf68d3b716c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.31eac79f.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejPdUCRA9TVsSAnZWagAAXz8P/A6LuMuSz8wmIlEcYvM8\nNfXKPUaom2cfEa5S36F+jsm2va0gk+ZCvua00mClrQa6vxcpz9yhWKFqGGSX\nx1XC8u3TQhfH2E3x7khsYOeUeu1movDed+DGcGVvEqw4AugeqGsThZVUrDqW\ni9oR6djA7FvJ8W+MdB3Ah0SkHlO46fyY9tUkCZ+PuVp6jbdlvvaWAyJChVAx\nIPHESfKFbTRDu/5tO94nEszInSl+NCTFgNPaXPiNfX/zsfcZUWot0ziblm4Z\nG7h8sGi3fPxpcMRDNQzHZurK/lKgyvOF+4ZAA9BrdhOmegZE3JuUK8DDkFZI\n25W5DSZkr2AiElEl/o/ayL5SSXCBbuTXAmoAo4ZU/2WSgha3HxM35aWXZDK4\nkZQ1UtiZN8DduWKRHcZgofB6yHNU9lmlp5zu+mlQ7KBvfdSO0SQ5keV0uuJX\nWWOG5Wfwi+5Y+t+N+9+yVAA6E36asO5l7f5xysc6wkZpyc5tNCG1E3CmqJ51\niBaDfhKmi7ECqFyD2QTDuNLX8hB2LvIogJOPjhCWkQgemxfwVljECaxjaTH5\nyy+e3VwTYsp6GSc09CRsD7lVZ2EcW5Vu4nYa+ljJL+x0MOnRcwc8iW4H//wC\nLfvYJzEP+Xss3qKo5nun57xnqyU3uiDzBs731C7B2crFLyYAsOA0lI48vy7o\nem17\r\n=FX0t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpMEMqzB1kA0r1BO3C9k5uKwlDCMWza0A1NyrhpXP7KAiA5Np+afiqMiRhzUaZHOcURLe5L1ik+qIldaV606SYm4w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.31eac79f.0_1586296660310_0.11723103791721012"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.ba05565e.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.ba05565e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.ba05565e.0","@material/mwc-textfield":"0.15.0-canary.ba05565e.0","@material/textfield":"=6.0.0-canary.6a40ef217.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f03dce4944b4b3fb02a1467dd03f7afc0b279a0a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f03dce4944b4b3fb02a1467dd03f7afc0b279a0a/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.ba05565e.0","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-b36U1IIdeWOP3pyK3Aid+fVjXO0GK8iV2lgpeilDW83K/1FX+SgLXZGcnypPNlGAScbMMfHM5kT7ZwWk4DtWOA==","shasum":"3af86339bc796ae8babca20cb4978bd3da5b9aa1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.ba05565e.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejgrCCRA9TVsSAnZWagAA6EAQAIqDXXueDRAyHoHlDdM/\njviy3qHv1QZf121gCZUxLD4E2UuecISsoxOZrUU6m5uZXFjWbS3vIuo08XnH\nViJy2GPIVtktUPrxIYpSbpxIqAHaVXZP3iqtUUkkSMVBoPgI//SZK49k0lXt\nsxepD/USdeCc8OZE5DyZg3/IgIiEPFU8YzSy+iZxJm7v21RT1YAAgLnXCOqC\n4mlb6P9nsxe/xdOPZL/NCvgz8YhSUtthIE1aq4ABqSCIY2HbxcuQ1XHTe4v9\nezqkgVjnZGGTtVrikHcUkrFv3sL8gvw+c0OyQ5X/RoJcDRObT8uagmY7P9n2\n3c/8EdYz9TAjFD7N228Xw/3sLidFEdpvpwsLXFxGuU4dsB22KHe+ELd63xoY\nAkAUUrR66I4hKqAl7qJxbc2MnnE8B8GwuAtgCLt57PHssBzKyXC0bkKbi6A8\nsK6crt4o/Uvs0z1lTO6eCG3DcxOaXdlr3zlC+RQG9cdsgK6RqhMe4Ma4bL9/\n1JWYYU/L4Vu370zSF7erGrXjXF6QmVFJ1r6qcLbGjIbgClwFwRPowSpr/ShH\nxbwkSFKhUZ93RYYNfa2uDNOfNZbmuS1aaoEnduP7yfDCtOJK6lnIIwqDSgln\naN1IwaydFCrKM6h9sRRwRVk58DlgK40GSUwpwQ4BmL8xi3bVvnBH1/e4lJk2\nkpO5\r\n=8VYR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTGCHG+z7MCzVtuCtm8XtyoqeN7t0L4ZfIp+3pNkAFUAiBtNOZM3hczBk1Nm2bxYIx0VUyBqlX3Wd9uLdHdE1Y/Kg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.ba05565e.0_1586367170236_0.6282620345623868"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.25099f79.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.25099f79.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.25099f79.0","@material/mwc-textfield":"0.15.0-canary.25099f79.0","@material/textfield":"=6.0.0-canary.9930d9cc5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d2069c5f3f79653f2526d8fcca853faca1f2cba0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d2069c5f3f79653f2526d8fcca853faca1f2cba0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.25099f79.0","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-kKgBGQ/4Cw8qJTpvuMn6xQ7ozELq9BBVAjNWSVYG+69zYFO7xIkmyBQuett+0mSxxkAzQKgItTS0kMKth+hQAQ==","shasum":"90877f2e99014850142ec0c0de13269bff7f40c9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.25099f79.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejkKPCRA9TVsSAnZWagAAI/QP/0+mbA6MmU5a2bK2WXpy\nbvcwCtcxJVEt9DkJV3rB8FKwkAwayYkjSpvqeLoxrKzqOzITLMve6J4nVuAs\nmlSzxXTBCVNqjH4YaksUm/6FFfbd181WmWhu6VBf3PKFpSkYOjKomdzEX+f6\nXrCP0WH21jS4dkeROqpgm4wqjfQkq1Tv1IOQdZl1yZsqmnzqrFLS3qOu+BsM\nCJBApq4ETQPhVtffQ5RPPsLRo6XWEbOH7vTDTA/ZPhjuWk6Fbi2ZnqXNgQ27\nhILKi9TBcfGTP9XGmc11n0jdUPo8aYMdoqb4GhYnuhDUj5Cr88y3MIh0jg3D\nHuvt16evuU8GuZhk7e8KLLlB5cDGitb22GMyNk5xV6dDQXnXSykJNYEOKU9a\nuFQa9l1C9qRP9IB496OZ0rD2EjKytPg6LjooxIEnTlpM4eglcSIrwJqeHoUC\nD8ei5shFozWeRKE5KZWcdqhatWB7YF+j0GXGCSFRNIWj905v1wblSx+QziyI\nERPQHopFf4YEPfBdipBuhthxZr002qWQeJec2S+L0xdRK2vgB+jSVZpn2lcb\nCJjPzv72t/mUFvB/u/sinaw57/nnb+A49+4UrCk0Dxse8N8yrz/MSwcrAxI6\n2TszgJZZAUDhrSBoAs/e/5tvUSYlO94HsClP2trhdj4wuGcazWJmmQUnQbIM\n8nKb\r\n=cpRI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIADAk0n5petVTLRaS5dUMCaD9toZe4Y1XupbwqsX63ceAiEA3CNxIU3aZw7i6pgfNkwCLWt3uuu6+KvjoUgvRDfLOzg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.25099f79.0_1586381454836_0.34297115388982924"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.447e31c6.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.447e31c6.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.447e31c6.0","@material/mwc-textfield":"0.15.0-canary.447e31c6.0","@material/textfield":"=6.0.0-canary.9930d9cc5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"948dcd3d057312750fa0c58715c74d5ae576abb4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/948dcd3d057312750fa0c58715c74d5ae576abb4/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.447e31c6.0","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-L7ul3Gt9N6ga6KvZ2xYxVEi9yDYCjBBZXzEAyN6lrezz+AdJK9I81dPfrHsuQOKqHVhkvHzQPdB6oHb0fsYmkQ==","shasum":"5590efd23e0aa36c5cb1fe2cd35c73a9e5f8ad53","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.447e31c6.0.tgz","fileCount":16,"unpackedSize":177313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejneACRA9TVsSAnZWagAAPP8QAI16mJ4WCFUXLwTlnEkI\nxjHSHxJDD+JHL/b9JaVs0VEAAvgUbzGmz7bZXdvVX8qGW4arz1iPy/oYq8vq\nY0OGsxjiFhVnoQLA9pR5kIJ2MX7bG88Zbc3u8IB3d42d4p3mQ1b4PUguq6St\nSRJRzvLeWNznlup9c4nlgPp5YQob6iNxQFOWnan0g3q+flZ60jM7sSvGJlCs\nWOtmsQ+ncl0NpbM5g9k51NpCBCC0dn2F+yj5m/+fPOqnkEEr9TBi8yPK0Ied\nLBBAhpLJP9MqhQ1tfoK10XKOjEGR2CvJj5OSFjKqSQyVrAPfi/ktGZrdNwYg\nWSlYlTTDGic/VpPyNygEg5pGNCgdW709aIWRbIrVJ1Xe4vG1847DZ/Bgvx6a\nmXk5pda7RzcMWFE5qlK+hM3fuw3GGdxS7H9HrsigzxBECqnrGnIqFt3rCf6c\nJFV7Tek0tHt8ABBPmw+8LDQQstmreiZA/ZAaH0zEgxOrcrl1hMTKMZGaIrIc\nU2+CDVBCRJeNWoU5w09LimbsQG6CB9zt09AUjF4w5UNYX+vYcfcITkLed4tV\nx5/oiViaHAWYgiimAUESq3ID2uVW9xT7n0Dis2QKQgV5QlzbWiYi48nP8mxf\nlQVAEX8FzQlosj3nBlhxuyK8e7JKbpVqSX2Sbt1wkudAtPFjhvk5ZLC2L+9v\nGbbS\r\n=iwGk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKBD2err3FeKHXX346OjYGtjftArr/HcLRlIqEFHpF2gIgLNZ3nEOo+Fgx+geqxwnnQL22TFZqB3nUw30uFfMnzj0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.447e31c6.0_1586395008532_0.013000497046840476"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.d6dd84f7.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.d6dd84f7.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.d6dd84f7.0","@material/mwc-textfield":"0.15.0-canary.d6dd84f7.0","@material/textfield":"=6.0.0-canary.05f5e1583.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"74f8e8617851a447758cb395b1e8bd3bf4c8c323","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/74f8e8617851a447758cb395b1e8bd3bf4c8c323/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.d6dd84f7.0","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-gtrA6HGmyzKrL04g0+qIe+cayKMKaBOQYrAgshReE/BVn/Y1XwQCiCaqH1veZ1chONcB/sgLnBXaZZtRUEsmxQ==","shasum":"c8d9e9beee5d088607fc14f086246e49c034addd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.d6dd84f7.0.tgz","fileCount":16,"unpackedSize":184414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejnmGCRA9TVsSAnZWagAAOVwP/0t8Pjdo8prKTR7+r7DV\n8I7yrhbHp0IfYomySrQY9TeI4xotNIa4yAtBorORpLq6TQvNLfIvfOp07Gyj\nhGFTyP4fdyg9RnPEpKsFnybxBx9hoPwtVVaFR4YGLRGPxqNP70IKV7Y/5Uwf\nwRF8cekhImlS694jE8aAU09a6/PI5LPT5oSSrt4/13dvLG8foMcL+slp/trt\noo70pa58dPpTKc+SARZTImouYhUTsHJNydxHndiBKNroKYU7TXg7c382M06O\nlk58pnnmWfb/mND6ykpiaPLsm6WRBzfzR18hZdBpctrHi2gg7VH2EpBeDPO8\npqErX46aw58MkE6bAn4HVeW8S2RB/wLc7hL0ru2dpnM/Zo+7oI2aOhtB5ttk\nMKbgALEtILWv5uW5YsEg4zPsrPr8OmFmWT9JM5qM0nwkGYWHzlcNYS3Hib9P\nuSBrMcEq8d2QGSypjcAv9+JKpsWNjZpfxGNuvdYXOgD2YAkPNBoToBni2fMU\nPtRuiiGIv0MhGCLg/mvw0IfDnU+3k4sur2L0UoTwXeqTDRuwfY0uf/ifllyv\nGkPzjxx+ALKqym2EJibBj4yBOMDx7wRudyJb77r7JiSOtrAd71KvVCOc3p4d\nLqrWHU1KZCoeK0YkZ78baSlyWLEI76CbTeoi4ZEhwg9IP9di5HG2dDAeFQpS\n7YSW\r\n=Bvq7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEb5kt66L0I5vd4FVEUge6xo743Bdc7r8YfGTgtcHJbIAiEAk/WxeLVkYKuiCOg3NbM0LIEO/6uvuBD+//3YA8HZ0dI="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.d6dd84f7.0_1586395525784_0.5628081912042935"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.9b03ee68.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.9b03ee68.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.9b03ee68.0","@material/mwc-textfield":"0.15.0-canary.9b03ee68.0","@material/textfield":"=6.0.0-canary.05f5e1583.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ab8e352b8af06379b151d5a80b316fcdfd6e2024","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab8e352b8af06379b151d5a80b316fcdfd6e2024/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.9b03ee68.0","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-Zz43jUTbkg+YZnMbb4ZDP2oz9D/ch046ySNHHb4g4WSENn/jP3m6FYZByUnZo0qGbpCM7UlP9uVrlUOVaV5+Gg==","shasum":"8662ae137be985dcde7741b4b303d54db9944c35","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.9b03ee68.0.tgz","fileCount":16,"unpackedSize":184414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJej399CRA9TVsSAnZWagAAIA4P/32iPcjeirLJVBlGqSfi\nISEcVS9rUX17241EzXbmJZB8acSdYFvAiyP9KlwkZP7uBPRCcM+MkMb8RZu7\nV/mY4jWdyEjTzfF2pHmWUHOBKvgQSkuwnG0HwNAwEZi/RMghsX4HG8WQk4/S\nGqGKGBOZXjvA1EBk3k6yqc3TKJYF+Bg55YTC6a1g6FwPh/ON0cIBsCMIeVS+\nlDqDLZVmey+FDvDbzeRLc+jMsycOwHdFosB994j6zqPFAg5FZkUJZfxkjbM7\n/ivQwSHa9vtEAEgaV1SroIOrmbHi6cSH1ZUw9nGpsNuGZ8/Sx7jh8nqmeMBY\nMw4k/3tSvLLqJjq9FRtpmiavJWjX458dKi3aXCNGnNqTSH0t+XVMVNLvXJBw\nQRO1DjlwmuDed645q+ej0ki6ASKz4fww2pj6qeCoKoR9T95LbKCT2jAWaW54\nEb6t+2vQCb7XIpCdecQOA+T6lUNtWDcqC7+acyIUbVlIUkuCIfdXjTsGRSiK\n6kfP4M+nEqZKho5KNSirM8w+wNr/jMgQK8siZB04kYCUOrxPGmEwSerhcRRU\nvu5kDaZNDzldtr7BhWwoyVFiG7XSGWK9IBamBmjmjYyyK6RJ3Qcbgu/clMjN\nXqEI90TMeTbIhU9rF5I1nVqG6N4ly02qSWRGG35GSS1SssBDWaFOKYEx0l5V\nmph+\r\n=W5E8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi3pIAzyAAXW5/oThYsTE2Vs9p9NhUwn5Edoh2x/uIQwIgd2C24dBdw0FfbQprpJ1UdKMqIVo/k0ZUgLFTrwWi6yg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.9b03ee68.0_1586462588810_0.882547204851666"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.bbc25b10.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.bbc25b10.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.bbc25b10.0","@material/mwc-textfield":"0.15.0-canary.bbc25b10.0","@material/textfield":"=6.0.0-canary.05f5e1583.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a56f18fee2a99903e5867ab91175e4802a21cad0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a56f18fee2a99903e5867ab91175e4802a21cad0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.bbc25b10.0","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-JM1O0ce6fb17nRiSQVpq3apBBilKrVN/nZi0HKcVjHqhg+RRGSjDwfDlhZwkOoNNFsL37AnF3EmSj6yUKGs6Jg==","shasum":"32d7e2274d92c30c47fc20d91857b4d1151185fb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.bbc25b10.0.tgz","fileCount":16,"unpackedSize":184414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekPclCRA9TVsSAnZWagAAOHwP/1JVy8N0s0Mm3diLsZFz\nt8CffG6j/qHjDZDpdaJ23LuUpT2TaXblbaQSodjOdHInlLsEpiYHDlvDBcYA\nykINXZfXhyRe252DyLwMf0AxoqSOe4FwYhFYXtJPxcUxT8E/83Gndo1jtinr\nAvW9+lSmikT1itu6u8mPgrg0rom/NlJ/1LZ7Y7beeBsUxE7xIxfJU4rd/OEG\nGKAnRCtv8mY0eVzPDBE/C/KI6YpnbnHGxGNL85p7I4q0GzxRQkCM/D8BbXHz\nbGn0sJA0WTy/GiO/TlB57bfWL4qJdvJoad1MHGPcUcyoJpvtPyy54dXOm1xk\nl+WFMmTwpyhTxIn+kFt816LdpV+EMT8N0FJ7oIy2dgIBck0Og1hU9hpfx5p8\n82y34p29ITEsI6zow1pKhyfTER0q3Y9Bq54JiE3GLJZMpwPauUqYRlwyvjCr\nvVm6mUXIZDHlGdbC1kvhrEKeqi5gBxBtBUQabc3jVxJmW0sINJxZFQ9h9tb3\nfcKzJn+I7RCOYsGKOSGlHDo7iqM+BBLw//lJScT50IFZ9Fy12R4ASXk+V3pS\n3tYStLHsDZwLvEnlosBhMqDvgeOGjyP7Acnr+3/2hAQk6P2aKbnTLGLyB9s6\n7OJKCgjiuAyS/IVQlCVPm1Cb6vCwsFz4MRU4OiS0ihoRwaxGDoBCzH0Fc+Kq\ni+5L\r\n=Ticu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDoFAA2b2USIZV9KKoDJrLnBw7mvHFs2nSnNqlwJqS8SAiAGsSTU2wr0opFyMUxQQLoUT7ynp/ZmMinjJaKphE/bJw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.bbc25b10.0_1586558756907_0.5892425455606431"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.339cbfd4.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.339cbfd4.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.339cbfd4.0","@material/mwc-textfield":"0.15.0-canary.339cbfd4.0","@material/textfield":"=6.0.0-canary.f172b0f90.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2a2c6f2ad1cc09cfc8d0cb5796203324564f76/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.339cbfd4.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-n6sbeZNiCkiDcPuqUfHVoS6mz9VC9ej8raD9biwdfNk87ZCEgL+al2RQEBM6dfzZ9km7MjKPJJPeM9BdCgV9UA==","shasum":"1c236215a4593c4ed143f626e4e69538e6089811","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.339cbfd4.0.tgz","fileCount":16,"unpackedSize":184414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel0azCRA9TVsSAnZWagAAgUMP/1PMQfxEA1bGUsGGddcc\nzQAdfE1ycjB/Ju3kkCsLDFDNu4m9bGlxSf/RyogRUBXv1Zq39MbqL6+c5akm\nXkHWsJPIwbEhrAXuz36i3q7ti5OTH3fffcQfe72Y6B7AqJCyx9L31JElMm05\nkHrhnJ5GC97JRqs6xyV3nYvgSFYbjjVRwVaIKkAer1iwmCt75UU42J1mOTIu\naPBf3uoHZnFUpgHgmQ909SZMhOR1g1fY7dF9Ix0sC9BoyuG4ik8vXiRVfsCS\nho1GC4l4rR15A7ZSjfyTMzgYAgPWV4qBsBTS2nyD1suj9Tydb6j2N8oCSZ0k\nhVr6c84JWKH5LrzpxhG4epWGC8zIMM0FZZjZxsj6vTuXLgH4yVThoBc3SXX+\nsS7JlNqPa3WXQsHUkN8aojyk5lpsscpm8ogQoYzfun3z2yr/QdonEbK7DuGO\nFzkx4k8pWkL3ho6weUTDoEyR5UO8cbELND91TDvDoc8wQE8U2rqwCvVYfyrW\n6DZ0FRH74wqo76lq1S0C5PQ9KIXwnCkdFNlAQ9C07AFWzXRvh/Bw0oVtbtqu\nO3XL20bCLOOVpiDITH8iRp1Yw2rxjrr6Jqs0b+bgw5X8/kQCHGq4JZMHKitX\nCiFNguUSJqCBw6BGWO0z0xqW/kpvC1wH2VYC7caTHB7/GZPnbnyclLxwOLgN\na7C0\r\n=iWwU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYNp2ePxfrecPyaBUf3kNZb/0D3pIAkiuaQamsvDkttAiEAgLB9QrGSgpkbYy9h/e76KvsMAZTF2o7+DIkieZXiY4c="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.339cbfd4.0_1586972338842_0.9986717704128354"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.b74ff19f.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.b74ff19f.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.b74ff19f.0","@material/mwc-textfield":"0.15.0-canary.b74ff19f.0","@material/textfield":"=6.0.0-canary.c02642273.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4a8d0d2eb87a0979a2039ae68ccef8af0c8b7b48/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.b74ff19f.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-VXYF9YtQvX8gR74sRO+24hpOse4ZzXY+JhX/8t/sy5/5ePcBDTJBVi6n/+k6MsVoeWHnAcv41PmDevRZIJzR8Q==","shasum":"73347ab2a901708b2834b6441271794f0311d920","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.b74ff19f.0.tgz","fileCount":16,"unpackedSize":184414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel2jbCRA9TVsSAnZWagAAcpsP/1i9fdvnja1NVvYtGN6G\nASGZQXlCydFWegW81quExhTg45K1Q6Gr7ITTbdi3nSBseTAQCJJMofMbKzzC\n54Xe5z4p/9xTuTylO4OTH2hkdEQM+c7xpiEXsH1azp2kK6r30eWg50M4vSwO\ng/jqTuIPyGtHzhRcNi8/hvTIpAEF8A2Zeaby1VLEMEJeo2zsVe0Tja5zmJar\nEJTDPwtTMmiTVxGYgWJkLxCt9SEDy6OL+ixmsvhnVoVuu7pWWrrYEoTBMd5n\n33t8AdLk/b1hy4MJ/nAQcEjY/SwmIevQHKM/5CCkr8OyiF8Znl5Sq7K7oIYd\nKKZPrATcwpsgDs7P+V9KlAI4knu4ycvUv0iVO9w6aEWrGNSNiCA8i9mhO7G3\nzn3VkDg3YqxaCSNa+9eOCNwH6H3bBLy1/mJz+FGldcW+pOBr4g3+46GhOwy4\nrZpL9vVEO2oaOWsFGxzaP8z/7cwcjFKNQDgFyXGfuIrcdoUG9tWZclj4GIxm\nWvsCEZT1NF5RCGBf1WX6z4o5/OitPxv78kMJ0ZocCi8rQmkBH0XJmvEw/0Jd\nsPyHRV8Za1+UvKIM3Tz1cwV50sjc7ck3vfPmYb92shdnGhTz9s6ImcDzKCNa\nC0j65IgfX2qRUruKpxsxehmzSWtvEUIZOBqNVBbwONV8lTVLA3YeP8eWn9zN\nJXmQ\r\n=WiPl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDaU7Q9rVi/8lDvNKi56wZqmMHjwBNXaECIzkhcTMdxAIgKV3CUI0w6MZ/qow8OSc7IuBhXoHRKniCoCyNXxlh6CM="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.b74ff19f.0_1586981083230_0.871257106042792"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.aaa16853.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.aaa16853.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.aaa16853.0","@material/mwc-textfield":"0.15.0-canary.aaa16853.0","@material/textfield":"=6.0.0-canary.c02642273.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7546404b77983a36ca5e25efc1078681498f260b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7546404b77983a36ca5e25efc1078681498f260b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.aaa16853.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-peIwY2MGzdQAwZiLor1TxzMMAt7fBLTbdhM3ufpqd0pPgx96A4y4FMop/EtqavMzbEC8MSDfyTRJNIi54S/NZQ==","shasum":"19c93091a16c107254a2ab4c48da25d05664b27a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.aaa16853.0.tgz","fileCount":16,"unpackedSize":184414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel42OCRA9TVsSAnZWagAAPj8P/A/AhZYQ4nzJDXmzvCfQ\nkD9Zk/L6mSOOItyEwRCPknJ77SXy97O9vheeOOuSgUjKmqRlZdr/WM2ItEE/\n75RHB/c8qt22TLrymWEjhKlMxwUDHv2dPjO+f2p8DkGrRYALL2cQMRANFR/l\n2M/U4301AFrRjOKRSn9e1nQD3bZYsZpiE4juZaZDUpHuHdCiKFK8dYGOTmbG\nrNIS/CS5tQdYD4ZKl2w0IZBpO8wd6BFhqd4Es3P6JuQ7ATHWFLmvQdVjFzAW\n6VkVAN3uF+lIuawSFBLGNqGSnPYPJxOp/bcUoUy9YBN+OuLAv/J6SQAOm8nt\n/EMiQhlulncpTIeVuducPxzpwedgog8YM783mP+pEnDRPjmyUL2i3iex7rCu\nMLZaIgiN2Mf4ftbGX8Ue19qqwF+Kgghbk6wtAC1eYyeFBr+uoXwlFM32VgBv\nsOq5+syMrVtNHNuzHwBQgTGG9q4rRfkrRhQ9KyndnbQ6NBSHaKqM7ZCHwBt9\nEApq2FINsai1gj3gvW6yjlSK2w9DSJwzVKFvpln/UikAhp1CBtQkRcW/DkYo\ngfj8HVpCZi7b/ilP1jQOID1IOSrL2iEtNMDv7OH9aXzYch7vevz5/qsQ1fix\ny01LNnHmdeA10QNj39gNtOHUBoxJGxkmfvVwgjIO7tUQbY/hr/XwyBMCXjU4\nFhJW\r\n=DvPX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAh5YVQtYlLH05Q/c7wg6xfTgCc38favWGN+6mBTcb3SAiBctPwUAKefqpCrBTN+CT+9FUzRov53vmef2iFn4nvNDw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.aaa16853.0_1586990477566_0.8491124278297766"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.826b23e7.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.826b23e7.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.826b23e7.0","@material/mwc-textfield":"0.15.0-canary.826b23e7.0","@material/textfield":"=6.0.0-canary.ce6cb7024.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"00403df32c75dc9e2a64a38be1eb1df45ecc57ff","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00403df32c75dc9e2a64a38be1eb1df45ecc57ff/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.826b23e7.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-foz6yW/FfyBYeKy6t9N9zuexWRCAU1i3vZY0xS308mCSP8/CNsyGeLJ/8UyVb4Sb6/93M+snS7Ks5SuhU0SvrQ==","shasum":"76b0b7bfaad798f7fb82c74ece4d83052d568f04","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.826b23e7.0.tgz","fileCount":16,"unpackedSize":190042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemKqUCRA9TVsSAnZWagAAxEwQAI1selv3tDxkIYkAHK2v\nLUlA93arEgFOMjB9AKkfG39LJJQ3yZBYM6r0jFPnJ5IJzsmpx42fLg9Lz6bm\nx8ZrGPk0IVjoL2unoaC1yD+ojhwZ57uT+NpTafI79QosF7DMhy42KDRCO5zT\nf5RfAgbhhcdOSlMLU1bLLuEK3GX+6zlkDgumClcGRQx3+j2viqY/XimWTQj2\nooRvkmm1PWEADzuLA3sBWtz1dLaUOvYlKh7XfbbMtKDyQ0vKYm15V18M0wMm\nS5+1uKBrszSnF/H1AwYsXiJh1qyEM7TEJ+XdIubJsDrKHNFQZY+c4yy8csp+\nryRFTShTj/6CYUAK19WdrFLdnB8WeaYcTB+CFHfa+575GKX2x1yMbb/MsFsy\nLn6pu5eBb+9UQ1JE9whqyqqWPcqse0TATDlsEZHhlbD2Nv/WaWh1mfmbfN0b\noM8uppZm9nIfAwtHR3WmjGx4myutg0xpA4tCNlK8+kKkOUCzBVIFpv4OoAbB\n5JOT9B13+wqf8haVbIjV92Wags4SflhXy6F5KRpJ7qHAToN1/pu+u8z9mZce\nClWMkx1ha9UPvGTeGkXEcPvFVQuLx9Gk8Fb9GpUgb6qEROEXxFzK0hHK30tF\nBXa0VFhIJ1Fz4nAp28vii3kaEJmc2W10+LpQjLzDG5sutptKhQMxyt0SQ8f4\nPuw8\r\n=dCdX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9R1y803NCi0gyhN235pwznq8NfzEEbODDE+pgk4KjTAIhAOvF/JVBo1DlH9W+rksq55Omv4zLgLU1vp7sl0eq9L2r"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.826b23e7.0_1587063444210_0.10901676474881095"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.e1ad2b2f.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.e1ad2b2f.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.e1ad2b2f.0","@material/mwc-textfield":"0.15.0-canary.e1ad2b2f.0","@material/textfield":"=6.0.0-canary.ce6cb7024.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"148a509de33ca1ac17781a9e24bf8735ec5b2874","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/148a509de33ca1ac17781a9e24bf8735ec5b2874/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.e1ad2b2f.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-A4/gxwEdIah12Cs/cBOsL2KyMWjP7WlB8OcfAE5X0qokZc3JHRmxRRLafgi9OuPQ7VGhO910GQgCJlDwqHy0aA==","shasum":"c634fe23061b87232254a4104bf9c232e9c8926d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.e1ad2b2f.0.tgz","fileCount":16,"unpackedSize":190042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemjVbCRA9TVsSAnZWagAAwOUQAIKxJCXNFk2p1ume6t2c\nJXgxxaeswDLLuJVCXQKVvwtWmCGl0HSGezks9HaZgiVfXpOg3sBCaDIllDJE\n8bLoP+fLaOmvpQVgHNDLUfy0JolMIULAmfmbhGI/ERd2lZ7ES8wo7U/NXas1\nCYyKAATqo9pCABtJSN9/eiO9W/VkISrgbHul2TKY85EM5Rfpaxk9Pxir0PCv\nPpz0RsF/G5lO6SIFysws2ypjxz2WVGrOsb5POj57qPuCYJvKBbqLmzLo3rGd\nWuAaP4XFmEGO80Iwcc2Jkwfrr7iAVTvE3nI7C9D0sEbp0Y/bSCxxxdCo4t10\nCR51ooa2byWWBH3hYMaOLHQAPpLhD1YncF5MEUlwc+4qEOhV29oKnn/eMVT+\nLjR/7xff4gRToyLQrL9s8ZxcDkY6HK8xAsRzWaZVC1dWvnBIQ1RAkQ7UK2R0\naVky5bMMnXI8RohOmSBhPZutHzrVWcfg+9jiJmSbFqr9/WZxF2Jqo0gsAFT3\n1rZu+YFamgOszS2hR2IOqYUfo9ssHRZlXrABL2dS4PbAtTmG3LHKNS80v3VP\nhZPy+8I+TLR2ltIH1EPssGGe1dhqYGAOnWal1OY0q+sGzfgc0r0rkE7au0E7\nDyVttK/VhVNVKah1BNpblLMraHCfWIUoWZUpUEGnXnYdTsSnmlrK25srWAA5\nWx3q\r\n=a8Nl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDabHsb+60i8iUbEAD5QGGW2aYQNacRLaPGnUXLGHbbUgIhAPXOMcMw0VBQlHtrBzMxZmoiGnjK+UL6OUsY8ktrECE0"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.e1ad2b2f.0_1587164506724_0.4430755028940867"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.bade5580.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.bade5580.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.bade5580.0","@material/mwc-textfield":"0.15.0-canary.bade5580.0","@material/textfield":"=6.0.0-canary.ce6cb7024.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6e463a20777b8cff5146a68db7bffe3f5aa9674d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e463a20777b8cff5146a68db7bffe3f5aa9674d/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.bade5580.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-r49lV3ViYfq3YcArbzkwHd/i/K1k0RdLnHg6rHO6nO+aLTw8bGT9v1yigfqr8hKXbRoDKDdk/40PeW6c/5iWBA==","shasum":"35a967c573bb25db0365aa839fe3e510163678a5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.bade5580.0.tgz","fileCount":16,"unpackedSize":190632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemjmECRA9TVsSAnZWagAArekP/07HdEpXe6bWzllekwai\noUb+jZo0yMTo7J0boke8a/LIIDaIoitYwWMOVNNTvrz2EqMUeysl+bbz8XSS\nu0IAHKNn0dGazqa4tBtnQOsMb3lWmS0+FFxrgDyA+TnZHjNIq2TG18WATP7Y\nVbh+w+umzdJFHvIR30w1mlLF/pqmi9MjNRT1xkhvl24D241UDltYL7VDIJgY\n7ITx9HxDvm3dphFQjtaOWSeqadOc79sGOSY8WgnVIS3BaK/23OYa1kTSNRS2\nLDxS0zqdrt09PehM9DK89auTEy4FdrT/Ue6sKHnMb7QQkydhRLAUB2MwWmtw\nEa+OFmOrlkuZSVtIC9HL6J10f2i/xXOy6YrxoSpKec95I/1yrl9qMs3l65M5\n1Xb2KZpicSp7DnfJKRI2IcwKYedXAOd3zfLpIiN+9wWbTIRMuQBFPIdkZdLk\naVg4ZEGIb1Zf+QuqvA+YP6pwiEpzPb/76mBweybrOhggTJYlwtW6f+PTb3Ti\n3ASuxUXNMsNNsgbN0H90T8ihgVim37kazerz5Jkl54ykN5PtMVw5zWIlOWEr\nRbDINK0Gr9KGOfYtE7u73ZtuTCCG2o4PitQTIGiAp9YpUaG3JE5CqkduJDBD\nUjaUUWc8TvauoInT721C4yyFsdLEZrcsLChJ2uBRxofL2EG8bbH0cF7oTk1i\nyF0y\r\n=Ij90\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBa6rrHiBHsMAvmyAUHYO669V/nZJCYj5N3GqHBuCH2xAiAoU8LEF2IFFea5n1nCdpMp6flTaYxLp6Enb2OlwlJ3BA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.bade5580.0_1587165572427_0.3598489759992838"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.dae38247.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.dae38247.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.dae38247.0","@material/mwc-textfield":"0.15.0-canary.dae38247.0","@material/textfield":"=6.0.0-canary.ce6cb7024.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b704c816f10599ee9a5d9b89a55d9c95d2e36f4e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b704c816f10599ee9a5d9b89a55d9c95d2e36f4e/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.dae38247.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-stoTdsvLzEhcPtIPXr7FmGYqIpQUiK3ZXV+ZbQXwDLFExxK3xgiXW8rXaK3jmPVv4AmDzrQL6SqVfZpH5qBK7Q==","shasum":"6fb6d984a49aa8da90d15dbf2f39cd3ecae5018a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.dae38247.0.tgz","fileCount":16,"unpackedSize":190632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemkbaCRA9TVsSAnZWagAAwGEP/iarZ09Rmeyj1Smax8UY\nWgvtf9Ih2XjWDSq8T1Z1o2dKaQXuQB01CjQQFgkFvvHSWBazRM7Ql8P3Bn38\nrNIwk99Tz50Ic3rvAhyAALgWO0Z7WHpietAChtH1DW2K7Iu6di99NE4OoeUY\nsHU4HYvcssewZidtrDdzjwIYY72sa8o+UatOVEGbKHOZByjq+1NXs0FfzMnF\nnshrfANdSY/3DQwf/Tp0HxCujQKuYf2j6LMzrBnrpKkAsH+yxSvWXDHP5ZD/\noq2iMAGE6FTKbbMZgSx3HO1ax8UK1dEXzLNhK3lMZETiwy8lkWFbtCvlHdAF\n8RlfWxJTcTL17E75i6LAHc3bJ41LloVvwV4xL1UxiB8gnWsFkDQ0bm8QcGuM\n1L3mKl8WY9HKf2nG6OZiFd1b8kSpojagWCdvglrqRuhKITAVBVGfde9Kdp0x\nqepkmaPLh8ofixVJ84TATNWrogJIC3MmZDkcv6VhGSnnmRx41skO1gyxUs1Q\nMrQPRRlty5pSnbgjm51MXu80XKxBuxAnoQSHCqbAYPxJleG7lsOW2Y+1c2bJ\n0h9mxO185ZU4/OcFw3JStFvg7AE/pXpN4gj1ytYHmnsq20CZujVF6XKVTdJP\nLbo97HGzEtqj/mpke5DsiX92FczG3DiOWW9RVxJTLwuJl9WvNd38tbgB3FO4\nco9W\r\n=U+Pa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFjfGX7XQkNiTrGb8m1wiTZcELBF/tNJ70LiAagk7lFWAiEAg+kWWcOEa6Gy2SOoJSb+g7ojnW3YmSGd4bjIjdGypWs="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.dae38247.0_1587168986149_0.8427198059847856"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.a04c0b82.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.a04c0b82.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.a04c0b82.0","@material/mwc-textfield":"0.15.0-canary.a04c0b82.0","@material/textfield":"=6.0.0-canary.c4b4bba96.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"23904437ed2cd67305827b08d512e6dd06858b16","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23904437ed2cd67305827b08d512e6dd06858b16/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.a04c0b82.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-rlbSkq0UIMkuFXyz8oq46neSpJ2bifm0lPUvm3DVpgFvg4ZWauSfkBQKAOLriccMpSjx3QpgWhwGl5AAGVIm0A==","shasum":"2931c5eeb2fc458468cdca797028af92146c4c1f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.a04c0b82.0.tgz","fileCount":16,"unpackedSize":180030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemksbCRA9TVsSAnZWagAAjrsP/j4BzO47ZFmmVmKEj/Ri\nv8eNRvoxDoY8f9hsgTQeBlO62YJTKlKHHUyLzUepwv3PMV2OvltImMwBqdAo\nYHk6bBPUsy0wNs1546YQCQPC3kDpCdndzTqbh6vQxbLm0WlFPiDQq/0Aqbr0\nwPCzioTmLQbouxC9RbGo6qOUcnpCGIBixFNmQXHVivLr7JXCtIeXrQP9qLMr\nB9XMZpwrcKXDpf8+TS0aNzTL7lUocCSeB0NgmI8IDWIlCL5UoxxM7vgCFfwH\nGYyVenRQ7JpGZyDozk+NRxzGd4HW3UxKJgttJbNfgJzD9tbufgvMkBvusg9a\n0V9KdlMyko0nd85TkYrW3G6XdXvMgCLoTq1/Y4KqKUFvXFKmhnl0BGOr/RCK\norYdHQ0fDxAUcPwfFLR3c5g79sN7djOmgQvPiOPcmrB1lJnYlmA3bRF47/9e\n9/63i19H3kFAzcnGh3jMTtFnDO99+cED5mBLqvxRm4l7QWJB+Xu6ewdgns5N\nRmkCdBbESTWMnT1/FmZFzMvvLh/ySNAFqSUQ2pUAY22Q/uEI4hdRRqE+LQPs\ntEVcLxkIW6C9xcbC4VPzoxr28OIu2KRd2nayYxW0fuNMCzWZlJhsqDoCG81W\nfHQ57UH32CyhmuPF506VVqu4oLF+7UvasbvupMbF1Fq6G9kXgEo4VEqib3TP\nq7n1\r\n=weOO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCV69rhTKkV8z8bC1yyKQLOytVfExKIsmnniLbPVU3IIAIhAMmzhPrn3hGZeodB+4nBh/4k3uyWQdX/ulKhZ2oiGmv+"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.a04c0b82.0_1587170074469_0.8126008611126432"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.715decfe.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.715decfe.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.715decfe.0","@material/mwc-textfield":"0.15.0-canary.715decfe.0","@material/textfield":"=6.0.0-canary.c4b4bba96.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ddba034f53f308afea3b1390f775b49e8a473e91","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddba034f53f308afea3b1390f775b49e8a473e91/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.715decfe.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-84MzA7dypntwvcPOgIu+mB3+t6+LPfV543mkZwxf1F6M5J+yjy7oSDIbEajleM36BHdOq2k33wlaNUaaM5MV4w==","shasum":"82a9382111a031b01021a40fceca491433a0d2c5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.715decfe.0.tgz","fileCount":16,"unpackedSize":180030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeneuACRA9TVsSAnZWagAAA+AP/jgj7E7BhBnOXFznPCja\nS8JrpXhnHF2ShR/a0GUVQSj/sIIbJ/l0GyXrpDpAWVauhniqlr5fwBNZDdFP\nRbQy1BlGyIUhv1ydreYTHG70N9QokH2nZss/SyjiaoSmAGKn3HveFcx8a+2i\nfjfcYbOMHfQ0OGrtgFbtJK/5wAgrApRX26kd7+sMbA0Mpgp3rO6JI5hrDWXL\n78W5LvZfeouHIGE1qukv6+unrmdfhEOgaXEYRlgDYi6VICcTnAfjGC+ck2qv\n78e58R2oRAPVwRl5g4iEY0MWhpqeiSoU7ELMqj5JzJD7YdLQYKui3H5V4KPf\neF8hmWWMtkT+9U0Xli/D47JixTwdIXyAj0HLNIHFNSBQStrVYyzP8PQjU8GH\nOXMUt/YG4tlSVnTsLLrHQN4z460HYzClCdyT5Bm6LWbTPAI2UEhOA+0uhSH/\nZvNXLYgfFBuGqbGU5zMn0V4jxyvyr0k3Zqqz4d7nGNERzz5kio7DAiB7qDiD\nfjPrnDmkNiQmHHlruNXuqSZuWsLJEUAwf19zRnjK1TnKkoQjTbx5RbaMKyFT\nVOShf6rZfbJme54Jffrt7ebY6PVwOMbF82siPIEoNFajMSDZ2QhM1c0UneoX\nk0RDkFPLilO9rg4YIwOnxfGaG/zWRBIad24dmAooqviwLfchP3EIM+PZ/2jr\nKNEV\r\n=WNcm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqTFsGhQU9wP/V6Ybrszh6/JGEJL0pw2C0OXFRYtBzcgIhALPemNYY/xt2iJH+almUgwMe2KBA5pE0fEr72Vr6Dm04"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.715decfe.0_1587407737701_0.29849857068606633"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.c862cd04.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.c862cd04.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.c862cd04.0","@material/mwc-textfield":"0.15.0-canary.c862cd04.0","@material/textfield":"=6.0.0-canary.c4b4bba96.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"59b73d92f5709c37a2da654102a61dfabe148db1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59b73d92f5709c37a2da654102a61dfabe148db1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.c862cd04.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-kVLUv7dmEsFCseX1+GpFFyuNQmhgWpBlp32fqQbjfX8X3Ss/YZ6yxnf9q1Y6bKtpMVmAkDkLxOZDIL7eOUzteQ==","shasum":"b025d857df8606e1c48018ed50b53ce23081067b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.c862cd04.0.tgz","fileCount":16,"unpackedSize":180030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenhVqCRA9TVsSAnZWagAAX34P/jR+Xic6/ke4iqtdPSiH\nbgbgVJIR8rquss3UjGtYraV2abBJ7a0nzzMCsd+7if6TSfPTWONWZ6dpReiX\nIIhDEWuj8HSu8xqyg6tEWguiDvkxdyZ7mD9YfyyeaMS3/mBOonH1La1OuXNH\nbBFqqAwPjgMGWJjA44GVj3ylOQsM2uIGeeUN4wckzaYVL01mPuXZ5RTYOHEd\nJkkW9dBgwN4KV23FVGXq3wdhRUhgffm+tnCzZmErPBsFBR6/k/EQd7pmM6kl\nvSho0NK8yrY7YG0Il//++knRbCzBdq/iTAraEfwMwNSm4JoVmIBeVr0Nlo3O\nhkshtdPGz4BXl1OopptxCsBwPS/D9q0FG4MPsGwoslkq4dSl9cvlQsS32eCP\nT2cggnT+yfjuUYFmFCh2EwXYdwLxE4s6rXkLmS9XEKAoc2GQoxicJbNaLBRD\nITSxBOPjmyfnbMMAiEiNR032UuPeRXLCF2YM9RbtdQ0oysg22Iigy9iHbYbR\nsAL6dSIEKoMYuQyuu2nQs4OyiJVFRM8C9rj5mzhswDghetm1jFOfrEf3N3nG\nR5pMSV2vZOM6Nc5NznqJJXD7lMkPG6kNdhcna459rNEOktX5YhykqsU25+b2\noGeAcUMhatZV+pmN4pp9NNyz5Du3Rmz9W2YUSzwEpqqMazorH34x9C8OLmJN\nTWbX\r\n=PKYu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYc1ehanF6kNRAVf5dfxmDn+5wpqr5/0QEQZ6kneHN8QIhANefsl/t1KRRivmnRLCTtaoj/T90RVEhgI8yqGZ1nGfr"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.c862cd04.0_1587418473746_0.11710527402602011"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.e9b01b35.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.e9b01b35.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.e9b01b35.0","@material/mwc-textfield":"0.15.0-canary.e9b01b35.0","@material/textfield":"=6.0.0-canary.c4b4bba96.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"873703765efd3bce3e325a39e56707cb2a7c47d8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/873703765efd3bce3e325a39e56707cb2a7c47d8/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.e9b01b35.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-RHxBnRYc41zJrll21vjwl08cKb3/73XDDyVv6Gc/HnCqaLy168opud7Xh/ML8+zjRGPPUdhcKzAewAiAApDWkw==","shasum":"2fa7930f4a02cf2565dde130d7ef6826302f781f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.e9b01b35.0.tgz","fileCount":16,"unpackedSize":180030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenjBmCRA9TVsSAnZWagAAroQP/2tqHn/l7B29pMtbqzdt\nGq6cEIszBwzqAadeCE+1BYc24NmsHKG/Vc6ezeMje5jA8k6vZOvEfF/pkoJO\noHr12rT7sq5KCETDoqQ50rW19+058pkNMrwRS1OpvvXdiMk9EPwN0aMBpSLs\nohvQnM5wwJAHH/m1g7yJkDZviSVnb0HxoQQhy+qFbKwrXDCmr3rxNVg8n2KD\nxoOV8BLq9IYsXsc6QUz5p5v670ou9Flrtz1haUX4/wh2pDlz46xz3dKIHBs1\n0AErJDgY7IVV1pIwCvCMcf4BRIctD24eGSYd0OsMqyIJc+l6ly3LHZa97ebt\nda0f0rxh55BHVmUz6faRd8ZSZcrDwCWigpWC1XttoqhyFs5JX+Iq0HlNF65C\nmYAuzJ9i/JMNl95DYmJ1j6Wzm8aXOktNv5WVvIfE3ZFbJRONsePqSSgm87Co\n5JO3cW0XmiRONbLhsNUb5lV2rc8KbWEJv+25XOExT68IxpLhqpTku+L0U4AT\nQwDH0blyHJ2k2IK3h7oUQ4EKa9NVF+dnX9Ll9dNPmE6AgLgx/U0jCxtm4cow\nC2MAPZ2Ia2a9PgzcnQ1+5o7tRCwCUUtB6Dcj+frX4cTzmK9/7MlvbEF/v3AQ\nc606U/RCIjf65sGLKYTvooWp2LeR3J+m8qdQFr0f1VbBoiawX/HcUDwokAKP\n2mEv\r\n=NJFk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDlqWkKCDFYqVVKIZnuWXk3aUMjsDtp+PM81oWM/kbJAiBh5r8zqG6Qr5hxzLm/8bCtRUggsuMfoNXcHjy/vBG97A=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.e9b01b35.0_1587425382181_0.14478039714215019"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.ee7e8989.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.ee7e8989.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.ee7e8989.0","@material/mwc-textfield":"0.15.0-canary.ee7e8989.0","@material/textfield":"=6.0.0-canary.7b4482402.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3b58236c5ca9326b11d092c5b9977dbd601298a2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b58236c5ca9326b11d092c5b9977dbd601298a2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.ee7e8989.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-595uw98jlwLxC2Db05EVxXx68iaeXDffaY/bLTN18XMk72FORdl4Z3BPbFFrpMOlG6UCgFtQ9RFHfPEJ3gNp4w==","shasum":"4eee24bfa14cfb1f6bb69e9e21260b0790918f91","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.ee7e8989.0.tgz","fileCount":16,"unpackedSize":180030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenkOWCRA9TVsSAnZWagAAJeIQAIlEATlSDzGgFvaXWorx\nEbeA8Y7odJz44hoevhakb5oIQKEiATeXQrrRpKtwVBwM2ahtj2r/FoC+Xcxt\nRJKJjM3//urclwp8EKOTYY0xmyDKC5WPNGpzPmJNo3kGeE8BVzNf7xUAsRux\nxuDI/flWLWo7p8RaKQ0qkfIxe03EFfuYfmg8AdTaX5ltH0SapU/FiF+csAmy\nRvEvQm8XmlGdgE7wJzJNjSTJx3yjFyMdtezz5nSLMr/7cYrg1vpc28oPSRvw\nfb8+rjYTrUYFIXa7iDBE20azStHgD5SD+TiTJeIF5s0/x444KqtXFxFEVzxk\nZQSjnvgtktHnOHP9gKhQ2lKMHM+t/fROqx8tlnuo+U6G5KQNKoivOzQh0/Kn\n6LMA/8ZOoqxwRtGLWKKhgSb547Wd7eGzPOTiDe4k0YWUflcCOaQUD3sYERUF\nVTwuVOtslwaICU20yRsRLwd9d051aPtEoFnjh0q3VfY++S+LV2pEd6h4qvZ6\nyfmQQzALUWbao9ZY+vww3ZEg9wx3j2uP7wjHXGaWkHUPO9Uc0NG4JJ/P9uEv\naqoh/7DkfiQ0lwFL0v2/HNfxKeW7pUM1Wk/cg/QcaVkHs+f5RA/D1iPmGbhJ\nz0eTWEHPnFYpHk0t50ItWyt1an+ybNkXzDDa3qV8cfnsXdS5J2bMLAPKlPRC\nv5wj\r\n=2qfD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhq6w0shwt5jH27V8gCHCIsGRQ/Q4/TbjJhNf35bEsuAiBoIbj+2FDdK7d92+OJGvhuXalZcuJ8uT2Dq35an7LfcA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.ee7e8989.0_1587430293938_0.06849940599279081"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.9bf47ffa.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.9bf47ffa.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.9bf47ffa.0","@material/mwc-textfield":"0.15.0-canary.9bf47ffa.0","@material/textfield":"=6.0.0-canary.deda86d8c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"282e30290957ddb18c6119523574ba36c65d7abc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/282e30290957ddb18c6119523574ba36c65d7abc/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.9bf47ffa.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-yoNZVStZA+Bknn9g+pY+3qQeMR/A2bdoCJrcaF4LWBKDC1+XlRqMPJ8KQKnb53kOsJb6DvSYu5TIySDB2MvvxA==","shasum":"3847a8f2d4294bf308f5c5a57a46c3baec72c6ce","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.9bf47ffa.0.tgz","fileCount":16,"unpackedSize":180030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenz2nCRA9TVsSAnZWagAAu5EP/2WaXaRZT/JPK2q3cBQ6\ngOMgetOsf6whaF9o/fownPkZlgTughmJFrS2oplcN3pB7I0J/DTl07zp23SK\nHkT3WosC8E3hl188wpaTllFpTrum2fzxegsRAEr4+0LmrG9rVz7qOAkDNhMO\nglapogwafblpVomGEO/I18MvkWusWwOC3N9TPlNkylKbil1oAXbAsB3xk+td\nTnJ1K6LVfyHC65AAbPnUUKmP2QU2bhF29IjY8xm9I/YVKW8BaeXiCHM5Sdmc\nAp/7bygS5y9W0KIcRJm03RymOV++bKxyAmwF5rP1EJGbxIwC9KOJtI20KCZ6\nEUq2yNpgSWRRT3QyNav4mNtUDDqOIR2RAlrpkCJjjW0M/sPbg9twTTbDjEqC\nyjVCp/YHmeyfizbemHO5GEOFc9BLUocJAnkjQ6r+VOHcahXumDIU7FZ9o6yh\nEduomUuU/Y2TX2C557vHQq1DTVZlLBFgMujQ7wT9Ow0NgswGj+baXxiQmwpE\nk+q2A2iJIF6wyBnSzXqdhU4pBybUWaZOf0qEKS6kljMcLOKv1H0LQoeX3ynL\n7b85pn+6Rosgziad7wLqJGG1PMe8qTH7j9ga8Z8k10lLjFcECY8k5YYH9BFn\nN9zthIUCnk3FEFiArKbZ8vHzxGIV3dWiwsxJnnUB6w3vEeHzfxpZ21ofPt7w\nrdO/\r\n=o8Fe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDWf5DjfyjLM6FqA60Krk2nnuM26F0ck8c2gOegBxV5qAiArEeEby9NEomaBi+qKDON0cuFGmggdjiBdOCZmCFV8ww=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.9bf47ffa.0_1587494310679_0.4114501070886585"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.078dbd98.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.078dbd98.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.078dbd98.0","@material/mwc-textfield":"0.15.0-canary.078dbd98.0","@material/textfield":"=6.0.0-canary.c141801d5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a45b9b95a7710162ffb06fe74053ff1d108d5684","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a45b9b95a7710162ffb06fe74053ff1d108d5684/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.078dbd98.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-wiN4jK8X6jD0m+xXc2eIHgLIXfy4Z4hy9YOdU+NNY4q2//t2ZEOB0rv6fjIOoTLsttU4x37q+SIusavqEoHXgw==","shasum":"e5ad303d4b2594a8379ee472017a527cb85b4bb5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.078dbd98.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen2HDCRA9TVsSAnZWagAAG1EP/RaGlz+QUPEDgZ9Q/7NR\nQnXZc9zEfkQSUPpEyA5jbkurGs7l4vXY81RkY0i2c1KHdYXsKryLATu8w/ZX\n4CwY8HyM3FcGo4s9jXC0U8L4T/x92mpv6tx9RPBiw9iHRxpDYtkYHZsXanMJ\ntp/w6HngCZOIU4GNn4ed1HUi57zTdV+pk8ZuXg3t7HbzTZ/sGsd1LRuI6dGH\n2L1Xr2LsokU5stgObZIioEsvkSDtG2Z/Oaf3FQ1eP95lEYp7LO0W1mgNh+Hx\n3l2UX23Vtp3/cJYJ84f6OXrHIx9dHQiesPU7Uq0waTy92y15KkRN755U+4JZ\n5MVLVPt0y1/rZ2kaPjYxMyIgjkNU/1AZAMslu+Q+mWsLIZaYdQMmxJtFPsfu\nzIvRiXznn7UVspL8y73IStaVchrVjpMCNgIZdEFs17RXr7stmSTb8bCIAIAL\nd/qcrG8IBGul2CeobFxHNeX78Ze0MoQIb24AuL5qdA6BSzC+Fe/M9f93rfCI\nhkN7+MC6cZWBqUxI2OMddkx/aDtLY+AD2fBOcOPEragHiVmwulCC0b4HrMc+\nEm2/LI74o1/jmQVokac0Zii6L1txxfuZq1SuSZCc4DPd6ha8f+ib+GzH3gzz\nBAFGhtpiHDhfWEmop56i2IiZ0fIY7tLpER+W6rrATBzJBNd5B389c7m7px3S\nwTEj\r\n=boAY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgHyEHe1aiXQM+3LhYRvhfv18Y5RugBD8WkXN5XVP1XAiEAl8JoXKYKkRNPs7Ss/A04JL1gIXDElnxM5dO8TMZqGxA="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.078dbd98.0_1587503555222_0.24315256855312106"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.953015d6.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.953015d6.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.953015d6.0","@material/mwc-textfield":"0.15.0-canary.953015d6.0","@material/textfield":"=6.0.0-canary.c141801d5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d875e6d658b1a3287b35d2c77aa8274d9828fb46","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d875e6d658b1a3287b35d2c77aa8274d9828fb46/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.953015d6.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-GOXZ8cL6OOuVrnb/p0ptgsaO8LsaL1Mdr/hFKa875Lx4NX/tCu/IhOQOv9p0Kp1HvsnTmVjSHlRoyXWuPFv38g==","shasum":"dc2f001a5f6654513da930c3a7f2a0112fc0f525","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.953015d6.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen2c9CRA9TVsSAnZWagAAAZ0P/1IfncVRr0LBKjhlqKkD\nC6hnp/xJsflbj8zvrYd9ZvFDiRjOXGV4LXxvawgOgz6dgon05Z2aLEKUuap+\nRPZwW8Ag5kQmRS72J5fJR8hT7rxHPzQgD9GyjVH2wXqU4c1Pg9DPu2Q5mBhs\n3uJuOfwyGKrR+RH+vRsQRxM/5NQAP+VArWOpgaDBY+f5pG2AJsYAllTnREkJ\nzEkDMqlaCv2i2fptW7YH65Cp2D6glKJvnoYqauxwNHkKCLAJPPNwQ90F0lFk\nLyVRspDSpMrRzzh6X4fhsjNYfZ9XQBXCk1S4uuCTw6PuxkG/EZNkXF6JsCPD\na6WokEodVhSn1+gsJwKX0uOOe/jXGCc5SUD2PhHMcug9GCo9i7rL4h+Q/cET\nEhSUmjKgoIVif014oVGzeLPP9HpIHHAi3+x8ePtmNKahBgzZlJDWW//UzmFG\na3KHV3yBX1b8sj6JIxMHDJcAtpbG5clRdN7Ps7Go6lnQhX0xvuyh2c7hYy/d\na5EQMZ2FsTK4/EMCDjXlTvAY2fkcvqdhc9Q+7/qy3oT3bVLysO7ZXGMsbhSe\nKbOoBM3hNnP8kNhVIxeD567LttVOdC0sRk6CdOqaYjZTkAMEJuYE4KPa9/+/\nIeCwwEA4BoFJ4hTHxBzRpKlF5qx7PN7LvsLJ7OUL+ra6V4Up5NRZ9KsTx/gu\nBLVb\r\n=1bEE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUy7RRkY+C125Z7T31HKm+NZeWutD57HEmVsx9z50RZgIgW/OwD3AWIrP8VlOdbVZrSoEcIHkhyTtf0xQOUbd/BLc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.953015d6.0_1587504957239_0.7542244403331084"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.c360ec63.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.c360ec63.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.c360ec63.0","@material/mwc-textfield":"0.15.0-canary.c360ec63.0","@material/textfield":"=6.0.0-canary.c141801d5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5147ccee26bbbacc14a1d7d86adb845ed406bbac","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5147ccee26bbbacc14a1d7d86adb845ed406bbac/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.c360ec63.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-cR3nZEEOHCWzR9eGf1a3l4D04FsrHtGGA2xsqEGDSXRs1argRVQwvqPeclynt6YP+/pl3vJ9uV/Jk7GVhigiGQ==","shasum":"82dd9e5000c504b860c68d537fbb8c4002233b09","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.c360ec63.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen2y3CRA9TVsSAnZWagAAQLUP/0tAFov+T+V1WV93vJLV\nw4DoVjs65O1zl8lTidxyzelCxOYHYHcPGfEOY2u/hH9Pg3ZswAi/pV5ojSB8\nL65lPYX3nnkTjkDY1CbNqewPSsx9lIfOIFHTXWjGjUHzTvYbvV14aa5DWCTv\nWt96dygCYEmKncdY/q6DYZ1vGihB19AXowR1SQnsojNXZ3S7I8lqz3Yp9Zb4\nQ64GAI3ZdDre/hHH7s5e6J5mzpF+iszioENRGnFnNnRFAvZgxU8k9g5wBQ76\njiJd5xrNDlAOssbb9U7JLHnfNvq+T9wxYbhul8Z2uP5f9eULD1yBpQo9xqA4\n2CaqzdobE9k5cpleXN23zBvVNEsmub/3M9ICvM90TBkbNfnTgaTv5dVj5eWN\nno/0xwBIkNu+mxTSu+NuPjjDNa6iaZ37R9su4LPemV9KWAJXJcFnqXd5illQ\nQylG1YEzwBHHxPEyEv0YOUoSBUl2hHDXOtMLRtXr7+5mk0WiVe9XZmch/gfD\n8Uu7ibF6Mr+C4D/aIxuHWw73R/9dy4S8b1SHQRWKMu3J9CMoCM5gyZPpKStQ\nAHDT19gvevP+DK/IhcwzmaSsHUDUMiPyqyv6mV3JwYoQqsqZAx2BZDEZvZ3H\nbQiB+2+bucDP4THQZT/Rijds2lgg/E4W4f0vVwevK84JqFnVzC5CAiYue0Zl\nve1e\r\n=Ospd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnRjrEXDKqTkk4xNegrogg4PZbVMEymDXfcNAWICruggIgSeAbis19RLFadWhhc4sB6rh9Vz0If1TmY/L1wmOXgi0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.c360ec63.0_1587506359221_0.041552697182762"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.d71b65aa.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.d71b65aa.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.d71b65aa.0","@material/mwc-textfield":"0.15.0-canary.d71b65aa.0","@material/textfield":"=6.0.0-canary.c141801d5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5f57992160b26bdf181837dfc0b0ccac0425b3a2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f57992160b26bdf181837dfc0b0ccac0425b3a2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.d71b65aa.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-QYKEAJZNVjoc9pJo523WYjEAaH8BK4Cm1Ud8fkZcCGIJlVMw+ubjs5aTCRHpurqL69fe4ZyaWcY8vQl0bHBssQ==","shasum":"8f78f1ab96cf2940c4e71ff4c015392619960ac9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.d71b65aa.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen3XHCRA9TVsSAnZWagAAUYcP/R8Wg5iU5hZtv+NqirLW\nt30cunUUUH3JKwGr2t5/EkIPZJuxwAQ/+QYjE+3siyyUjY95JFlRv8DbjKH7\niMIK+O0YtQgVeFRkUeO5llKwjsdWepQTlAxozUAju5fpEHi6e97v5EJVlOdB\nmCwi0AHgJiyV9dQvLmPbSdWON97Vv1k0fe8y8g9uT/Gv/J24FDI/CZJQFF1/\nb8qI8BaRJHKYot34SmKZ6uNj2rLlWbcBMBIsXSIkEyAbUCzq3VLilApskAu0\nlAXo9LzyhAitk/JGe7nZufhR/W+/ugzaBRjvSImFThr4PVIsWyPXvmImqeFa\njkjX4gzCF6wglg0sIecrZP6DQcA3S9NkGX/53HPg+H2/naLpqaUOAa+xd40X\nS6vS7fkISuMTOByjMHtp7GOqyQ5pfPoyp7GqNUI2/AfuuBSQ0h0O572pJYZc\nqoY3caO6OUwW3erjsN7BqZa0VR2oV4+B0R9sDF2EXvpAGFc5tfcFxXUaugpd\nxrDs91JAVct9FpKTC/MdvHknCLECebrX0LnDMyLRwFnEvnxT8UO2VfRN6wgS\nhsKRr7t0tVALAG/fB/5VJ5JvRAZQYNPoY5jtem25TUf+rcv2ufgUqx15/4yk\nXFMxtBqS1KIlqb97KXit06sJFjWScT+YiHvZaV0T6zNQtqHYgLaYP1z0tOuw\nPMzA\r\n=ZA1U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHNg2K1uNPjfNrcGGjhwaK4YlPj4DfPZZQXNQSe2Xm+zAiAaI2WlH5eZai6s9h7P9Rn9UuyutoJHJ283SJRWMGfgQg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.d71b65aa.0_1587508678754_0.8112236772094563"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.58d51135.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.58d51135.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.58d51135.0","@material/mwc-textfield":"0.15.0-canary.58d51135.0","@material/textfield":"=6.0.0-canary.28d10a96e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e70b1d32a2db9ff5da6f37c7b50790b6269e8b0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.58d51135.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-N783vNfjiZPUBSW48czsTVpJXpUdqrzI5id9MDyng8oL3fAmuV5C2njwpQi+SwFNlwU8WezDq7q6AMYvTsjZQQ==","shasum":"50997c2ac2d031a48f9e0ba63f23c427646e477a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.58d51135.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoOUVCRA9TVsSAnZWagAAl2QP/ipX87J8RVqTVEpuPxkJ\n4kg/wS9+1OJDXrQJD7Pq0X50eRmk3yQOVoHi+wwxu59ChstlJnwpVdtKlgW2\n8wzUKQbvGmElgaNdTr88JC5LltRtQGB2oebIoENXaFJS9CgAou9HRam4zVKN\nSH8NtRfauw/WBhoYvt+qMIInWDW13ATZYgyHcmOV7t1JwnsraNlfOprx4c+F\nOyvLTY0yB9kuP7QeQXOebGw8LjFFgbArza8tfMQUeZiFWmyDkIeLmGguYMaQ\nad6nj4gK8c377Wguhd4yb8UQiEOEUFpuz5jMegnt5CGGTbGRqOIIfgvHB3wR\n/R843Vv9FGuVOW8h+z43sqCJPWT3yXJompm4HFu6eBIPNjhbqVziXpEvoX92\nABY+rcuRgKv7ndMiKo53azO4PbOkP5KRBNWnAmdv9yTT8KJ0MmVSHVtT4qdK\n73T0TG3RqwgpPETnSugWod3Zk0tXsFRDyP4JcSUXR/+sQQkXmqaIl1rpw3gJ\nZpCcxlDoOtfVVjS4O9+wd85Lgu6kz0Zgb6yRr4AQZAyNWirYdn2jS6taOoEd\nDe4+CpOpaGeCg7fwk7SZUEaUJDKDRPsCl+H+JfYvcibjdhClUkBbhKLUaVlR\ndONPQTtLXKRRm67tzA39h34hqLimo0Uv6hBF/m4t6eehGIZFZdpcAWziiKwD\nm6lC\r\n=GmI/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOgTEDO5wj/QKRJB6wcx+lFq3opRk3yV5TB3fS9xGO5AiEAhvm6lYWQQbF/0GmLFZmLGJeR7Ql0EbvmeLm9l3AYxBg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.58d51135.0_1587602708991_0.3037923620245031"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.d0af8ba3.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.d0af8ba3.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.d0af8ba3.0","@material/mwc-textfield":"0.15.0-canary.d0af8ba3.0","@material/textfield":"=6.0.0-canary.28d10a96e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"86c71b26d7f2ffcaefe79c4882ac9867bef12b0e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/86c71b26d7f2ffcaefe79c4882ac9867bef12b0e/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.d0af8ba3.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-NfFhOoW7X+Hi/Vi7qGNKnXnJy0Cbri1WzDOnATJBv+rINhCyqf019n9pliAa23edIG/8IMD0DJ/WoifhVUSUNw==","shasum":"f74b5d33d77708c33b18dd76985ad635beaaa870","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.d0af8ba3.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeodoQCRA9TVsSAnZWagAATDIP/2fW6lErdHmYmpgAd4hD\nz65v+vefg4X5dd863AYuoG7kmeJpbQgW0TqKADqnP+DUouugq8jZBLZYg/e0\nA44XJgwgGsvxNsrFVZBaJEfveInbIGu8AgT8zEVDbGKiZ4kCl87+fwMvlfaJ\nP7iczCMKzhVMBVBqRyOYSOCyokwVowRPEeJSQBEEVgWUC4ZN7P2X9Kbc+37f\nuCc7Js92HOVjvJhxSX+JA7SKf4BmaLRMdiBHHWfjwAqUH8SyBHNBF5PITjzz\n6cH1Sac9hDOEpXe8/97FA1AS0cCtN3CecNdLClzZGuFJykjrzgIvIUc6TTf6\n4XOfpEfJ6Do0drvPnfSkhOVuapmBS03z3/X3ZfkRVj+uLxnGX6usNuIO+YJ5\nOfknnIn3Qpt5/1k+BuGCphePHh7bRqlhWlqgPAXQi4CABZy6bFD83wzFxFAs\nFonGqBww+gloHAA5PTcT56wEDOVldJ+//Ghm4aP20YiJuLPyUbwd1c1/w0AM\n/UvTicJMn1i0TGFI7B8lvzO2V4EkATxK+mdbhce69pM1ZHwwFZcoogANFaR1\nG4loia84MDhoPs0n4z2LLMEqlpCBTkWyYowNU+Rudbfh9qjSMbfirpTOQ8uH\nXPKbfAWiFSRmIIZoPi94s9+Bo3Ez1O5XdM21edQKnJFWIHFuNLNboo5gERBY\naFY7\r\n=XShK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7p3Gky7lc+mEAKNSaxPdaLUId3EdbcJDQsgrQBFLZPQIhAOxGCtXTmt0uqy7Ogqmeh//jJmz++uxrzEOjV65Q4e3H"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.d0af8ba3.0_1587665423611_0.3987347328588353"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.8872b17b.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.8872b17b.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.8872b17b.0","@material/mwc-textfield":"0.15.0-canary.8872b17b.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d1f49732d08170a0330f9fb28f2b2ca978daf858","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1f49732d08170a0330f9fb28f2b2ca978daf858/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.8872b17b.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-k+sBPVzLBQLyqkr7BPzldOb8+FNfJQJQZyXPKNZgl1ZpVjFPjwMGHVYgHxEFJ4QBGyQS1Guvf0SmkvV8zaLpcw==","shasum":"e7ca3932c39d4ce0631d5234caf4495620d1aa58","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.8872b17b.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeof1uCRA9TVsSAnZWagAALh0QAJ1g9g2aWyvL1D36QUdQ\nSWWZu7yVG5LRIbjgzt0AjbtV7bTzpPwL9wKpkK8F3j7TIxtkUGJHcpE+HQ+v\njwOTz+p3BYRcY89SuJz7mY7DjqjBvE35NXb/q2n/FxSNb5t7Xa89DjKbR2Uo\nCx2mV6or3IlORQp7ZXncKVTVbWohQuGpW+3Xsmy8WS363hNLseR2x9WEin1I\ndoDZB6B1aoXtEd2ZQH+rmQmQRPCTHMkVSSkU810W2EV808YMJOO/vEid6CH6\nMPwwiuQPmgMDJrkozjmszJtVGkQ7MKyvW9pYwxyzHAK23tSFjrnVMoFaQgK8\ndmEpy9vADcqRBc/m3/PQ0h/4SPAo+1nkYKuFMjq1UCCUvpA3UFC7Ltf2ttZT\n0wRs7kVWgY4sUuV98p4t4hfJ4WzYH2p5+0AKkmgMbLh65v35OFVvBKqG69V2\n50VOvyCTZnZhuRIL5+gZ3VEHrLstSRd1p9MSeMkNaR7LWPy6DCJxnuGcx/4v\n2ZP3QR0a3r4ivuWjDY2HvnLuC/Kh471nl9ZkBjKP7ky+XkzolHL1KofLP6zh\n7L9yrMh6j5SBg7z7etMc6IfpVq6Y3Xmt7MPSBkqlidASfPzJM0PxQVWiy4PY\nDR4NCmVVuZvKtQq1mUroMLD6x9rJpI46kGRD6FTEFIGhcJqRNXNL1WlBZwdc\n49NM\r\n=gZje\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETacPf+N6Bway3nQ5okxfbQ0AoN9IJ1X8SisTI8JRElAiEA3AkaD2rWc3TVDxfXoeW3yTwr5phsq3Ru4l+cvGNyzhE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.8872b17b.0_1587674477928_0.031189873746331864"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.eca1a610.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.eca1a610.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.eca1a610.0","@material/mwc-textfield":"0.15.0-canary.eca1a610.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2d2c958e6704a2df0a1a210e3c3d050dbe7a50f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.eca1a610.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Cwk99yknHgRyldn3u92xG8iAC1rOL9YHb79blyEIbBtgnrvVssc5Adve8WHJryvtxXu6r9kdsbqGAqo9LNYmIA==","shasum":"29471ceca23e2a60bd028c622e4b7ea084581577","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.eca1a610.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeogv1CRA9TVsSAnZWagAAuH8P/3nhUIGdP5mx4fvDeCa7\nMLCNMJgkKmjdLJBiwo/LXuCqaVP6/a2PIxFSBYhHQotXmhtiKOOzgNHpeVyl\naMEs+s0md6OGeO3dEUii8XVJsooMnciMWRVvKY5YKYG87eWtOp/GInbMWMS+\nhesn7JMxmd9qvk6/FbtHDreCnPdONqkaBrvYfjPbfOwL3lkRJvjchqs+2arE\nMK0t0WXmdJtxq9YqtPfhPag8Rmcj9yZ2caPn0raggIOKDAVfMdzJya5RuHU+\nuE9NH07PEZDYv+93XYMrYCgxyDgUiOT6EZa0v4Atf8zgX8WxOw4Ck1kY5E3b\n5ZpdpstHqs25QBruLkSYGCSgl2NAZs53jP4oGtEMyG22b1S2O6s4PHAL1oEp\nz0V4yr9HoWG0df2rlu/oggUjweBFcGcvw3PNymo5YwTF3E6f9HzonROBoBQm\nwY3gdA79O5eHtu7zdy82o9auXzHanZ8MFJGA7HJ6Tjame8BOymSvTuCj8qNR\nr8kJM+n9zcR5q2QmyRjKE7FkV4z5LtsHew5IWaYYDr/Y/4IFkCeKRPeB1DZB\ncRE8BI+RRBf/EYzvdq9oRC6Qiig+vJFRoo4uErcDnzMhGk6f++1eHBQT0rKW\ncZGM/EQVPGZiI4RMvI3uGZWr+/6vdqH3PjlI0bLfupHYBKj4qboAZgmYJGOG\nsoA0\r\n=gIEV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmKSkT8EVh3Cl4+7Az1qpdg0agM5Tq4MPxcRVSUEOlhAiBWzHD0lZR9/TknIbfhtmCUOzbkwBL3BumhCmyWgeJHbA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.eca1a610.0_1587678197192_0.03914945550168958"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.baaf529e.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.baaf529e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.baaf529e.0","@material/mwc-textfield":"0.15.0-canary.baaf529e.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4f5e01f380a9f1e5d4d3b0294d5110692bcdaee6/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.baaf529e.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Fmfv5XrgC7kOkYkEPpPIU9NcKO8/j6EXiPttIzdwDaoDHGYEZd5efSrKUI1RkuzN8IVbsfWYbOZqoZYWfRit5w==","shasum":"16244cd58241a43525a2a2153da693eab9d98b7d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.baaf529e.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeohpUCRA9TVsSAnZWagAAKZgP/2wTDemN4A/O3dwwQrSO\neUUQgVijMMP98TacNMOAoDp/dSa5XPkPCWRm6XHOo0CTFdlxYmwjjb2PVJXD\nwmIgrYCXHW2/vbXTkQsZGB30fSAi2ITy//1rWLhUTbLLPFBpV2Vuac+c1HdR\nHPp5/jkxbX+Ld4T70M4Zgq6kNM9NibcIiRhGqVQfs9GeEp8Ui6ARv2sTvQrJ\nXMm7xHPEG1S01E22+rwCzlXgM99FPzMbOXZeBwwPHrEgNM3j981WU4rYq7Ra\nVEZ3SuN9t4s0i1b8UinJS5V/oHmFsNnMkdcyEbbIsVaRHgAgq4IJVFqD84fh\nh4IitL7Pf2Ym2nMv7Kioxgdeu7D0sO4vTY5zOUcmnvTjwE/7wLM1CglSN5Xl\n3W/dfP8kj6paPMjposS/zP5g5kkdp5LCM0oZzD71xaPZQKFAVEeoBHKZMDXf\n0X7xxQh0jtH8mpGot/44mMro52oaKJjxXOBkeg1vZjtgJ8lTkZeg23zlMdmy\ni+CmayNkz3sAqSBS863s+RPXDvgS69CRI/jYqBMLylgOJijmP/gazE0Nlfok\n3UTHoV/bHtqeKG6FbX+1QSRzbsY04MYFoIsAij6zx/TGDEZY2AVyTafOD/ri\nSWU1Xut3oCIMKnTjD8iun6x/WZCOtOvSpnqUoaHhbmzA+Oddw/KXsoNkrXC9\nmBe9\r\n=woVH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0xBRQOIQfIGVvyW8CXn//Ii2AO8N05gW8QLldJgD84gIgQrD+239DRgRvYY/AHHFPayhgcvdB+23H4QtB/YE7T18="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.baaf529e.0_1587681875599_0.9943218524710833"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.7a7992a8.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.7a7992a8.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.7a7992a8.0","@material/mwc-textfield":"0.15.0-canary.7a7992a8.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b9b74b473b6026badaf980339f4451efd1a9e8b7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9b74b473b6026badaf980339f4451efd1a9e8b7/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.7a7992a8.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-qJV+FJvIkdjp2lRGDm1HAw+dNuTD8K47bBTB3gKhgwxxtVIC+K8q7AnA8RVpz5h5W0n/BDP0o+XB5KXepqrFdw==","shasum":"28b7749d51d4d95743ff463660ce986bbe94531d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.7a7992a8.0.tgz","fileCount":16,"unpackedSize":182622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoiFfCRA9TVsSAnZWagAAbg0P/A1FzQnQu9MObWc0sqMb\nHZEv1Uefq12pnwCYEg8HffE+/BSNHtMo+V+JAzTqFq9Ztf1PT0y44Bu7VkyY\n3FwqJ1bu8k7RFt1wkbk4l6VYAUIv8YFzxzHZlH/9ZnZoUr03cWq1HDGQumjb\nvMp6sbi9BiCrsmiNXZeXsciMSUoQyBP9cSJC2scol6Cg/66/2kl1CF5Z1AQn\n0fAhLHESHrZ7KbRs2WlZU4hRceUZCju7qx/NNELWTleMh0hfIh0w7APbDI8S\nUFRrsex+p2GH1vivI2kXBfWdI1hNBOkDT6rrdsO64UWwn9poAEqFAo4+Zgj7\ntELsglL77HygK8nQQqXgAS9GL4QBBNQfSnrSUG+mKourV4Yd7AU4YoYkh8jt\nB8QszNE8FkOJBhRHFPe+CeDRgss/5R/cOITx0vKyWJ4ozSZXyXI7gnkHjbdR\nwg41u9mMQME+cZJuf4uUcPvpvqf5butotu4/1zz58jbKEZIaaTO5lK3d8C6t\nfGQxxlaAudl8KbBguZy+SD+iFinfdKwL4zv7fi1BSYxxHIPw8PvCsTEKrsZ3\ny/VJevToM9UlTe91Z9Hl1mrS+cNJ5ypKplJbnnPD6FNFS2JvqYXc4b7IpjxO\nMCaf9WwXFrP01N1razXRTRf3kCiO0x5EQRidlWeVF5EyNqOtPvFKlPrfDTK9\nbPAv\r\n=qezd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHR3MRC0ET4vAPDhjuDeS68O4mk4rEG3IXecAPVeKxbpAiEAljGMdbyWHd5VZZP/Wd9MynAdXBldGkpDAjKgrWndHhc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.7a7992a8.0_1587683679091_0.019345645951910795"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.1150d64d.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.1150d64d.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.1150d64d.0","@material/mwc-textfield":"0.15.0-canary.1150d64d.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0b7cb5830938900ecd0b5201ad88746d308b91e8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b7cb5830938900ecd0b5201ad88746d308b91e8/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.1150d64d.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-3qicZItpqhj1EGSTr48/P803DIM7/SPnI8fh3vzpc/ZZp6qZ9iVdR0BnvGia1iLrdNiRxAhrZslesCRqqXWNBw==","shasum":"b673d9632959f5ccd95b111db925ba8d8b8fb0db","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.1150d64d.0.tgz","fileCount":16,"unpackedSize":180393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeojBvCRA9TVsSAnZWagAAtHsP/2oMw4HIntw7r2GeD0fA\nfCeJeVmrMSW43Z5V4olUdEMiELUE/9A9XFnkMVcdsRAjLo3j8mwWIxLeEQoa\nHbjZ4YATofBJ1qLLxi0jdpH4DWXF8jBBBq3V5SM3qVPSQiopzyQIWXzS1k+0\nLcWQmkOqxObll2ZYC914afAh1tO8wvhaCisBWWSq/x0ioRoJM/zGSwugZA7y\nL3T/rLdWZ5h9AMdlPVmP1RmV9BqAChoWA0CB+/mmDteqn/czw3RTwHVdzJhs\niFFpyA92dM82urlvHeskwghimFaPJxOOnVoqLUwDv6ig1nWFIG7JMd0tTQRk\nQHD9eirnDk3ITNXjC+hBqOoE3ARFrQ/HXxF/etuy+J801Rsp+nZeaRP3YeT7\nzc1X/awZJWbuRu/Qmak5JoC2Eua2WAdxU0BHVf3VAQfrq91sPv9EP5OUIrpc\nwoJFxtTayLBB7hfNFiHqHSE+WgMBNzl/L1nTeW1yKO7tGQwq2Abw4c1EKhgT\nStRFcGjARc4CwO1hcvscx8+EBXKfcqIeH4uhFtSJMsQS19/JnUz5jCgIOpZY\neeWhzv7/qYr1MsL8nazXM3qVxym2apmaMF9CsVE9UYI8mRXUZCziee1dPQk/\n7h+GrIGGkefoDkRQY4WB/ni9XorGMyx5mavKJBCktT6tZWDBY5WeTK3m3zf3\n83g3\r\n=UaLg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwG7bFpd6j0XNKlH/vtp0w8O6Swl3Ic7mzl/VK41p5AAiB0eWrdopjmCXsuwPDGLjeKZ8I3EmAjjyTfE5jOjHeW7w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.1150d64d.0_1587687534798_0.47449618729451504"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.dad3f828.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.dad3f828.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.dad3f828.0","@material/mwc-textfield":"0.15.0-canary.dad3f828.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ba9b04a7b15588d7423d100bbf29fa317a1947ff","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9b04a7b15588d7423d100bbf29fa317a1947ff/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.dad3f828.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-yuEUf9oduxzGY9MFQfSG0IvPc9BNukmg61niSoDJE89IMXSeMa7rxPIeAgdS0+iuS1GMzsS7Y/3SqHFZzCu8Pg==","shasum":"7f0e7b2efc0741118756adf1aefce13d98e8a2bc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.dad3f828.0.tgz","fileCount":16,"unpackedSize":180393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo4eWCRA9TVsSAnZWagAAAzwP/2Kjarkeza6PICQZaNDn\nSo6SgAMn5qe7QqAb+jA9No54q1Kcpj/meh6419sCpC5qrLK9Zy0Zy9HLSkWd\nSZUlrgS197Fhns50jGapUiMhT2zBTeg6RgtBIL8IMZwoOs0kIbV0XOYIEYoK\nuDyaZrYpGHoDlZskNsuOpDKofAWsZhgz087+0ZG3tFroIk3fDBv13XIAw/+a\ntEOLuTmCYrtlF9lNk8yMUXgVe6XrWk/Oq7UEgYPlwjqbH2RUikO7cb0GnSrg\nRjTwY9X9BnwbFySFxAOZ0a6iu0fvRbJh72A/HiPaGvoLkg7I8B+iFvbUpctZ\nf/yX/eAh57k2PlrOMI7on8/kCzfRNg0ZbQyDd/F2qhXnGKaog3FAMuTiixBZ\ni/bCusYJQiVpdX14GpvS7qH6EbrjJwCZteq7svzCJPC/PoNq39uzZlQa8YIU\nP/yy4L8OOPYR1mc+z44FfFYtNNtKWhsdQKkcygnZzYRIAM14lPNoVPMgyp8y\n8lT/HRUSEr65vRdGmdlxy7mzdTe9pn5pRfagczkbcG8WzTz61Nf9EnYlJhUP\nnSEBXb/cE3pFVY6q23vKRdCS/gv9EFhhl+IpOYAhakp8L90H+qRVEaetE75K\n87rxqEICZWc8up7E0Bal/KFunVW8NoCXxjNtNxh3s8JWQbrLCDVKEDWOyVIX\nsDAX\r\n=+w3y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC7O2w4IFTCo58xH+41XVkr5P/qTdIcJsoZj5Ji31pBwIhAL1WPJNrX1JJmwQ9h/VqWFxN8tWlerton3Fcs1zuK9cN"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.dad3f828.0_1587775381659_0.8043455091605725"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.1bcdb47e.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.1bcdb47e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.1bcdb47e.0","@material/mwc-textfield":"0.15.0-canary.1bcdb47e.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ed51e46ae11b69727c91d55f440b68af397ac10a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed51e46ae11b69727c91d55f440b68af397ac10a/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.1bcdb47e.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-aXjhyCw/CbSiNGcWCMKoYN2cewOm9C64GryZNj5pWI4B93KsTAFOLS3pjRIvVe4BUZd3zfpO2zP2YJ1nwtx4yw==","shasum":"7dd3d8e1dcd0ecdcd47872881190352c1ff69b59","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.1bcdb47e.0.tgz","fileCount":16,"unpackedSize":180393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep4MhCRA9TVsSAnZWagAADX0P/i30mRMRsXUGVCA+v17E\ncUu2OAzfw3eLHKmxIHBfKgeDWGL5YAesFr3HPXeN6pHe1djodJA7zaaGZ2Bf\nlVqemNMP6oE2EhTLl0cpS2CrDEt13m3qsdvGpcm5nqC1QF2mZrvjn3UnkgiZ\nwqIb9h5VErsDcqA8yX0KSVzUxDf85pZ3fWnPrmgZIt0T6AOV3MkOsUjQSTnl\n+i3L3kCARvsTQAfWUJR6s2IiNUA2KwHpIVlaGbR94oPX7x7p21/FArCi7gDw\nzeFFgWERX20N7kIWMZtXlpFtOihk8RTL9oV94HCJj0Zo3a14wLA0veCx21ii\ny6OtarKy4fc0tQjRSUcMDR1Qj4diD/A/k7fegsodVliE4vO6NGKX2qecgnAc\nI1DQjNFKl5oUT7Su3tdb5g++C0URV6cxJHSkPPPq94J5QEcLZrnWaKKywg3I\nL8/ZtDAtXBWVydeUsoaj0Yqs1Yz0jUYSiokXkc+u7u1HqdCEIHS4+kCKpu69\nVtaU6oZk9NivhnbSE9HuSq9VgdWxf3oo1QU/oZGetlRdPQIgcDcVrVZ5279H\nYI32dwCAWFdRYtNf422CT59tzGJykc4ExX3GrUD8N5EQO0yQSCu88nb6164Z\nZjFG2q/2/+2dNoDqulqkiYVCx51e6Vz5p32n4QCPoeE1WvXy8Vpc8zzKBjUX\ngESe\r\n=bcCj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+fLccZhHcLsjyrzzDMvMbLtwzAbHScmDxVQk5/LKEgwIhAJQ015A80M6PLI42jU1wonfY12H8cPNGxX819Y0fRrcx"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.1bcdb47e.0_1588036384634_0.907649790593561"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.86ff1b9f.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.86ff1b9f.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.86ff1b9f.0","@material/mwc-textfield":"0.15.0-canary.86ff1b9f.0","@material/textfield":"=7.0.0-canary.8540808be.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"61a98a59545d9e0b0fd96c928737677f2b981fb8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/61a98a59545d9e0b0fd96c928737677f2b981fb8/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.86ff1b9f.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-HLArUXBkjE4jezMeZ7C32IUcOKcPSDdkCMpC+WMI7qt73CUnc6qp883ZVuMH4ZOimnvPWu+Hu96O4YuO+7AVgw==","shasum":"79d418636e8a0b5253c13af570c96b69db45a9f5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.86ff1b9f.0.tgz","fileCount":16,"unpackedSize":180132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep5tBCRA9TVsSAnZWagAAN5oP/jtaWfrAD4JtLFRAzZ2R\nTn8VmpA9IaVGlzh2DxgfGG/BnGPkFUy3Proi+gGBMGP4V0NYWt6r7IMpywEx\nm1HwCDEBaNaLOCn+MsjILE/V4DAV0YtzmWIiRMiHrCj5uuNb1JzxyPP0Ic3s\nGjmGANq4rc7Q1ovljCeWQYZFk72TgjWShVeGBkWs3ri8jmKn+LB9hCgh6lj9\ndObg+HvqpZxLKCmaFenxOX9hQBuutEXL//6LphPF4ZROSw4Zp89bMR2SwfdM\n5oQCs+Kday67cZinZc+AZhbR8WzsiZAhssITEFaSc1m6IRBgH/nvyIEhpFbz\nfsNc9F0XRTkl12qdRLFcCE/akL2WPNFkzjG8xHX3MHUtB2+DqC3K4ks937x7\n28gEi3+4D/y2TF2iyFRKR4IBDvfNpI9q4W715rpafRFIX4djCC41T87aoVg9\nvuRY8z+n6qz/zYVSVZGhjVhvUeh2/kNaUb3oQEKxBgm2O3HW2NtHhYBulxGt\nbef1oPNJ1wzU0dAtOsREIjrFCc4JfDJ56lAFklZmi47A9qJvrYi2ErSmK1J8\nMyitNPnTHDQu2BWNV/ffuEJUM6tfyjiIAlbqMKF5OCkV2A55Jr27C+PyX+Dv\nOXqPvMzc0sK7TfGdBniIw5JOmRgPwjrzEIicldu5G1erVUED/GroBw66o0Dj\nQ7PL\r\n=xHWY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgL+NhV19NqIKI+nLREnmVVu/bdC7sEjn4TNcz0f2c8wIgcrDvp5kybgRwSMrlAk1dvfV8nPCiZ/zDSlgPiD5RvIw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.86ff1b9f.0_1588042560733_0.22258017398011232"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.54a86b20.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.54a86b20.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.54a86b20.0","@material/mwc-textfield":"0.15.0-canary.54a86b20.0","@material/textfield":"=7.0.0-canary.28d32f8e0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8cfd732e72200c6982fa6d6fbdd6cb5496660a6d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cfd732e72200c6982fa6d6fbdd6cb5496660a6d/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.54a86b20.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-plXoEibpYmlLGOBVe3/KpcbhBT0NWQudpes6CYluLirtIR72wadlRIY1TxF4rajvs4v7PEGNMmYz0PUrHLru/w==","shasum":"983c215392b21459223aa13054a387528daed2d0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.54a86b20.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep6B6CRA9TVsSAnZWagAAYZoP/i71gYPTKw6x5aP1b1jC\nNDlIvfIgAQ+g7jGH8IBVgOtHaAvimpcbVWC7pABNoPMnndZxwf5P17B13GDk\nzLx4k8YLzlApFGJ7S1t5fovZ4RRXZU/JpZN4O/AIxjic8f9+S9+hWxS/jCEc\ntixVjoIxytSle69FKD4K5VtPnj8eIGvZfWjoYAE3m+RJ5H8RJ8Omh+JJpuy9\nQ5nNsxJCr8gy2T8oeA7s+ev7SXLo3FSWEJnkHeg/1Tz3IIlQYY8jNNQ7OxBA\nfg/KBoNrLP6X4HLGBAhP0qjYYZkbAUiJgId7LtI9BVWulRMjAkL9NvYjVu03\nU1kuyt4MMcXLtJnIEK96hIO3p90ZmjHvlIEUvhpSubdu0lOeJ9VK8g6kHZGp\nZmeE2wCwIfq7X4nADsQ2+SpoqZ6WusWLLXL6fa6HMO565eGqy11Tgw6rDHph\nM+qb8LH7ACBPdyxqFue77gIjzdSY8C7OW0WuTBNq90T4RqGM1uHxhXG3C4K7\nF2MAR75E9owiN/Liky5mEZh+/zf2qzZxLsl9T2i9Oljb57yOrjlTFBtFANJL\n5npIHeyHplbNcR/ZoMqkQlEoom8jZnyamusHYC7Au6ZB74NMwEvY0XYdHQla\nkcs6quGSVQWmxAGSvICBdsiOKNpY24CTW8c+d6ssNXNR+fsr86PrtzK9LmTF\n52XT\r\n=ami7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH186yvZuBsr6Vd4eZcjH20GzU0Xtu1+PYtNTZcKPn3jAiAzh+AXd6mOC3l0yuE1WdWzsbT00cN9IpX/AtvOyrezmg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.54a86b20.0_1588043897830_0.9275276852504633"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.938fd24b.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.938fd24b.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.938fd24b.0","@material/mwc-textfield":"0.15.0-canary.938fd24b.0","@material/textfield":"=7.0.0-canary.28d32f8e0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b731aa2e74a3ad03e8d40736e169d0bebc8d8ac/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.938fd24b.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-DCTcbKW9QqaysdrXAa6nbkouSk6YK5ukRd/Yfoc8WAgC6F9nl2cskUp2SJWkR2g46r7vctCse9a+FRZfWqcqeA==","shasum":"6ca36b687f40785447352c4de177626b63f8bf55","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.938fd24b.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqimDCRA9TVsSAnZWagAAi8AQAJ6bdgcQ80KXhkM0Knoa\nIn5xjwOrM89wqPi4Q2VhDDpIvvRyqMSeCnRxgA6duGrGQoazHKrL2LZbDui8\nmg2BPto6nv58eZrdzFOZ0U3Jn///vLhCHOwDHtv9EVRYGPZqXnvqsFgq8NqP\ncnlqc2KiULqMSqjZ2sjgMRlNZqpEB81mXpVY1URVxL9nqucBr6TGz1qRlrK8\ne7FNV6+9ZxUhEryK60HpN/pv6t7T/GI1Lmk8ETlZuo2YKYHgC5NacdLS/SjU\nMG4/kuZtWxtXBSX23uGe+dZOvEPvNvaRyRHgGvPT25/JPh6TAN+s6pWLptLI\nOmdQQNST1DHwWNuB0035Ew+j4kbOJqVJ+Y3SaqQqBaEJeea0xlR5pbHg/Mhg\nxkpPmyEuvTloEHN54wT7f8DbbgRTSFCTb2GuM3n21olOAmjwAR49rmM4mLPC\neFMPFAj1Nd5w7jzDmg3ryFbeznbFtgqFRdNM8cFKREgPW11O90lqNbQtxqJh\n0yXCUJ0QaeKdcIZZJlimbNt0pT2x+zVeX1JqbOhNdYJjk0p7YkvKGFOv8LgH\nhYWjGPSKDPcPItyAFQZBea5xqKD6ekMsdOezo9e+2km4M39dw2unxkoFuByu\ntkuURYfsQC1PozBBZQBWzdToymgrB4EmInKMH0glfIRnK889jvn/sZ+68BKq\n3ZgK\r\n=a7nc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8PV8R45YUA7046rFuQ2EigmcqEHnOT6QNOeDvDjyMIAiBKhd2iGeWu+D+5SD9i9rFSGP9X2QsqNau61OIuRCjYvA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.938fd24b.0_1588210050737_0.6294002493441073"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.39e9a008.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.39e9a008.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.39e9a008.0","@material/mwc-textfield":"0.15.0-canary.39e9a008.0","@material/textfield":"=7.0.0-canary.28d32f8e0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2777862aa4cbec00918605f0726651658a2c66a8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2777862aa4cbec00918605f0726651658a2c66a8/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.39e9a008.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-RK+eyU8szUlSZMeNLmfjjdJtJH7Rng9pFo3Sn6Bh8ANv9nUBnsfMLe2S8oz6yO9r/l/AtvamBmnH0rkkyQQ+7Q==","shasum":"99e06668f6d18088c03f4b1353023b232eab2b5f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.39e9a008.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqjRfCRA9TVsSAnZWagAAKowQAKAABzxnVKCoS6aV/WKv\nfeakMtSC5+Nt3dPKK9h4tRm9zhRTNle3MuCtWxnxZ4K4SUCD6IR2iLQ2Xj8A\nDr1Wna0zm8iTZ8eNrhu8hPktNbzQmu4/sXMKJLngiWTUYTfgPUofzQB6C7WA\n8wITTk/mQFbgvJzdDb9pxdY3dp7ICg4CF8odX0qTT/ZJLvk79Az9sV1IuekY\nlq+UBtnJ2yWwMSetFHFkdg8EDana9DOpB3/TZLuVKjNLLHVo3Wcbp33ChVmG\nuMVZ7m6jbDDwhh27cM8IcS9nIjq0VqY4UO0h/dgOx+qsGyu4zeV+3y9/Hr8I\nY1Dg0dXFMcqzF6nLrjogpmBBNUtIMqfh+FylOQuh/Rwl4hP8kzqzT4hshXta\n0VKjJ69756GNro1jVZNEoe5M/mQBLhr++pQNPkC/AXRMIIuzw8c811P2qO1B\nVI1ZDPLv+rmVYrbAUJ2Gngv3DESRYNyko/K7Hs74rFq0NIiCS2CshmTLTeGS\nz+iO6AmPaPqeN1Q6HKzqbLW2ZJhRhejQryQB3pAC7Ej1cMCnV5JXiM264Hhn\n8xpVZzhQLYoz1o1IXDlzXJy1Zdj8+lgQrHOQaqWSdtwpns2vzZkZTRl7bvEb\nFlWtA6nKzO5HDfNQ/GwMKVzUNC4eVzkAYcXGegaxveOOaw0kbTI0QQp0zKL6\nnl2D\r\n=4btI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbEH2t6Ttul8/zHAfz0L5WnnJigdRtsN8lWbw/4ik+fAIgV1fBLFzep5pwT1/ehUgNzbfP63DQ11FO4xmq2E/wI9Q="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.39e9a008.0_1588212831191_0.4261095731533149"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.f3b365de.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.f3b365de.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.f3b365de.0","@material/mwc-textfield":"0.15.0-canary.f3b365de.0","@material/textfield":"=7.0.0-canary.28d32f8e0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b6d6f6d4a289f46197727279f5e776b79264ae07","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b6d6f6d4a289f46197727279f5e776b79264ae07/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.f3b365de.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-xJDawkHHmRGV1bOzwpXbtb2f7lnZG5Hw5epK7OnjLrgIYAYowcZCtomMzQrPTIgu6naoEbJZnDJiX9GLQokQEg==","shasum":"a59d3eda1e80174fed2531d63ab27e8580e76045","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.f3b365de.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqov7CRA9TVsSAnZWagAARnAP/0kJSUgmttgHDSW0kYqz\nJ2CaQCAu9J+lQPEpiDgsfQCEQaW8YNQBP53C2gUS3t6Gca4Y7W0cQiosVvY0\ngYKPc0/wZV4AXyTrGEMRbZdyT8G6oizKhomv1EYdSmTxOro8lTGUV5fGtOab\nV8DKe8x3x5d3Ey9O4e8k/gAkE412o7SghzzGdc8br7WvO3Xe9zzas/pTzYyQ\nLLUwkB4RU10PHIuQuR9RBVWGa6/ASisp1K+fZUnvNggw7KCHOEv1eSPQQS6x\n7/HCFrSjs2u1d1RLwLVw/B7HqgPb3gLAJX1q7T2YkuuadT7zdWRTOYzMVXeI\nL6ae35WjoqJo2DBP8KAKau2wb5M0EbKwX07uZ6en6sbYZrA8lPgJp04gjx1g\ndlMI+BwHuFaVcSHRQr85AvgjnvgNl1CiWYqyqE6HxP/QlO/ijlIc9VwBiwCZ\nZZNAZrr/OoPnERB6WGTFfaLhVvXQkM0vuk6Ky3YvXVcuXPj2R2UAqx6zVmSo\nEM9a6KzIz4QJfMjnfz8f5Cz9SopGPquRMxFv7DRA6S6Ye+Wb9R+jcRrG9p3y\nDCYb+zxmYfQW8TJBrDo/tS8v04Qu4BrgpcyRJUizcTmjq3aV0WwgTcekjj52\noccdhK9LZzKl950LWIzz7DgAD8dcuZQqCHIfIRrraOYNOSBEGkRtdxfycjAD\n3ZH8\r\n=nz3S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB0NXtg1VcDAQHS5XFi9y031tdwLNGxEnzxTbNZYua5eAiBHvq/SoBHYDwXNQSp61hva+uDip8x4JmOJVr23DxkU+g=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.f3b365de.0_1588235258672_0.04130029959502113"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.cdbdf807.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.cdbdf807.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.cdbdf807.0","@material/mwc-textfield":"0.15.0-canary.cdbdf807.0","@material/textfield":"=7.0.0-canary.b0f83d2fd.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c46702178e5c5a1096937d4bd70ad6f4ac4d1dab","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c46702178e5c5a1096937d4bd70ad6f4ac4d1dab/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.cdbdf807.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-t6IGZ2/QugOPhJe15xxjzLwSKPFPsacJ98r7ITzG0RC0lT9a9YyZV2HM3Q5V7J4ZLEOrggpMWYilAZU46A5ptA==","shasum":"ed3dfc4191bc4c50de83d53352546d503113b706","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.cdbdf807.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq2oJCRA9TVsSAnZWagAAhk0P/iuZpRZXzmjyK74UsmT4\n12o+1zFJLX0xHLLHZm7wI9cwFeGZ3iPys4STxBXI+N+CxW22rcpkTc7N1D+0\nypUr0xy7H4f+vfnmZbAiUgs6DfRuwHEQHEhX3+w7MCJOniSlEUgUSN//6mLl\nQZb/6JaRkHEpWxRgnyRBLOBxckpZqJeso0TNAOHYnMMYEkF37v7o87+E9ccP\nylpK1gVrNSomnOrqWvZtmYahCgIX4B2u9IsCUB0elAEvw24tV9BuGAGsmhEO\nN+nOMYz8arcS24+PmN/ONzo8st9oiSVcObcLQos6boe6OXSP9UquYaf9IV97\n4T2TXo+1xNUWYy2GD0mM1Fyqpad+l3nY/8DbgooGSECt8sbNBHLrMiHL9kvr\nlnysS30iXWpvFKEU/TAqjHgA78rTnGD38+qEi4SXDl+SdeHIXGJJBtIegaGT\n9WVFcVKrBDhjLE2ccwdcPRktpTI22/u8y8TGJVM4L63np8k4UR5m5XeDbH9w\nt1+8PPQXDKCFKjw+wWDPhDYi0xJO2wEacoDpQ9dAlXA+BVRKRDBh0gFOkUhV\n89cBZz8kDT/zHVibgsrFpY4xSZnHJagknDFaK1kAW0wGFcZO7+UIah8cE2bs\n+RvkX2ScT7potOrP6fKCE9hDJpp9dCdBQFOmqKq3o3hWAnJoLbmbwdOb9AUw\nsVTO\r\n=jS04\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWXUPmwRHFt/La6QoornXouNHJUhopOjmwq1paM4iEzAiBNISzsTpISK/7AA9WKj3rnluZicCFbL8aYjFB2rQRXhQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.cdbdf807.0_1588292104665_0.3508603412326272"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.9995ae17.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.9995ae17.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.9995ae17.0","@material/mwc-textfield":"0.15.0-canary.9995ae17.0","@material/textfield":"=7.0.0-canary.e59906a57.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4d5bd8b757cc94e00dda1cdb19761b283a15eeea","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d5bd8b757cc94e00dda1cdb19761b283a15eeea/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.9995ae17.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-rac3s7QqVvJOsX2esLPH/Bag7gW45P1aUqYPlwrHDQ99eJElCqecKcVWkRAHeOtLfXnUJQL09Jfz+x8MnWi2ig==","shasum":"57e3cac5a8470e1974260160a680213c87ac97e8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.9995ae17.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerG5ICRA9TVsSAnZWagAAhHYP/1D9eHyZUK4Tm09sYV5F\nhzHN0L9SUBBDUdKJfmEArmQE57h/oAoclEcoSVCknfHNGPICAObKtZdd7pk1\n9QH+sdhPdDU8VKbGcEOW8K1jh+yAaL5fbSxwYM9Smo34yED0Nt1CgDQzo+1W\nZGd9WDEgq+Mh8/p78PQQ67mT2DO+KV90G4yj0MZfmNmvkThL7XFgPL7RJ1YZ\nPgPFFpj4O/WuP7wOo3tZSlsgXRLnqPY68yUXMGQ4q3O++H0yqKvu+5C89Njh\no6Sw7UVuwuo5yMnqMGk/KenS5b4TGTbAB1iWX1bw21laKn4SV5CBcMPk+OiL\n32Egr48pyxDapmRKB/fUETn+UBqOnH2+McVnPEtWRvaQAN9ifvdgHEw4kel3\nfziq+UvoAcuB/dVWl7vS2R0uKlnOHzEKEs7jS5tArEwy7Om0qCvPbsRTY2Ck\nCzY25nag1MSdTMUhi5zYxHIhVblgqz2oz3BRh+M5aV4tCxd9ZCosYoIWEKN1\nTZ+Wik/nhgjfHokkHrVsNi2Jpc1p7N/lL9LH8KGMa5v6U6XcZHZ14u9MbGQW\nLn3Wbnv8JNZ5LmTVcy1ds+c7DyTfvSDvWDVtaj/VcOTzQPvttuzyV2caCRqv\nytYaYFrOtKwhAUtsjzHtahAhgOScfYcWQJqYMY+6oOFOygwjW+wht2dK5ok9\nux12\r\n=0cDv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmKR1MOlgeFvD8zIva+aEmaKaSkLlEdprpmpMqbl4mdwIgcmmIpn2ZOSgitrGTQf/4+6GOmMtFAV/DCa69Ofpzj1s="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.9995ae17.0_1588358728239_0.5031144316740213"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.457bf035.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.457bf035.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.457bf035.0","@material/mwc-textfield":"0.15.0-canary.457bf035.0","@material/textfield":"=7.0.0-canary.15d65448e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4174fcf7d0ec013419d2f97c6a615216cacd4687","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4174fcf7d0ec013419d2f97c6a615216cacd4687/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.457bf035.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-HCeLwmNAdIBXZD4pciX0muHm8Z1B6VycTdoyHTLKb7I8tlLzUQgfjSdAvj4tSc5nvRmxVMAvqClT3bEWW1pw9w==","shasum":"b34542c6d54a34fcfedfb845d9e240f33b52d818","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.457bf035.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerIu8CRA9TVsSAnZWagAAMv8P/0ZHNnzWyo1OgG9bCbDh\nq0AKyBSx70093b/P9tTt6U+UAx9b0Jqko/vBVh5uMi5sy7mVnpvNko4ug0mr\nsAHtYtlXJdt/hvquEgBHy795ZIDwWy4fIsoL+40S/OGBjTwlMqTFjOEX5D/r\nJYVb9wuwMpajjtnM+AkD/0mr0wo/25BHHCTBt+xnkO9yzPvIah/xnoJGs4Eu\n/btJtn84t672vS7DLnGYbkdZHjb8jbsXL9kbCJVMkF5eJcmZxzj/NWwQDq7X\neSCYpGV2t9niHOJdbf7Nz3lsIaqllOfSFVhO5Z6xeELrdsjen0gVnpRX0BDA\nUKkeSX2F7OumNTEUqwGvWoGgNSflTcol8eyRQBNbDSmVm46Fm2qNaM6NyZrn\nGE9Wz748fCmuMPa9fkfvDZ9ffEHz7lRSbv19UJSRXcOMvuVhw+oDdUGeqrw6\n14jbjiEWomqjN2To52vBcRK6ggaZMUF8LWgdLDdHBAMvGRFJx84E22IIL+v+\n/TIiLEm20EKL7b11NJ5eg4stZRfCi9n1gNGmyR5WJ+V5hIu2SouoohOF/4oW\nGDwu+wxdKP7/HKKrkIFiGR8Wf/KiUiy/+mC0vGHXrtkcBgdzCyYAsAnrwDO/\nLZWrisvbvYhEkU0alrvB4AxxoVs9eijyKz/dBJ3/ASO5kl49YVgWJdwrX0GN\n6kbj\r\n=q6gf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5ihUUQKo4OAGe3QrI3VIEiqyMeXKV3CQGrGQ8vDnb6AIhANc9bOMDoHr5BWCf1G188IwgME0RXwhZjvCpJulSkrrk"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.457bf035.0_1588366267732_0.7641635043240644"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.2381fd02.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.2381fd02.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.2381fd02.0","@material/mwc-textfield":"0.15.0-canary.2381fd02.0","@material/textfield":"=7.0.0-canary.15d65448e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4e8207837776c4f108fb86133541c49689664446","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4e8207837776c4f108fb86133541c49689664446/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.2381fd02.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-DbyBMeW3nV7yFpmMIL46YCB9HNxDduAB+Pn9V0rj4ukJssbWRSKXEFy9X1aO5s5xutu+p3KILGZYfYXWlgxmvQ==","shasum":"963489464365a863d804b811bdc90a3088333938","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.2381fd02.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerJPiCRA9TVsSAnZWagAAP8sP/25q7ZLw4RcjLBr3uCPi\nXtr97fJLTlWKSb978jYayt3AlKZiqMW7Zxnof+8Ie1kV/mRgBV+40OZo5AN4\nuK2FRzwwguz7Y/qOptBW2j1LpcfyY81KOt01sDotl7CLOb70Hxro52JZa/2g\nUPlRIHp7bh8Utzt1W+wVwePt9gLN8gj2auhVIxGH2hpzB6GHbwPceOyI5Scu\nZrsigje5T8L89nBsuWfkqsOFEQ7TmgjUqaoMLxWWjToUyd5PGjlJuJ4PXpfx\nDUM1SamTHFDdPnW+x2xH2g6F1b9uEeOWYi+TvVTv/AKfQgE+UlqGG3wcWJ7A\nduEfTxpe9KYEgl61F1LHMdgYSpS6jmwCx+vl/W+CiZta9HseQo6h0n0ap4c+\nb3kpBd1HMG0uWER80Kc6Gtp92LX9DvCYX4IlB3d2P8w/HsvhiGHonFSnnaVm\nuS0Em4OLD8Teo9hEVx7BiBw2rlPSKhMliaTtYcf3eL57JGirAaubq8xwEXjE\n8QFWrH/VCWnx+Spk2Zgjz7Zl4P7IoXZvcbJpyzRGsBONjdk5yiI7HNg8o1tZ\n71i1ySqAcvovDeuMpPjMKsF9doFRI8ybSHtkKSVqOl0/dwCxs2PHd6+eaNU2\nS2GQcoKpLn7CWjuzAcB6+IMbqndoHBdg6iRhpudoyjiR9REpO/1FkY+hFBkJ\nNoRH\r\n=tmLr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOMJFuURX8PuIPE2lSSIf2IdNWO4rkSmsy2gIq/+jLBAiEA3oOBXalisms48rYSj/gInCdwPX7eAkgTv9MnPVv0RTk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.2381fd02.0_1588368354283_0.03158738500172387"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.b2ca9b57.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.b2ca9b57.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.b2ca9b57.0","@material/mwc-textfield":"0.15.0-canary.b2ca9b57.0","@material/textfield":"=7.0.0-canary.15d65448e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"98f8c3a13f6577a5e1ccca480ffe483c91183a7c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98f8c3a13f6577a5e1ccca480ffe483c91183a7c/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.b2ca9b57.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-WoWgLCCiWGIYanh3WkWg3TLD6gkKXQCeZCJhCVtoappyUsV2rE9W4ITV7uhvUj56OmR9veRMTDg0TbBn1Lv5Rw==","shasum":"78b4254db681aeabb28f97bec13b976a396fcbc1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.b2ca9b57.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerJZmCRA9TVsSAnZWagAAP7YP/AgwX4AZmQ7RgKClKRVV\nyHkcMoest/aX8h7HWgFNfuXJ5NnPnWPsC48cAGWl4GkqZIIfY69wr90TaHRe\nZhrqh5HILzO9JBTYNUaXM58GNvhSmVOYkumv3f1+g0oZlmHqKFjWIVGokRNr\ney58dmRGPKEO5mvK44fY4lnNf6E0EthPu/XEIO/aMv6hKisdlaSJcWFltSip\nqH8SGSEZmAO5J2p8wy2hRqLesaCniFKUvqXTHI8ETohpY2h/US+069JeotIM\n73WwSgmSSzPoQHBzSLhg+IjdrDgro7PB++323GV1EAPMV/x3CNyGMTVAkHSH\nXSwyAyTHfFOwJXSlitGM1fJ2KNjNXKl46jKEXnvVZE/O1urLN+ftV+Y5Rciz\njZvsPxNRWukVwPBTrPvU3f3m6z367MRxdQ5YACkhmDrglAQlHGwIE1b1OaLS\nIkQLRqqBRh2qKSFUTh1kpq8wD/3wt5MKmj71byGRUfq6r3z9FUJK79tNmxWw\n4yfyVdDjIfG235oKYWd8Zwt4NQzBnLlHAg5vpNFhIDN4noepCZK3WoQ5lxYU\nVXl4qnaCo2Klz/iyqOCUhuWK+XApb6MJSiNmlCdm0TjVAbsgvoL86qKSUAwN\npZY0JdneQTNb1cWkzfvoNeT3mz/Yhrt7Foxpau53ABlz3ryIZ/JL8wv36y25\n9gwD\r\n=a81i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtogUg70l46Hfd6kVX8FDcHca/GY12/uQ94o7GdS/tnAiB2zKegxNnTCBW0KFN6fBpl8mOtCKCbv1moubeVjO9hIQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.b2ca9b57.0_1588368997768_0.4340483153120218"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.b2b088e7.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.b2b088e7.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.b2b088e7.0","@material/mwc-textfield":"0.15.0-canary.b2b088e7.0","@material/textfield":"=7.0.0-canary.15d65448e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c524f04088895074106127ef3584a2aeac09b189","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c524f04088895074106127ef3584a2aeac09b189/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.b2b088e7.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-pA3PROy+HYjYJ185goRDSh+o4JjcPfrugpmnJ+ywjteAi4+pGP+4VRHrR5JjxvoEH/ra44TvZtpDKcn4ooFEKg==","shasum":"98e46638b29ee4079ff66e9969bd9bd187765391","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.b2b088e7.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerKPUCRA9TVsSAnZWagAAOf0P/3fIQaK0mJ8KLeFSdpiN\n44i2yu3tZQX64JGleVhcTyCE5Jt42HPRCH+hQ/pP+iEP5uJyXI6kJuxdHbal\n6sH9pej9oCMnRk/0Bl6AMCREll3bmdH2aUmyMhXctstULiTb//nrCEti5Q4Z\nx7rYWqNjL4OdHgoxi7TIxJsLTNsizCrV2sEmTiTaMKLonWbM435AaiGQF0Tq\ngmBhpVA/B6CYqB+AxRzq/WAKWXtG+xGFeMambb+nygDVFHDehpklos2U/Vii\no/DvbZI8bmsnq/EPra1SosJN7hTEtsiwqgNkU5mWnMZ7MztDf2dTiG37r9+N\nwwzxbpj/wcgtOLPwxbIGSOLLImcWnrB30gs4dBytlMWAK+579l3bsQskb7hJ\nSrJgeP1Y/tSOguoY23zXIvA/0aahF3UZBOcB3gygSzDEZ2OcdVkjNkx7uGHY\nrIsG0/K3q3B0wrdzp1SvtpuVa9AaIs/NFIoGauKtu6I3usHfw+kP1P5azjfV\nAQ4+GbvXULpuWzrZNcPIrd630WudaSKsPEpkhFByiHrM1eljJDDMDulgw9Yn\n4/tVQr6obLEveLcA5xfJd3v6jQELB7Roc0ffTmjlLD2NQFmdUeBLX8xVlZQh\no8YJJxNgJkL5IuAAIPD6pHb9jHziV+FzvYdC2Camq9vN1S1r3t2lllK0EHqn\ntjhN\r\n=Mise\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAEfGznmc+MBg9Tu8T1lyhkWNv3SEA66cCdXeT7/iPFAiB2zTYAYaZct8XYaXOOgybagWXaxnmH0af1mM8PGOp1yA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.b2b088e7.0_1588372436220_0.41960943002910667"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.fdd8f69e.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.fdd8f69e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.fdd8f69e.0","@material/mwc-textfield":"0.15.0-canary.fdd8f69e.0","@material/textfield":"=7.0.0-canary.142b1549e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3888dcd836699affb59b98e4306c2ac03971ac4c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3888dcd836699affb59b98e4306c2ac03971ac4c/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.fdd8f69e.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-qBH7YYGdBP/mI35xuj4P3bRpKfDcprLXkg0ab6jlLt2j1VpttZm2va7ZHpJB8LihZPPVK+QphKCovjg7H4l6Mg==","shasum":"d12947486b1f316467d7e3aa61ed1b811b680cc9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.fdd8f69e.0.tgz","fileCount":16,"unpackedSize":174849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerLvxCRA9TVsSAnZWagAAby8QAKS7EsSi7wgIdO+0HjWZ\n+zgaw6vHdeNeCRguHMoqQSX6BIS8Qc2ZSe1ivXLJCCjwKbF0W3nFsnBuuWtU\nDRYHm9V84qntp+eHHzhdoaU6ADr75sLL2l8OboS5XMvhuEBY5wamO2ZpqRND\nMiPt3Ga9nRdwNZHvtAqo+8rsXL+CzTMEzySXUklpTryCN4GnRmDCXsatplNj\noB27UpnK5QMnljkkCDpW6TsASF+FIKxBGlwU2pecBLKyBtk71uD3u/4XLXhw\naDpnbW3X8VK5CQkBTLaMYHluhGrm7fXgVaCObTeBtMHGNnI9bHkOlXHzNEJ4\nBDtYSDwvOevraJYFfSrqjbdNIaYeBuMsFDa/3yAZ6kUOuFMGj7VUuB3pHnWE\n8wIP3cpxMuWQTYHkcO2UGfah0/fKLXXYphc18JNhpvOCvHZg+X7Y63u6s7mm\n1NLKRnU2ww7cVTuLVjNt3AHGt/+H0iq7P505l+lmYxjUJhxg+huz5tPQX73o\n7kRZ0whzJDTp41rSpyFlIWCE3gBfmIl6XRDYnHgfC7onD3oN2fezv1L3q066\n7tBv5j1J1E5MBuTROi5YJsjiHDLvGoDVxffX+2f4TSlNq1isgkaJpg+IjZzK\ntVKqeilsCFv0adB3FeKb6FS2Y9S1/mRT4rPT0+AEb/rkC5eqD/n6CvgXNOkh\nUddq\r\n=9y1r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAbYssTcudKI+twIMoKnHsDgyfWb9toFou4lwaTIV5TQIgXiiRiTAcDNJ3pSk+pNtbVUyB2z4ZC9OqHkEaOafa1E0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.fdd8f69e.0_1588378608647_0.8351687092815427"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.730f45a8.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.730f45a8.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.730f45a8.0","@material/mwc-textfield":"0.15.0-canary.730f45a8.0","@material/textfield":"=7.0.0-canary.142b1549e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e4604a16ebeca9fd76a4f742d3f936e83aaad680","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4604a16ebeca9fd76a4f742d3f936e83aaad680/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.730f45a8.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-GDWPYWxFt+/lfw9/iPi32UCowm6pJO7b6tAkjZKIFaMeT3N+jDzWLBbv+NtB9/8DRO0JSsaAZ15GBvE0JFJrPA==","shasum":"336bd6c59fcb1738d0c87b0d1bf37468f2f1f657","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.730f45a8.0.tgz","fileCount":16,"unpackedSize":172628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJery1YCRA9TVsSAnZWagAA/vUP/2TaCbIYRNTe2NQYwGNu\nels2lu2TxkPa68iq266Nzlf1cAdYi6tKPnj6/Py6ER1roP3dwrcJM/EYAbnt\nRwiHK9CVeAzFYLu69xEvAB5VkGK+MrT9BJx72mvW6WuiI1y0QDrFHrhtkeXj\nbZWxYgbfHb2x7VE87YOy1e2obocsNrBdq/CPuz5bTU8JmEBLhptZPtHNeI1P\n6LLOavHbF+JPQad7DW7r9rtZHYkvk6EuyjAadM4/ge068rlWCf5qjcV6ptQE\nCnMdr/DMF1d7zKpajUITsxc6peS97oFW9/NQw2s/lXRP2V7TvirqzcDuXlJb\nSJ4xKbkRuFkpJQhNc01Su0MWEJLfPMtLSSrIoslIHha183vxT5mVJ22UNZK9\nSZ5WzUwhgzt2Mer+H+cJfyKVVkVRQxuVqv2TObywgMv1FA1k/aNPCBbIXhsF\nDXsu+HjHKAwCEMdNNIXdzO8MA78jHCbwxhtExoBeA6EQ3zmd//pX4T9ohdya\nSkfMbCLZIWP+yLQ7wLn9Aft0lbcCOPpE+Nv/K5UxLM7jdPOfhoTHFq6sA1rD\ng40aTUeZBFSXP1etr3Qk+nsXOr6jFxYJl+Gmaf4kMx3VIcN41DgvAcf1sLYw\n3r3HmoenZpPp89LMC2zlk31+l2Ejwb6cDa/6x59heuRVFb3UTVPZ39dlS5/T\nC5DP\r\n=Sf4e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNFS72tkeNX5zEyzhH1xAzNS4jMl+V2Ngkh7CWTskrNAiEAul2egJsBGFGmrUQSRQ74Z74B5DQjOEGU5y8lGOJEnbo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.730f45a8.0_1588538712230_0.9829922192395661"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.4219bd20.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.4219bd20.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.4219bd20.0","@material/mwc-textfield":"0.15.0-canary.4219bd20.0","@material/textfield":"=7.0.0-canary.142b1549e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0ea0642a3b7fcfd78e46e68022be39ccf7b5e68/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.4219bd20.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-ZbjW8E/x8Dp23hCjzKG6MB05RrsNU3Iq+alWrFuhfnxBI5mrNwzOa2PYYo0YzmKFHQZ2B13gNAEX1BUMAt/xtQ==","shasum":"9b51d2116032891578d648c839a539618f608c2f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.4219bd20.0.tgz","fileCount":16,"unpackedSize":172628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesKYLCRA9TVsSAnZWagAAxa4P/RMFwKHAlpgM0xAUWLSp\naCQyYfkz43gSyfzhE/WEyLwR6kMd0/BmXcsgywH93p3Rtn4m5nosJSEHEVJa\nRjGxmmVo20w8a56+pMz3xrKFlkPjTWC2LlifXoezowtwrLWx25BFqgZSo0pE\nQdVy3frvVp5vMDQoEPrGfWov9UYmfmLn05RrkQxPwJL7/j+Cy//2Ti/nJeuJ\n5jlFwtUfhr6v4BF/CoHv/LW1xPkBSS8gb/WAQSfNdYmSVU0OXLJp/AWFK/Vo\nLbXU5lJ+CmDZ9zKhbNvPiS/BgrpoZsTYfsg45cHXAXmtEfXXp7gqXuHCq9re\n6+Sh2BPGa+VFbG6nRT1iiAzdlKZVy4WWk5njG34nF6AU6kFnL6Lhe6q9iTqC\nTyvEjKLMkkecwpgj04newX++Ll1yBI6u1lsJAxicJdvBwXSrwT+H6DrdXdjI\nkAy+Ksy3QEceimvKhYyHMSZuEPxaP6AWXbGkUDR4ddqrovhSGYEbllLsDx45\n8TiLS8bK9oSo2Y1RfiHOyMsyyZnbb0W6xeAvIvky13EtNPtsfpetRqs45C7W\nRLiscJmYiJP6ahI9QEz6QHuZAUfP47yX56sTAqI1hNJQzrazP+Jw8OGkiLSs\n2I+69JUj4Ex5f5PFhFZclQgWpo1cjs49lpoGpTamkiwWRZeKBeJpgdEwhnkd\ndoMQ\r\n=hkj/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLvSAWYz1hNnHLlAD5RUMsITS7CYc+oW+GHFOMSMfN1gIgezk8ucU1/980oahkh7nziqORS8vmjGLCbFjBdHN5tNs="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.4219bd20.0_1588635147095_0.7962763513900759"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.1d83cf6d.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.1d83cf6d.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.1d83cf6d.0","@material/mwc-textfield":"0.15.0-canary.1d83cf6d.0","@material/textfield":"=7.0.0-canary.03dec929e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"72586b3b03638e183dfd5440f006b405468a37d1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72586b3b03638e183dfd5440f006b405468a37d1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.1d83cf6d.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-OZt0r9dKgGMwVRYFToc5ArrWk8ehkaaps8efdR4yunOXMtqV6mlK/5kdQsOk/IUEn4CD/TPzNA8+VnORiTK5HQ==","shasum":"a7b713dd0ac43faf4b7b1fdc3ad7bf25c9231ff1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.1d83cf6d.0.tgz","fileCount":16,"unpackedSize":173398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesZ55CRA9TVsSAnZWagAAxbMQAI8HL2o9Yq45/RnZ/gNI\nieszAh1SgM/DbKjOCQsfCjQzYGkkqBUrIRyz+R2/ixlpGOGDM+lI5Vy86x1E\neTPGTXDEIdOqdIkw+H3hOnkLIVC74IYC51Jo3dZo6u8Y4pn6yWpv28MLNtkM\nT5VOuXgfqyFq+Vg2F0l3aWt7u1IOkzVHxdwIpNu2lvvsnB8BAZy6v/bV8Ixx\n26rg7j4mdiFMkCBnc9uJwu4nfqyQJal9rWwHAj99li3sjYGSYvs6xE6YKy8q\nqJoLHWVWX2Oq5kAMsNvrYIWTbYi1o4zc7WR3HibRR/Q16UFPiaN6+TiY24xn\nrdUAUw/chMQ3BtZwwiU/PI73/ZewUGimr3mF6dAWtxmP50ZBPdSYxfN7oOI5\nSu/l5l6hZXfffh3NEdiMhDgijTRgtgtQfSDpLNv0PgvfPR44TKJ1WvmbMXxs\nzUi4bVgI7EkJBfG31zFC6yDZfEauSZRDomEYZ5cBoZBVtK+sQ7aZzq55o4MJ\nZNmfZ1x7NwPBW93jJN/DaVsw4TzwLEMB1mn9w1LJImIOcgVHA8OPNc76QeqK\nwVCZjP+S9SoBRGfAj7fpgCYhJ8RMFUvUMAg2gr9tHzRjOKuNeOjWnEkt5Vp1\n3vHOoHl4uq4b/2ZkhSOIJJNkreiue+ov+3hghcDjwEaNLh0NvD97eTAp6Eka\nUge8\r\n=1pnf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQ6iTRFeMPQlNyYKYlobmAoFaQ+2qQPUjhaKp24ERChAiEAulGbelB6352mojyEzlvrx/SqSR61rFB7sW2qZgj2u2I="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.1d83cf6d.0_1588698745420_0.8771221754344114"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0-canary.3bfc63aa.0":{"name":"@material/mwc-textarea","version":"0.15.0-canary.3bfc63aa.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.15.0-canary.3bfc63aa.0","@material/mwc-textfield":"0.15.0-canary.3bfc63aa.0","@material/textfield":"=7.0.0-canary.d92d8c93e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"00c84910ddd746dddbb2d651a4fe51c784dc78b1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00c84910ddd746dddbb2d651a4fe51c784dc78b1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.15.0-canary.3bfc63aa.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-1Quvq6MVDCrwTwXl71PoXBRv1SbdBxwPz9Gbqe3bfn/nd18a57x3f/v0xxrVInLyyeNdZdkxLzK/LmiOEnGnWg==","shasum":"29c3e27a13c03a7b141a2f5f3d173e50e17a6ddb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0-canary.3bfc63aa.0.tgz","fileCount":16,"unpackedSize":173398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesazsCRA9TVsSAnZWagAACtcQAI++9ELGpI+a52qWL3CS\ne1AyxmVUZlrbrSnztXbW4XyR6EyhSLKg4HW/gSH4oZjwHIeKK4hEo3++2bHq\nhNwQJjy26HF6JIG6076Zo3gIqPTNSR4CEm07dKlHGdYUNI+TDOfwojicmzI5\nuxmZCQWSfW1DXjg3EqtoMwU+3jCE2vquBQ836SQeqb0x8F4SDs0fCJ25wtf1\nFs9vqVYLyd/hiy1+14kO47XJl28pwivhrO6bJy5A+5dRzG0szhiYTE/fclSX\nNzw8Yy3YLkO4UK8h6E1BAwtRUa/he73ONEOjKR1op8a2CsRXlHPduJNSsiet\n/AJv4T2u+c4mKOB/VsXMZoMA70rMBqwkNxuwSHpIpd6qCJdm5lr2F6QWCRl6\n5aiNuCskeAiVzjECu+i2ChdQInNEV7yerrJsfIoJPnmZSJZJmQcOZ/oy0GQU\nOt/Sb3JZbzYHA/sQyCszzysQVvLZWqCOGUeEzZzFs4uYPnjtjZCwbSWLrjWR\nujX5o9sIHjHCmqwIXIgOGMK/QCZqNIrLHuELV/YpTBKwdeErZ3r1UvAWlw6x\n4x4xC9HELe+1MzU3I7zZkVi1coluF0iH8EoTxjt/iTtRpqQ3RYSprNivWoJK\n9afmCbjsY2wIMC1wS+VgXDAt6kXi77mNmXxm+rlGJ+DUqALig2T5LUsU89Z/\nsFP9\r\n=4OAc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCh9OhomJAuSTHz1KXg3LRgFVjAHjbIJrgbvC2VQ2922gIhAKJsAfO/rqyzNl41ZtimCvWg5EdY+vWoPxkqYHS21phQ"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0-canary.3bfc63aa.0_1588702443622_0.15092763205889437"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.15.0":{"name":"@material/mwc-textarea","version":"0.15.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.15.0","@material/mwc-textfield":"^0.15.0","@material/textfield":"=7.0.0-canary.d92d8c93e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"749d0b52cf7911d260027fba833a8a291177ad32","_id":"@material/mwc-textarea@0.15.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.20.2/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-dftIcPm4ncGS76L84YZFflSqU69fM87ZW4P+GrP2s2pPTZlHtdxxRrMxGYCTbqSfzPddSNyM0LsWcdNSCHKJ1g==","shasum":"a6031058509b18f90c69c7c6ba645587a8ad3f17","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.15.0.tgz","fileCount":16,"unpackedSize":173346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesepnCRA9TVsSAnZWagAAv+QQAIOj+Ahdpz0SDNY6e5TE\n2C2tygt30HPSLhHW23nxmHFqCcFuk58WwkNIfiGmhp8xTeSwdZyeU/gu2prL\n+T8aFYlwEi5tTpp8uNQeRJnbYcIlHPIsVWquyo33ktQrxTb8jIFKDeaKxXP0\nIDJPVE820qdzylfrKPIDFrPmFy4hyOZZhZF5VxTpIQJ+TAf9UV9akiqX1Cfo\n+xR2hx5CBn4WtSyQFjem1h+DJ5y9s1g80aL1MiZjgJqjmQLUMs56YJgSEi+t\nW+BfPYU6QXyTQBD3x9R+0DO95cXym2WowDq6ycHMTFSOffyQLx8Jzt4zYpcf\nbZVemdLJG4vptLfdXP1pJM1cyv+U9DM+4k6S/e4USuoKb2ALpq8wGQoKJIhE\nTBcJ+Pr6d4rF934qH2qEqugipzWxJ77krCZ5ZUbCOIQWW+CuZ0ijhpBcf6Fo\nvnXvCqfFsTMzqmoipyIfaXRLlXvtb5htpataOCO+RucnkssvLZ+i55widlLb\nxSJ/tIQEe+l0w1ET6R+CEq8ng00PqgCz68lgKiKqBwwFwSZ2+m/BW0SmLb3X\nPFwqcFUlJ0UZQjvJ/TKm8jA3XbJyhDSV8iJ52u3CitBz+c2fcwaTuqXl6+YV\ncQ1gmlRQV7qHCpZnXstBM31afZOJMpSN2PQ8k8dc0ilVVLltH16Ap3sA6zay\nmv1F\r\n=fA4j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDh081eqVESFbafydCQsnoNcJXMhnH4m3Jc/QsqhwgDegIhAL+xb10QlNQe2HWYgRQqaQaD9L1K039pEesGbHJZPBdL"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.15.0_1588718182523_0.8199368970658634"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.1f4e3d1c.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.1f4e3d1c.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.1f4e3d1c.0","@material/mwc-textfield":"0.16.0-canary.1f4e3d1c.0","@material/textfield":"=7.0.0-canary.8135cc085.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"cddafa9ea64276d2774eca727578ad51fda9c366","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cddafa9ea64276d2774eca727578ad51fda9c366/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.1f4e3d1c.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-vt5xZd2Z+B+3KpmTokJscZfZFP181d/una76Ens1Bl59pQoVUNYDhmP5Mxrx2Ua7yg+27qkr1CqwCtQSFFsGhw==","shasum":"641f698fbba061e9a598a4d3b9ddc4a28e47a70b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.1f4e3d1c.0.tgz","fileCount":16,"unpackedSize":173398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeszR8CRA9TVsSAnZWagAAPN4P/AvF4NxbtPwDdJb03BYF\nVkKTQmiQPoTkR/fh7wWzjD/zYvsf92y1VgSu4LSletSPoAE/eZyWPav9ayaN\nwNKsEyVehcD96xJMvcSbHVXVC+aAUV6IYyv9tQHXszetJZjSDvZlSu3aA7/x\nfp447HHmgnD0JRv8TZqk31kSEtmYKBQNxj9LjlyN7zHloGoSf94Fx3o8gWvM\nutQ5oI5+JWZsajwSe1Y5cwQNhid8XPrIN1Xkt47ub/W+qYFyVeHDHVagWfdr\nAmQ5yFjabgIsetpZ9hUP2U8tTlEfJpjwJn1wjTYHM9bvu7L/TpBJd95OH/zI\n3PcaVVe2JFSm5s4ICBL0KucQw25Ug+fKGQHm3EZ4i2iOdJOKtm8m3wv2fENR\nLWNQyvFHoFlLv0NkrV7JGoEI5JQ1dg6LZuunT4lVN8t7zyQmlI+DDb+TQ7Id\nf22A+ujoeoDvBN9DCBrODffpiwwchKrAFoCwtZ22WMA2shT0OOiZMJMq4fi5\nWMWFNxXlWAr3lrL9jyJ1CBWx38Au+Hieg9EG/OIj+uFkmeZzv1S8kK/1N0M3\nPNyHG7X11w3Z65NoQPaRZ1RTs0DlrB3nxhyLwtb45t5zknn2XVTRwD3tExyN\n7JCjROL54tAb6uRrwLdPSgQsrwAcHIxrG0uhUClxITGRW9NIWi7FEbHj+rMC\nl2rC\r\n=i4oN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSrM+6WfMYqEt8sGu8yeGbBJUnVH2urYsXRMbMz1pTsQIge8kFtBkWp2oyA3AuwZshLKvG4L+PETKwGC3WBWI3nM0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.1f4e3d1c.0_1588802684383_0.1837793619061061"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.bc8759d5.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.bc8759d5.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.bc8759d5.0","@material/mwc-textfield":"0.16.0-canary.bc8759d5.0","@material/textfield":"=7.0.0-canary.f83e00898.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"bd62828e2f7b66a127bc0ab165f32bf39b79fb0b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd62828e2f7b66a127bc0ab165f32bf39b79fb0b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.bc8759d5.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Gne1JNNWDTjze7IcfyC+qT25AhWs5vAt9HmLZpyXKN2exDC2/bNHXKjAGXw5ACHRANClgTdxZXrYMBwPprbgXg==","shasum":"1ba2feba8ab13747a7969f0c67c0f8b2e454f314","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.bc8759d5.0.tgz","fileCount":16,"unpackedSize":173398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetJZ3CRA9TVsSAnZWagAAQEwP+QDnH+uYgDbpUroCMqnH\n5skK+vzD9c66AmMXu64v6DtfKaVs2ElyQVE9blkknAMIF99ATDrGf4klfvrB\nhxp0nieST7ps3R/trmCki6kk288bTfcVikdqmodDnKp7J0S5GqLiWTGCjTD5\nnAmTDp55li2eHJ57sJg86aKr8QNH0JLhJtwOM0TPtNY2kBa+2jGUSAZVAKIG\nJoyWFvpr6rd6+qnZY8bi1M8jgAAxFkI1XcW7QashL2DhFvzmAslzAeCk3uUR\nwlGuYiBrrfnzJ4KpvjvBAv/++/rJ/f2nDiOeRj8dUJi/ACQnHBYOITHtLE8Q\na7dx/uVvwxn8gEkPqpnD4FPlr/O8sdYQhdsHVWNZOtNnV3petBpmeaCYgvli\ngWJ81K0lwKN5EUBtLulkKTyDWq270xQ07+iQx0bVQe+7ouvKP8q8QzzzKfd0\nB4GCaHIZD2MHvNUg7j9z9OPZGrQNehYaJlyoBFR1qoUbR1SUNab4qiCWEAUA\nnuEsnA9oH71iHTMSlJg1WTPoHgsyUQIEylNCEfavB3jI3yuAEr0Ms5W0HH64\nxAIOiuYHxtpn/k53gYVY5u4YvNa1kLyzvRI0W+o3KeYGHRvSoG0QlFTHia15\n36GRSf1BdWvDeF25avSKRTrI+Qi2HE9gmuPVXESqHFrKUA1t6FPSHhHBF+Fl\nu1sy\r\n=QhBL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFeD++ccmLaV6SFFQuAHmHetfpUFiFLvuC7uXDLSIr0XAiB2l2VYkZOtRGl+m4RVha148E+O9VzMFkxwPVx+qheNPw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.bc8759d5.0_1588893302906_0.8578501176574587"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.d1379acf.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.d1379acf.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.d1379acf.0","@material/mwc-textfield":"0.16.0-canary.d1379acf.0","@material/textfield":"=7.0.0-canary.f83e00898.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7b322d565d0668b9f1c4054abde8984cdba4ee4d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b322d565d0668b9f1c4054abde8984cdba4ee4d/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.d1379acf.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-+K3CeXFHxF0O5jdLAfg+GRcEA47fMhpozxFF4Av3D/bIFNVquswwnuOhfrfcqO2i9ria51lndxb25FrUB+HbEw==","shasum":"1f056fd89602ae235ce213413bfe45d8952c2bc8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.d1379acf.0.tgz","fileCount":16,"unpackedSize":173496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetZnSCRA9TVsSAnZWagAALtwP/AxD1MN5V5+5nbmVtgj/\nfc4b0Mngmhhrl+Fzelh7VycS97MWBk9Zn9Rwoa9t4GmDssDQlcqooLZJ/GGo\nm+OzEN2U9Hf5ffY1jN8YA+UZLADacxNydICn2lafbHWLdUs2dTtd3RuL5vMo\nrZXcGS658mKYisjYCDlDjmDxkTKBx+DmqcUKCOz4aE5YlQQ4eNDT+9sl0MQg\n4CMmNMiyil6CS9k6/5Vu7I4gdT537OujeGUaF5PQvK7Bxxu+FTCwwp60Dxz+\nPMng03cifmLjRMYkbS9aiV+1C89B2Tt+1gJzvyIORCvkjyabdDyHrwecK5Ql\nVcO8ClfNN84cvxMpo/oz9zPVRUEi8gMM2VFw098i+bPpZU9aTdO/aEo884ta\nhBGJueBXrAzYs+OFA4j/STKHh1p1o5C2xA7NKF1pdk7YeJBrYyZxukv0mub/\nQbqAXMQqLKRXCcFnzuAe49iatiihkYgiWNx59dZcs5GbuGKheLLI7/uDRkRP\nFzJsW8qGkk8I1/tOyoZdI5n+T1QloDmyFsjex6Ssw6NvPmb41G8x2XsI+lGS\n15c8aB1zAxYZJi9ZOreyYSj73ozm7i52f1+oj9nxsjcaZuLAcncaiF+nvqod\nSdVbcVUE4unOftqvVJj28/hOTuHeLw8MkrXv5kbD9r/cd0qSe+abWBH8jHXo\nZVha\r\n=8zBy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFrsEkgz4CeHC4mTjGEnyKKtpYY30DdoxzRtijBslnrWAiAPIa0K9r/yqZ6Ncw/HuhupfX/ETUoDKlQoeLQi1Gro/Q=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.d1379acf.0_1588959698133_0.5086061952151737"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.58d51fc0.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.58d51fc0.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.58d51fc0.0","@material/mwc-textfield":"0.16.0-canary.58d51fc0.0","@material/textfield":"=7.0.0-canary.047e6b337.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"095d9f72ab7ca9994ffd376ac6b1b0daa4c99011","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/095d9f72ab7ca9994ffd376ac6b1b0daa4c99011/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.58d51fc0.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-eo5lS3mTiQl7kWLy7i135rfVGx/EFGQFwLiq0YZ4/PcNaZDONEbxotuJCQQVXuV+IT06bAqnc9KfAzjmIHP95g==","shasum":"a281d092e04bf365abe90a4230ffd69e5e84266d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.58d51fc0.0.tgz","fileCount":16,"unpackedSize":172470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetbBdCRA9TVsSAnZWagAAj44QAJva2zI2mViEwfS1avCH\nWJJ2bvgdPWdk2UthO3xieV+EH/luNqXuhOGAFjfWbAJeKYMALWV2wAdr+gRD\n8nBMoF26QtVWlNPCgSYYxKarG0R2Mjhh8vn9WN18DphbHqjX0ZhG5umXfWJN\nVcr5dKIduvx05tJHeeoYoNAZdmcpBgu4/F9Aj8BXgNhorp/JpSN2oZGyQGso\n/xzWnC7BxJJHt7RLQ3nM5cI+RDxVy1iygmaXFw4Z9zmGH8mr5yqhHismAvJB\n0g9K2n/yifohcdnNMjxRBbNBWCGvPhpqUVjvQGF0u/gq7KuNHW1cNS6+kcV2\nUbvcu7hFFm0R39CqyMqb1pGHUa9WA53YozGC67ix4WNZ5TzlZov5Dq8Zsr4m\nXttRWMBChe4fz1tX5mamdlbzFg01DUfw/K2zNaXaRkCNP+GR9pgWrAb6ST8t\n+22TF10pRBg0WkoF6SvrN9WiaD02vIKmMxwmQw07vJ0ZKtYR6stSx3/RLaOv\nAzAZRF0Lgfg7OMSw1PqydzRPsx4xxshjhHcsmVff5GitX6qxMm7hU1QKlcIZ\nOIo5mxwJLtfMIvVIRPTjn7+c/FcC+gglyc+pq4QTquD5nHYHxJOzITT+TCKU\n2RDuiyJA5UEm8+QoxbAprlg3GpMSvxTBgUbb+6w+OJ/gwSCXY9sa7dpVxwMI\ncfu5\r\n=CJGJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQZhGuajVvP4mhgaz/xujCuTtpWB+wAeI2Tc+TNy1vdAIgFfe6vAuhwoTbJ+TMhiqw4p8ognw0jF86SRwTinVNG6E="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.58d51fc0.0_1588965468975_0.7459745118996828"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.588062d7.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.588062d7.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.588062d7.0","@material/mwc-textfield":"0.16.0-canary.588062d7.0","@material/textfield":"=7.0.0-canary.119e21426.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1b66fe2af3ce7c18a07562e7ad2469074135eec3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1b66fe2af3ce7c18a07562e7ad2469074135eec3/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.588062d7.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-hITPUJ4NIcZ2oQdlA0uUkMO7ifwe4vN7EclshFJXi57S5QRckGOn8JktnGuBwpGNhluMlIFRb9zHQrwo6F7J3g==","shasum":"3fca8262fbc1d0963f5521b17621d5dc296a7dfb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.588062d7.0.tgz","fileCount":16,"unpackedSize":172470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetc30CRA9TVsSAnZWagAAO5YP/RqeAbHY+J7cqzfsdrdL\nHLWCQeRG3KQLdrgPGLOF4bME8pRwt4a37Ci0H/RqCn6yar6iQGR7sPv5NC61\ncRfSiRrUekJEWA3rv+QcgUp+EYwU9Z5X9HQJW3OWSpycNcdYK8eCZzZxFP3x\ni5hjIJpbCyWIRSISXn7mtQnQwUj2keBMEbyquNRpAazvBvkz7BGGmykF9Vsq\nMqU1WAEzm99FR+ldQZhTd+Qm8QTIMuUlYrISYdmn7P59PWZdoH3Rd1UmIgc1\nKiE3ia2s4Wd4N5SaQgU9q9ikx5r9xiVCFgh6pCdKHetl8+n+yiInORWPvhp3\nDg9B3cJN+0GG22g/eU9dn9IuxqTM6iFs/aJhpg4qW5aHnnpldms58KmbS1b6\nVQJNeL3A4ba2iqzSb/wot8VqTmI5DoR8Baio7oH3gNk89YdvOAb5EfYycZDu\ny+pRB30m+3voRxArHb6PUF/2qkF0mhj2vdkRloIrzL2NEw0buzPULoldFCwu\n1/wMoveRClt830dOU8MUmMvnatAA2MkMnh0iA2AGDWYEve8kUWSg66ueFtYd\nVCDmQCIFVcCFoV+h/Opc84Yaghen9UesHdn3n7eZ+nIbC3+IO/YWvge4JUA4\nYMeHPQquh2wo1u426wjXWPbF5JkemAGJH4JlCzNRiEQ13SnFFFaCKg6B+MEe\nGMDV\r\n=5XIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDArq0GR84Zon30Z4SiSeYPpSqfsIXcHEA5AABQpUgoXgIgPVJ2KkrhSKIla+8ShW6JER7ryVVMWcCVqJYzGMn9jMw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.588062d7.0_1588973044306_0.43953320880198254"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.fa21f639.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.fa21f639.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.fa21f639.0","@material/mwc-textfield":"0.16.0-canary.fa21f639.0","@material/textfield":"=7.0.0-canary.a5aeb3001.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e20cc975825eb5a02be956c28db1cebc2f8908c0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e20cc975825eb5a02be956c28db1cebc2f8908c0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.fa21f639.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-iBKOxXSGZX0UBAObpvOcliYw7FHX9612u942M3MsnFhQTokn0XBZu7VSQDBIFSqqYJv1XRr4A8wFsTEPkxUFkg==","shasum":"7329a426cfd0b0992853473dc7e184ecab6e49c2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.fa21f639.0.tgz","fileCount":16,"unpackedSize":172470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuYuvCRA9TVsSAnZWagAAceAP/0IUTx8tTqHUeLRhdxB5\nXh5uvHq71HDvrrgyGmBQu+gBxKQ2otc+MjMJZRyBsDo/w6nsU9NdHzeCDl4E\nigorKpsoEkZ//1AwjBleD7W05FlmOkZV3ajO8WF3fVaEK5g99KBJp1TJdzQl\nqhYe9NYP+YMQHj5SMbRrJ/QYoLiRd4Rwi+pNT+cELvucrSC0nwfHbiNwhCDN\nY4esY8Y7fCxRVLkvrvN9wve8YI/BZbiKGZie12Hn4RThaKXefe8s+YbxNbYJ\nvFuhfbvFUdI1Q4jgjjXImugJGpEOgfgX8NyDdh4HTMcZpRt9DNydlU++Ir7z\navFEUoD6noH086Edkrd/p+urFS/ewb37VKfpBGkB04Bhl2kZKy699/cRcjXR\noQNl7egP/gw6Z0P0P07h79bp6BmQ8sVHtS3BzAf9h5X5r48sDQzRCw7NEEIR\nRFY8EknoYOoqG978zY8JNuMPXoNObA9DEvK+kv039xxhkuolKD96ezzBjwwC\n98k+2d4s5oOsYFK4vPneqUH81sBwZi2O5CKmdVe9lQM1vzsozUSocok8ly+G\nHlaZJVXoPRM63ablywf/Pm+p9RsO3RciIOEgvOqz/Vh2F278g9VWQc5mYrjR\na6SehfGgqpmzDO/Z7JPj4zH4+iLf1981P8F0POzp/2y8CrIq1kKHz4up3DHs\n8NQX\r\n=0iLt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDMB6XqF85ebc215JRe6d5BAWNWzuColBI1golYg0PFAiEAu9EKhPhGq9lCMT0zDVu3FGb0AhN6c97/xz/d9Efa3n4="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.fa21f639.0_1589218222992_0.1771018625288805"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.2772c509.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.2772c509.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.2772c509.0","@material/mwc-textfield":"0.16.0-canary.2772c509.0","@material/textfield":"=7.0.0-canary.a5aeb3001.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/757bcaf3dfdfbcc62a5b2990c87cd91f80fbdd1b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.2772c509.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Ti0TmuPdyPBxL2otQL0NfcFNi9GcsGWhWzk++iTVqD2UdroY38cVHlvtPFWvemeUYbalg0ntHyTzT9NWiAT6nQ==","shasum":"142f1aa9a8139028fd7fb6dd3e7af8f8e0f98c5f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.2772c509.0.tgz","fileCount":16,"unpackedSize":172470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuZtJCRA9TVsSAnZWagAAFkAP/12e838JsytomDY1k1E7\nEFdxXWwcH9entiNIJuisb1LJYGgJhUDTTyyREb5Oo3mguH2GvE7xhTOMa/dZ\n8gUWJZTjiGPOuur0vAOZt4M8RliiuW5fxpxXnQa1Zbj47e0Erh5g2dbPjdDK\n5fjMbSUE1w3VRldD97/uUyABHrHoqbz1EIuJwIhwvl5xxzoaH3zonf3WqqkO\nfXOPC257lgoFAHxjmDlzjRjsR2UVopma/ZKOS4uvOwNAOq18ddONXKmHCpjE\nU/2GUy4PrYu43P1kiPJ7mH4wN4/kAnZRN1+Lm7d+2wlpfTTAdAMwsbgFnv3s\n2ZOOcAdBJT8lWpqJl7mfpKpOMbcRAX1vjFhx/EluRKJAjJjSJ5sa6CCmgOhZ\nqdVc+2j1HMsXxJtlpJ1Z1EW4/XSIic7eu8PUuvYXpwB/4yxEyT1tNjtkqSqZ\n+P30q/mkXTSBcv8LjdYcqJEnr+jMIfTaiqsz/PnkhtQmO4LPlbLv6FNP4GmS\nrLy3P3ZrULh5XRo1oFj99kLZWo9QbZlumA6cYlBjQqLWy2tIkJDUnErchG/5\n8nhtIKMdampSZuqjzYKuauAxQoioz7qCgkHjOojEmBY9WDnxrhPHh4tq2Nhj\nJSzYgSZJYg/A8vl+c2V6RgvZA5zK3pnKwmP1ITUJho5eASPrzlIil2cKaDRG\nsSkr\r\n=nKMD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTZyR+88RNPHqcvkksNkmkDTYAK+HPf8s94UBiLXNUMQIhAMST2LTsml3gXzisTFX0yGgnsG37l+p9M6JUyEz6p6J6"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.2772c509.0_1589222216699_0.02572960375387323"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.fc4796d5.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.fc4796d5.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.fc4796d5.0","@material/mwc-textfield":"0.16.0-canary.fc4796d5.0","@material/textfield":"=7.0.0-canary.a5aeb3001.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ddd82bfd80666625c1dcd7c92fe79f5de6f84657","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ddd82bfd80666625c1dcd7c92fe79f5de6f84657/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.fc4796d5.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-rI78gTa5z+LCSxwINoZWoZgg498oXXvs4chagCZHLuZSL02IsbArfHF7OFWZ8r8eKbOorbu3qRiX4W6xRBcehQ==","shasum":"5b2857c099a482ae4d3fd793761b78a2dcb8c4a4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.fc4796d5.0.tgz","fileCount":16,"unpackedSize":172470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeubAPCRA9TVsSAnZWagAAjtQP/jd9AuSTqc0s7TPoPhL8\nh8GspVOjEHKHl6s0vzoGShiRRFWN3uAocXl07yE/XadXDSjAftt82zEvEmY8\nhooUiYXF9rF+Q3P/yXifbAQOptjdQnjto/K7IK4mQHsYdz+KXEFitGCMqCLI\njbAdguAiOp7IaKp1nFhcuKD7/zjrSqEbvyGI12bR7gCuAM8jrzgmyLxhdfJc\n0lRsXo5SUop63pLWljvWyq41+09EV1jJMgADhJBaMNnnQQ1Mk3W2Aq80zgFB\ntbsRkv9dX2g0oExISgSzUxG4l4BwPvB34H3qmbtGW+edNQ3AST0b3VBe6tom\nMjqaYI3pL8UWswD4GKZSQsXQAJpxq2/E4xmZQZFVyzdis3PuWpUCNQ33yntf\nlzxa8wkuTOG018kPeKliYzvKkaFaifgQKWZk0Dz3qxWAtb+VGD2k6DNNYVe5\njeMDhR8Vy+nih5OJAB1EWJGZV5RPO+AK6q271PNnZq5nF5VPHdkOy9Ng4Kqi\n/Ckqn056J2E/s6OZnW0foPzJ+kxB4zNKHTamCLUqtxa3rJt+u6I22qwqJMnJ\ntRqfVrb5xmFocXqKAF0sdJDJsv4zK0EmInFAEr/zPIF9P5Ik/KKB2cTCgoQk\nggMzNeOvgbBSSgWSBDIUdDODtaTHBPJDlwrn0QHo9qcZBtXRb9hjplpnXyOq\nfYEO\r\n=T6a6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCC/IeyUTRwGMHjeYn56FATyEGWGbO6HtsnBVqplTAHPgIgBDDFHDIMpYu0BD/vqUDnCTJ6UXZ40P9fgeUDoj6CM48="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.fc4796d5.0_1589227535222_0.13603371903428796"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.0d1c5f2c.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.0d1c5f2c.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.0d1c5f2c.0","@material/mwc-textfield":"0.16.0-canary.0d1c5f2c.0","@material/textfield":"=7.0.0-canary.ed52af767.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"56733523245d57fa1e6ebe3caa22ef89bc95e8d2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56733523245d57fa1e6ebe3caa22ef89bc95e8d2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.0d1c5f2c.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-ePOGlm76nu+mEmlHEtl5Xb8oq2Bv/dXOiiFvFLON3O2Pl4wlnLky3MsgIXEcnU+bQlXT4ZoS7oX2OQ22sAxLBA==","shasum":"af457b9ad85ec7d6677057f17d6ef34f4c66493a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.0d1c5f2c.0.tgz","fileCount":16,"unpackedSize":175368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeucGGCRA9TVsSAnZWagAAal8QAI/oRo6XsexzIA3U4yZK\nMzpQReeb0T4LUjOQEg2FC+qbzMMh36nq9EQcGWtANX+AdNYsPgTY6H1/CTAS\nxZj7lbRF2/92UHuwBNhcmmbQz8rKStoe+JY9XYEH1jb2MS6GLyP9AiJgtd8e\nbDYSbHDOanFnDik8IKR9/LLNWi/qWXCYy2hX+KrQrGFpaCUKshtSMvSWdbAs\nj2B4P5K+8qnpaXyRg0AoyIzud9wr2GNqUHY2r9WE6qcjinactvrYgpM+3eC0\nBma/wuJQOChp5dEtKYqCm4nbOxUftOJw6XQBTLFirY+2qvyX3V4t/4rowF7S\nYNSFwMkQlJPI6fwLvbZTKf7YsiNJwon/LcIGSYkbLW193/qNYMaTAHHuJzq7\n8YEVKYyK6rpzDzAht162J8L4QnNhHMZLQylTj0KEvxBW478ADj7NpZXoYHq3\njsVdvDTKom83Yu5d31LF6HOnJNqTdnXnRhLl9E0aqZHSo4Xh+Ktml7wiQqpn\nf9kWzXtFal4H9qI+OXakWwlpzoqwnuOm69pwXXQe/r7hsr6PXGRGhdW1dbik\n0vob8BVo2BEcsUWG3cwRZzZ+0A3mlV3/3C41FNn29bPT8wU1l/z2Fxo/CbN6\n3+9D0KZt6LtWyhkO/v8zTZqRNkAcmrJ5VWrEb26wGgDxYmGY00R+XoIFI6KT\n3nBy\r\n=Tr7H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUBhRXMqar5Uw2EBmGg6Q/Q9MYH9cKV2wqQypSgBk3/gIgW+2pUirGof9mpCVbFaaWhhif4mICpS6jnqB/tKqcmnc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.0d1c5f2c.0_1589232006030_0.9594250107490929"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.d083d93a.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.d083d93a.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.d083d93a.0","@material/mwc-textfield":"0.16.0-canary.d083d93a.0","@material/textfield":"=7.0.0-canary.058cfd23c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"740c7f6a0f292b586689cce49e46a93876251b93","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/740c7f6a0f292b586689cce49e46a93876251b93/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.d083d93a.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-ROzvk463xuWeDXf7rVOiKoQKQfPucNUmXeFBqXiFjjKwTXHgJ3Qg+ZO/Zrq1nLuJ7hvGzYi7T/IkxcLD/O+ZYA==","shasum":"c7776e12a655ee82b5c6a6f22c00cb446868cff7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.d083d93a.0.tgz","fileCount":16,"unpackedSize":175368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuetXCRA9TVsSAnZWagAAs4EP/A20TbodAdiTKne8L5C+\n5vqGomrMWKVKYkk9CBXBfh2MYlCJu32XO+r3TCxjeBxmrUFm0sTMMcF+wiO4\nFcX3p7Q5HbB5WQLWkMf6uce+l957TcentDSez75crCTxWY+eBobfVR9aI/yX\n7O9B8ZH7PcAhe5ry0UGfvWMHUHH3uo6c4gD94GgBn9+GGZpCPhqSRTqhWWNe\nWSz3DODF8vncI3aJ2EgVR14euzfgohhmZd6uBQlcZanXlIWGVHXRm3q13Uq7\nc5wJajkoRLfcVILTBc/G3lynBxhaoAH3dxkr7tF1++v+QzmZJxef60icBU2h\nI0ixjR4qZxoQRe7goKTPWwK7sXywD9xThr0woLyEWmYRoogzC7t3ipibaQEW\nMoKKe1muT05j8PnVfgxiMH4nIxEDRDe9gAMcOjqvVY1S+kJNarLd0/z1+R6l\nxMe8hnllDmdpkr4c06U3kCjZEY4S52WvIFSILLTOplawxfNEZyWEzO3FRExa\nZb7DFnPeiTbTrvErHOdclIjU0Ee3os2boLNAhxlSSAcpXBpd0hPfxBhPTtk8\nBmwCjz61JVFqpo+ckNHkrg8xICNN5wjxE18YGYIyMyeEqvJcKoClwGhLU0wR\nHhOmPytZI8JxhcQsiiaJJg7n+QZAAvr8MJUbbzpvkL1a1GOCSBkVsTKFxWQn\ngsy5\r\n=DiLy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFHc4xUaA+Gd274sFXhLTakJaZW1X0XL+bp7yA3SyP7TAiBuNwt2PDLUnqNMp4Ukp0kjp0+BasZIK3v65Do8rWCX8g=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.d083d93a.0_1589242711220_0.49512125008663666"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.c95d429c.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.c95d429c.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.c95d429c.0","@material/mwc-textfield":"0.16.0-canary.c95d429c.0","@material/textfield":"=7.0.0-canary.058cfd23c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb13fcbdf906f1aa91a8a2ab889def17ec03e1ac/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.c95d429c.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-HufeRzSBQ+l0B78+3FKmSlZ2ANDf0kWhZF2mPfqRv43gj0xXPFdW32M++DSy+OQnEqupdMkQoHm+1UhX8tZpag==","shasum":"80328e03811732e3eea4d31e9a7389c093d2b781","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.c95d429c.0.tgz","fileCount":16,"unpackedSize":175368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuxcKCRA9TVsSAnZWagAAXfgQAJY3jHG5yzCeU14DrOdY\n61zVKpXgGsb54OksBP+6LsnToybxU5ydI9bBOfH4Ofki1QvQST5h8+CqqiCB\nnSoKtm4g7Gv4p7rOdCbrJWmfKfJoxQ/G1riwk8/HXdfHeBzWciqbLZamkjiu\nBp+LnrVin4RetdnM78KAOYVPYU67tZPyeWYeoe2OeG4V3rAi2s6vIEbDi55+\n/p9cr83Ji8CQJOFD3LDYYdPHTozYnUeXiNzUW8XbtuafFhVhHNYxfaatDAbR\nzfCjBjbE1B/mwE9u2YLNdjSUNbkLHp5ictVwGOP/fBFBalSuAjTPe2RuSOUq\n0Cw+LYOT+8IonwQU0AvaBAgktCOxWt8h7VmtkgTYSTfPSuftbZPxPF6PT8Rk\nv80EJ2OPgHWOHrnBhV5yCau/XCPquq/jSBCWCNyqu/6dU/WmEPszFy1fIoLH\nFy8kPuAsEb+5/5iLN+t8bx/1nRyeeK6Yt8vk3IV+sGV7ftFqA9HthBmj+wwb\nMTbOXa20uKnHKvBO0PcyinnE2+xIxlebC0Q+I4b6vy/sFiN95/fZBPo3AwXl\nVQ8zkt8/9mpst9nywCUJ9oYvvYQwQtP8dLG+D8voKBPNL4GdlAYheP7utvBV\nlU5fiUoxZtLcfTuRTnzgKUsuSABWjiz8IVHvOXIO1XdgPTX4ggBpVsW6NsF4\nL0jY\r\n=9Q9U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3NyyDLe82BI9NFrQIIa4x+Sxe+MPOKSXcsyi1vU4x2AiEA4t4aPpYRWm38X1LL/0Sw9gd5rru3e5yF3GHKJA+Py/4="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.c95d429c.0_1589319433707_0.4716365450647497"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.0c1ad726.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.0c1ad726.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.0c1ad726.0","@material/mwc-textfield":"0.16.0-canary.0c1ad726.0","@material/textfield":"=7.0.0-canary.0a371b4fe.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9c86cc2738d0075eee9b892c5c2fec842ae62e41","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c86cc2738d0075eee9b892c5c2fec842ae62e41/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.0c1ad726.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-vEEy6VH6rOgclq5CqEbZ5Dz8NuN+WPVZwfDHC4YtEkTw9+R4faYsyC7IMtHuQPL5gYtmwxkm7HgFmj/TIBlqUQ==","shasum":"b873a29260888e2294c798d97198db62c16965cd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.0c1ad726.0.tgz","fileCount":16,"unpackedSize":175668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu0CZCRA9TVsSAnZWagAAVOkP/iA42iT0wMeChzgQCAdf\n7aCMvrT4CouFZP+skqpKNkVdVSC3BxDx8s197fvTPYM9k5dZOzjUAlgQkEZu\nl3aji7+tShW8gCbMwRPVWgAGjUnOVxUn05UjjcCFx1ktOcU+o60RRiNpVvkX\nxtHvyRfwFJEFaCYthqvrk84TlV6ojcMcZFcHJCXElcEiFxobkQT5x7PXhpWt\nusJcmyQ1rmGRnLVqxv0napswaE5+50GTmWAVaNVI6xwEAIhe/kjJ3heCm2hn\nITQ8Zv+3siv2QTZJkvFGfEHC574EIaFZKA9EZ70Nx+6P/AlnGSPlLDfpNfFZ\nc/Aje8LNXowXriDOU3URiKzbrGoxZTnphbNROnSfjNTia7ruFq9JuN3AYM25\nw45JNT4tBP1TeXoiciorLc1v4QAs0E8DO07bp8fanrYpa9qHtpRlb7b4A79D\nk7Eri9Gyou7RBDhAeJxQJ4KM9lo1tc7Nt9CjJ4TUvjBL1KPgGkbUkSwY1BXa\nQFbRCE13JTDba0sJgze0F6aGZmIh3XWaH1j4xahf4op+nZGbCMxk/3lyD4is\nlXoRxo/2WSiisZoadqHSqUt2yrU1l/XwvBouPB0gFtqOFftZxVOPvDakov0p\nT3iNP1PfzM7SWG1VBosNE5GXoj1hzQcacn5R5AKqrTRiyf03WNFBHn0VLCPJ\nngBP\r\n=b2En\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEeNp0Ou1kIcjqRc/aqYRODFUyp8+fahyg9yQ+gqRu8UAiEAh9mBCoQ4H3fodaEq/4OFBEsSkOg0Vpg82Eh8DviOFUg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.0c1ad726.0_1589330072897_0.2572863233132312"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.8b6a4700.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.8b6a4700.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.8b6a4700.0","@material/mwc-textfield":"0.16.0-canary.8b6a4700.0","@material/textfield":"=7.0.0-canary.2139200b3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"268d44b68432688e310671d956cf5005633aef47","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/268d44b68432688e310671d956cf5005633aef47/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.8b6a4700.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-QQplvQ13v//qj/8x3uwa7Q3Z3FqhbmtAp0WL1r7uhbgtnKfttjzA/3UUqTAIoYzLf0fBg/Ws8N5uiaCx5JxXqw==","shasum":"485f77ac60a3d436a4851756595618dd9912b82e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.8b6a4700.0.tgz","fileCount":16,"unpackedSize":175668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevCwuCRA9TVsSAnZWagAAKdsQAI7pKvPkagQxC1NtiTHs\nAlyv1glrFk+lZT4diszhJitEP8un1wrpt9XS1jWquZ5NJk0voQgFzUSlJ9/W\nFuVYy3RfJmBrPmchZTef33BfDIoJf1MUEbW56BTf+UHEubVUv0SqLRg69VMm\nj1ZA6epM8zp17LOYcafb4Lyf/VrVx1MxyJ5HOil6N0yjwOz7Y9aKeJMCJ9WH\ntug3d53XFwBZDNEOv8K8oTnxpRui7G9olGFexdC1DBLFoVC2vdAKNozq42qX\nxrqGhjI2aJjVBB0ZUYAP7IinTMBeKtlIfmbGPAW38O5ixBMEJtpn3vFTQ/Tm\nzUbzxj00ujBNd9u2AzCpt7TUMl+mJkj3dMmxsv9yRj+JjYA5R0W3GZ2u1ut/\nKOY80yK7DkS/9lE49OyTlHB1lO+5TYugVzLSTNM/qEN47IXlI9BCaHcOG8h5\nbHBOoAcB+RQvDRqTRDeCH1JsBgiWmN2QH69/XOOjrj4IXZL2SBKHTtVnX6j9\naCJV/7b2WgzQ9Wj2HEB1yO2IvTm7UL77TEMYmi9Hb3pFczd0rkkUSQSOO1qM\nqPa+3MJQqQIdZGptwINDqmeZ8RKo6PLYEzXJNY9nfsleTzpWiYHuZfqLaBUh\naNlRYF8lo41j2+ylznzMb3yHBOc/aIfn2gk6gZ/MKcVggNIb2hBU1plg47NJ\nI/d0\r\n=JkQz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEuW7h9/B7/aNziUM259ZFzBu+cnlHy2hf8YLSuNd3zAIgCLBo4hk8pt6Cq7O3v2ntqjyvu0WtCE/yErk/4S6JUpw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.8b6a4700.0_1589390382229_0.07339484368686433"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.3270effb.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.3270effb.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.3270effb.0","@material/mwc-textfield":"0.16.0-canary.3270effb.0","@material/textfield":"=7.0.0-canary.2139200b3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5c72bc76b8ddfb71726f9139d6105a4b108b7174","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c72bc76b8ddfb71726f9139d6105a4b108b7174/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.3270effb.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-d8Fb4UvWTyV0E6K/qV/iG97MyAXaK5j2zNTrAbzJ/iSoSx6Su7yYB1RaFc1Q/pMGddsWLY6HkmwrZI5GPrgkfA==","shasum":"4cd5643fb23525cba2575f23bcd1a93d9a58c17e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.3270effb.0.tgz","fileCount":16,"unpackedSize":175668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevGWkCRA9TVsSAnZWagAAnlwP/j90hr/dISMTf30fe6d2\njWsiOd5DgBrvFylFKwPyCObomd292cK5B2V3mgzhsmMf68YjT7Pq8+hR+q6n\nmRp6vIwWxF/VIYhqJm0h6RrU/wnZU46GvzuogvFiGnQcgxTmwciBA3xPQGEQ\nZEubgJH7qOyaFehBLGFMGqBd31+yNaKcBy80dkw3EIfqaYPDK2gJh7Q1Iwve\nyjD2yhCP1puOTrVDLVxVowhdcPXh7BuzDdzxRdVT4WZZtXbKzby/hocCg5n8\nUpUqy2U5lZEYtRRg+7K1EuhoYnvMH8GjMrSDONKeMCAKqaNbn9Ui+v6WJBBU\nTWO9rJd+PtJVnSHiX3AgkQBMYNacnQrWNbeA38rchCHnmJkwyijk4UvA9lLi\naj8w14qr2WM+m90pCNaUmnZhEboTR5TkwYO4Cp3sFzBMoVX2aMmsliO2Ro5l\n2nZZe0eWwGS1lcvQy1muko3Fve/Wk7PaIMdGVVuGekX0t4ePFdZB1zCTb+X6\n0a+va0KAvRa6jL81eBDjneiizYe3Qid/ylyyVDay0vhpGQHCBgHe9Dy4cPOG\n1SvG9u6mWObqTtLj2qUNL9F/1c/8mcjYFawYRaeJciOawL8WpWgktI6h+vpl\nBH9Ch9frVfZioXSXxhUyZgpAJQDows64KNSYVbtDtGruW0DtJvhDbumfKZpI\nTFwM\r\n=Y+2Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP5l+ZmyV0UzYk2KuMICTgh09vyk/DApihfL0HJr1ulwIgJxgGB6/UQ+ndlnLMTe1lF0su0pAnpMEyPWWchNjENVs="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.3270effb.0_1589405092311_0.16905591730977965"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.832e64f7.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.832e64f7.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.832e64f7.0","@material/mwc-textfield":"0.16.0-canary.832e64f7.0","@material/textfield":"=7.0.0-canary.2139200b3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"27f7d1ac979b6af26982de92c2f2bb7fad00ccd1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27f7d1ac979b6af26982de92c2f2bb7fad00ccd1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.832e64f7.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Fc+83m2emr57H6G8R33dmMBdlg3oWohDURmjOHDA7xRMsh/aUD9PU25ut/6ihlTyyTNDJQ71KFa19+jevILasQ==","shasum":"0ad59d19ab6d50da087d07b3bb86f4ec5c6991dd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.832e64f7.0.tgz","fileCount":16,"unpackedSize":175668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevJZMCRA9TVsSAnZWagAA0YcP/3b6K1ljlzULPtzxq5jb\nH6EZTPlcZ8qOAyP5QVhEBt5nI/jF82NvYUK0cmnrhMN7e7SB9RBOcEtmeX9P\nx09AwVQeUMsJgZo25PRBtuUS+T07j8+v/sh1Wo/s3zFPRylHWavOiMHzdRhZ\nJHtTH2/XeDMvik9MUpuZU2L8HcG3ungeaY20CMHerkDlgLPDk5UnAjBaKRnB\nfgu66O9v/hrZrzl/kTBo62NyRzWDEWntsSToN/3wqg7Av3sK1czrvvbwGxqO\n7392lFKrtCqyYd1+chxpulxnCZWusc9v12IgcauQRZcbyMNkzOZwUnjV0Xry\nyvg6k3s6POk5qIM6vL98DCENRiqUco4nLDutntVdEbU6NOCWxuBH/kVLEBG/\nFgOq5YFFbU5+zpMP++hTlkkYSeG5NazKq7A1X3GenDMWDHcfzMnzdVFDWPL8\nlZ8HuYHBLbkHGeKwHlR6RcY/k42t5QCPKvC42T5eJlFhSNl6Qaei/wBgpeaR\no732OiGZxCAGGuvxKt+h4Wt8xGCsFl61zzVkzbMb5kvEvoz/M3wEcE2grit5\nlVJVPO/XcnvmbEW4FcWPXz649JfJ7pe7OsVC0kY8Ylb29TAPqSIQGudWUVvM\nPT1I8mqTYc7ylKHAhuypvDVawOfUyro2k67xYk9d1K2IDNKWM83eduFfhSL5\nFDvj\r\n=/rQc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICGDWj8u0tOnYuNQVrjMuA+EcPgAgMCHJCuKGGk8Q++VAiEA8893ZUieHtqgoTkP4DNJCtMHtHZo2hNg5eO0N0bnG44="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.832e64f7.0_1589417548526_0.8260355961897581"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.472fc4fc.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.472fc4fc.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.472fc4fc.0","@material/mwc-textfield":"0.16.0-canary.472fc4fc.0","@material/textfield":"=7.0.0-canary.2139200b3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0eb6479ea05a7af0418b4fb939f915e39af03923","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb6479ea05a7af0418b4fb939f915e39af03923/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.472fc4fc.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-GtkDqL+TlfXdlB3xxFc+D5rRPnk28+MKfiVPBldIIF9sh0jSajNvvUGMgfsjhm4aJhJn9rk47Q8oWaz1CEuQCw==","shasum":"ff0e4a6c5495d751b68d34f504b190f675990613","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.472fc4fc.0.tgz","fileCount":16,"unpackedSize":175668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevLzFCRA9TVsSAnZWagAA3SUQAKRqQofi2iaA5MWoPOs3\nVkSgIFeR2bhtALzcpANrnUMGB+LhY+YI4SVzcZJhcIIzWXXKuGFxWPFV+95r\nTtXpvEC/QxZOU9prvTtVPsJr4CIFDm1SuG/0QjB0wT5rMm9nrVJZotDiNS5Y\nJkVttkuReIfLEP0rEQHgOiqNKBnBvFhmpJ3gto0RtkHO1ssXshQN7JPVmZt+\n+PlXONwawLtsdOrzmYVt25bwTM5WzyJtKmcVESb/23aTwrf4/A2NKIz+F3et\nM4TiXIjK97p9sHEgqoX3b9TSOBmSnABLcUGBWL7lBQ2Vg4pje/BxlN6UWQua\nZ5LxTC+2PglFQHVWqHNjEGqNWtqRdxuGe4FHSgFJexSRLX6xyL4ph0kKS2jL\nzqq3YWN+OnQ3cuA4x+Gr1Sv6ccnmKcI6pIAlolLiESGQO0UuPtBoFRfUYZPK\n6SQ5epR7IPqsiYdc/ZA8XcAMtoKDDcjNvof83Rv+YbVXQVLg0CU9TTTqIEBW\nmsi0rz8VZQS5wwzxavZF9xUHkHkvc6t9bqqiZ90HCRKsTWCu/mUrc1q6+tyc\nv0HXyxtkR3aF8GBOaHoEGUN5Psr7a5QUJf6jPH7j8seXqf31KftFuv1WeYgx\nsdEjnLqkeK/4Ysku4luxpJ7T/8CV7SKwk8jA/3fnx4t9W4ykuAJfzNG5xhBu\nbSK9\r\n=vUQ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC07PZCkCqE63wizz1E/O7ZufXSkbVI+K1cz5Wt6JW2fQIhAISnFutwkB22N7faYUfAae0fk7ryRHq3oCX00V3MMFsS"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.472fc4fc.0_1589427397035_0.7702484357328592"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.4dcd7dd5.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.4dcd7dd5.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.4dcd7dd5.0","@material/mwc-textfield":"0.16.0-canary.4dcd7dd5.0","@material/textfield":"=7.0.0-canary.ad0c0c103.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a2b512eab44e739c09fa66cee4f0a65698e697f2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2b512eab44e739c09fa66cee4f0a65698e697f2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.4dcd7dd5.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-KHTShbNe4oyw4NYLjBnqcvysgXPlpFTyqwL+YBxJMeN2gam8qWAkfJKGKDtXeo0TnVAVPf6FwHDOj18HBn25PA==","shasum":"465f6bade0306bd22a406a2e24319c2ffdd88e0e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.4dcd7dd5.0.tgz","fileCount":16,"unpackedSize":175668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevXD1CRA9TVsSAnZWagAAMvUP/iD+48Bp/Cxq/cBm/w+9\nUrY1/0Pku7epZ0st7V34gDnqxoJVa95cjK1ggGp2JIL7oddDArpp2NHLW/zZ\nMWxnQ7Uy5q8iAigB2MdGYGw+A56rt55zKH0srMpMwMoWtCtyEfFm0NxrfjhV\nWR0cFhniIinExjX4WCkNKbk/yrXq9hUCsdElzesRRCBGZvd5h1VConNFJrgE\nFEgRKQVlGIvtAAuskvCcJxs++pnR1fV6YZ7i3aNUn54eWMdYQU9eL87DDnsb\n2YD1mIcAsV7+G1ejnOwVTf5cjZnGkpEls2KyTzoIwE6YeL9J+q2ykJAxMi4L\nAUuhfDXcMUgg9Qjl+gS6FaU9SgHBuwoNixsWvByYKqYJotxbNa+9OZGkk3Qr\nA7RXVGj8BPgj/7cTHWXtF4xmGfuSa2P4aeX4lMLv9vJqSrUl+3peq6eOFKB8\ncH0q3zTapRmhxe03/iponAUO/uoOF9GPlIZrT+WPMpnIcEVYzzDO/q1NgmC1\nE3U5lUigG0lcxtR6wxuGOHAOs7KAsYkMlFMZq8sMG1phCR0sBz2CWGIDkMAh\na6Dw3LKpTNO8fWdBY2TN05UnMCDFw0B1GxRTDwzzC8J9uWHWUJWZAo6ltrk1\n355NU9dQlVZQe14qUjk1Vcl/C4aBMfGS6cHVsqFOmVUjABw9UAcEgie/ifZs\nQxEJ\r\n=XSEq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPCJXxTc3Xhov+GMJ3VmaqspqDP6oF1fezeCZ9PAh5qAiEAoCNpikjTGzxgtB/MD1Z4oAMvftLT2uYAGhDJlpfjlwY="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.4dcd7dd5.0_1589473525070_0.8485066462648305"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.bcd3400d.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.bcd3400d.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.bcd3400d.0","@material/mwc-textfield":"0.16.0-canary.bcd3400d.0","@material/textfield":"=7.0.0-canary.ad0c0c103.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"dad5f0740d5be7e0efe9c5037afabbec57771668","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dad5f0740d5be7e0efe9c5037afabbec57771668/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.bcd3400d.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-au5J/r5QFMrAroW5GEk4JbBWWRiSGDYc0GBcy4tCKtRZOufLaVBn/vGvwXTG6Lsv1XIqVqwqi+HokQZaxgEYTA==","shasum":"d0f150f0bfe977f4dbe0412ecf7a0e9e6cf83d48","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.bcd3400d.0.tgz","fileCount":16,"unpackedSize":176338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevxygCRA9TVsSAnZWagAAYXsP/1Nlppl7201U59S+FsnK\npS7wR1viuMnzZ12HCd5hP90jfLoFWPVppcCTPhFVJ/npz/omqewnfNi4zpCK\n/epgMzLDC7WViwE2Rx8gPZmkS9IN2xb+S8Wom1e4V0ZX2rBCkOwPDBDuI9B5\nQeIiS2OqdMCLjfzroV3XaWFRvulT/fnVkVCWMa6wyUxLLT1PNDzpLSqy/0Z8\nGDS2N+yg1xsQPg+rEs06bTZuoLypr7gvbejZQqZ2muddslDZMZeR1ZaraCZn\nJ8O4UkUiURFWiW8ZCwuHmvrwMTgyndy7wDMHw1qw2GZi8OPzJhZCk9/ieyf4\nGNx4vwXYc9SRoDbz0riuQv52IrScyTL+HOk2C2liVLKlfZLIospL06I+iM3c\na6R3HW5pigRvr56b/PiqnGTWNzq/u13DliuutAHrDi3Vz/L0ifeO5qVr82mK\nPPdlp8NDjwdR2QlmBf2je8mILKeDd/kffNI4kMb10PFvM1jbz61JcFsBAFOv\nVjzeWql1mcUjw97PCCD47CwVU9zfYn4tEAd4iN7hJYH8DTH8mGB7o9Ho71ts\nTsrjov2at7HOjDtSAnlM/ZgC0rWQ1CvVujy6sI8zegplLLLuTJ8rKZDZoBJD\n9+mLsUM9T8A5Kv/fc+LGDsdZgSdRSHwISeJoAT090Qj2kxQ3u8HGYG3h3Px3\nTQwT\r\n=9NG2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmcnk+ewLhKrVRGqTufHhQqp+TVNZQtqYTQF1mXdunSgIhAO90SbCg8iRjH9pnCe98O5cBrXFbBhxSvpY4lIXMgrnH"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.bcd3400d.0_1589583008217_0.44253360580780554"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.91f63179.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.91f63179.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.91f63179.0","@material/mwc-textfield":"0.16.0-canary.91f63179.0","@material/textfield":"=7.0.0-canary.ad0c0c103.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0e5622d76bebf9f0f121549fb3dfc9bce15378d5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0e5622d76bebf9f0f121549fb3dfc9bce15378d5/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.91f63179.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Ekm3bKELQ/Tn+bhyLsflJE1/JsKEr1DBg4irTOKazpn250xsTtYDc9dWub3R+jIfU5qiWP62awpKD6e1frdtcg==","shasum":"c29a874e093359a9be080d372439c6ec1d0147b9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.91f63179.0.tgz","fileCount":16,"unpackedSize":176338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevzUoCRA9TVsSAnZWagAAIroQAJvtVjb/zr84ML98u5sK\ngWUC61W7vuMYNyuyD0djKs64wxK3t5lxJDYFNrLxOyodjggGKLruxFJ08hlj\nvHK1JQws1XVSDGvEU2NiJzlUagJixg1ndO2p4kX3nQSGv3ihGQQf+aCwnK0L\n9mSAX6l3nuoQvaFroD2XUV9sNVns1ReeN/+EaB+/myfI+QJQWxNd1ALLExpb\nMOTlPIccapmbhqDVUMPTzeIWPSrLXYzeEp6aYufhpuWaAHV1BVZFIQJBhVpR\nGqr9QERtunspAWF+fQZzH44Wx8Lj4YRDCaWZfnbYLsOfsIMwm0VOuMoweLRM\n+KB/EhbZbzb5zDnrAob4pKQ6/gtyVeytfLTce5aBYbXcBbj58h4NysFu8uq0\n66wkLoqNDDwEomJ33udxDPSI40P5LYz5pu1LxMo6AEvcFPTAUJ+vPYEuDa8i\nfBKZNy9RHgjBw+0mN23bO1zGoS9VFbqfSWLTM2uyWDc3hcWLNaFjFD4zWGft\nrRt4IEOTFfRJfEB2Xlbs+5VutfHT8ey56zd9aEKPkTHws5C+Ky3nOFTRD9SS\nxkc8eus+lAc6qRoiuL6t69gr2XJ0it7m6V7czZXFr91ClIC1fpeunHsjFvRe\n0+F7JpQySwxS2v0gUqQblzli6IG1QIRAfKaYUAzcky/BPk3+RH+MKpr8gVQ0\nN98Y\r\n=kBrt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDfcrJJ8VdS4ik0pVI6NRIOD+93VsG6p8CUSs06KcZTsAiBh39tudT0e488RAh1OfxLZuh7J4BwKFvb6A2yOcjkxCA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.91f63179.0_1589589287855_0.913382450098366"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.b8aafb56.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.b8aafb56.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.b8aafb56.0","@material/mwc-textfield":"0.16.0-canary.b8aafb56.0","@material/textfield":"=7.0.0-canary.fd8f8f2b7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"cb4a37dbb03476df8ec3422cb9bff794468ad220","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb4a37dbb03476df8ec3422cb9bff794468ad220/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.b8aafb56.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-vTrAknwuxCFk5zgQuDE7paUsuKTy6y/pdXLR9rPsUCLaHZI+T90SRUq+AjEeuPfIq3qoy1DYrR2RvzZ8va4osw==","shasum":"2a4ae7452643924384aec6e10b58a02364415627","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.b8aafb56.0.tgz","fileCount":16,"unpackedSize":176338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewtSeCRA9TVsSAnZWagAAdOsP/1mEErobupZpB6nO2ci1\nPiRwf4r8R0aKqXAphslYtmSl/ZCGxbWptfxEMXb7NX8Ai9iFuVWuhEkqZdXP\nem0S70PC7D08ck4+Wq0TmORnD0MEsMwbva8VYdA9MJSyLjYRdKB63aphkxGb\nM2u8uO27UyJyjs3vnKjcw1KVSdxgaqEx6DLzODz/wE1Dww//YHoX8TuwokVe\nC8edq7UnUxdKWmhzmZvZ5QxQK8pYeH/JKJ/Tg++ZTKm+81FNmmdw0BjuEvxE\nbv9tN8dOHNAyD2aibxHChuL3I87LB389dvakCnmLElR2GTqvwvRhImOO7y3T\nPkfeg/FGR4F29s9GnB7OncojrFhP6VHDC/cBYM/c7ND5+D3I7UJJQHzN+hsK\nlePvfkTdO8aJC6R0eQqwRIVT5Ee4ZRdgrklrQbN46lXZeM+y/azkF82OQHVS\nrvhTsI598XwqoUpCXTA5sQzeR3pRd8+hyZRJyg9pz6rdtmwOpbp4sNk1n7dd\ne5dQQjGS8MgKnDYfVnmFgwP7FeyvTzq6i1a/rSDTNNm0NU7cyTij5Dcw/prw\n5LJOdGohSLKEEwlHR0xPBCn8Peu0r1VeDcym/IQdZD3gijcNTBIRMQrX8nO9\nk03hT02wBL364QWmyUfLD0/PewYA91ydRbgNqAoiibwE7TcDTgAryCWtZQx6\npr7k\r\n=wCbe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBWvaXQ/UWd6/yMv8is6QKfmdfs6h85HyhTnaryLtEuTAiAS0UzGF7cVL8rF33MYdUYyllsH8+q58/qGpoUvDRHmDw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.b8aafb56.0_1589826717984_0.7960081401405965"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.a564b194.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.a564b194.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.a564b194.0","@material/mwc-textfield":"0.16.0-canary.a564b194.0","@material/textfield":"=7.0.0-canary.730920fbb.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"88e988925ffe167fc3916968d88a99b85d5f0319","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88e988925ffe167fc3916968d88a99b85d5f0319/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.a564b194.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-tSGZCRy4ydBji80g6hkbB2+G8FsdZXViG+aB57DvIbncWXOIvlaK/7IwZbyS1DedxVLXbG8MCrf3+RxxK9+S9g==","shasum":"a5680c76b8a047412a715327bb3da7cd6996fc7d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.a564b194.0.tgz","fileCount":16,"unpackedSize":176338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewxRXCRA9TVsSAnZWagAACYkP/0mard7Rh+mFWDu1sQZy\nHKD/cgL4KNndgkJbyKG4DovBFuX8oDKcTtchWphd5vgVTo/R7wZ//hmxGttu\n77q2bKPmC9Az/1X+ijykLKy3ptVgpYWqEp1mdrxdqpRYtCQ628Fd74yClLvh\nQKXvFPie+ecn1UCtgca0oFO5hNJgfcR/OBxk/EEIM3itUfjmMojRL2X2VJ/K\nb4n8gvBgBEE0Z6P5n7GGMnYrLqPaTPWmFX30NaImFHnKrho0iN4o6dl0uLno\ngwCmHQd2uSSos4q7pyEH/5SWzp7web9LAc3AUt8n9VsxCgqUX3joo+9S0IX2\n65A1Ak6xEy4liBdxOau6tLxs6CSHgA5/s2J8O5919WszK+ZGRgQxjhKEv7ZY\noBS810X3DSPuLG9+aqgHBhScsEjSXKQ+SujIBZ5kAsJGHPv9wMLlNO/3Vlgw\nDFqdiq9ESHW6VL+ccXFupA+P0Ly9ERuaKQ6Zxjb7VemHG91zlI1u2cfCjbMz\n52Z38tvirxldtK+M/4VX09QWznOQHEGcqGDY9TMTHjzzSKJA27fsPow4B/q5\nePJYij5PL/v+f+0iOrA0e1q83vp0NfdvxMV84M8QJpLvPIhPGaF8rEWEeFd5\nd+Afe0qH0njLBMgZtLZlOumpJUJGhWnq+Ob1STvuVsT9VRi6VQfwzlGTpl13\n+u+z\r\n=J4xz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYKLdXwn87ysK0mwDhHWBVrysbX9db2ef8Bst2c5/IgAIgYSgKUg2xKhEF0W4KtKCUqOAfHqtPRrC60z8Y3jcv+KE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.a564b194.0_1589843030956_0.0521023470276436"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.ef56465b.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.ef56465b.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.ef56465b.0","@material/mwc-textfield":"0.16.0-canary.ef56465b.0","@material/textfield":"=7.0.0-canary.730920fbb.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ebf59585445179b39ed7a77dac598972ce48066b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebf59585445179b39ed7a77dac598972ce48066b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.ef56465b.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-vCerlNQmiK6U3L6iEaOq2qFwKt3L2LGJAH1CnLjmWRX95lis6n7qJDioQZuGSbPajyvY4hyWl2GBcxjKIv6SzA==","shasum":"e5e03648e4ecd05f041620a6830cca67c824ba80","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.ef56465b.0.tgz","fileCount":16,"unpackedSize":173401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew1cGCRA9TVsSAnZWagAACnEP/jswDtNR70Lw+H65EV5y\ngJJQNM1Fg7eYoJ4w9BZFPFTSFuQL6thVzZ/CYaGCXe0Jtm87+28PwFa+uPTN\nLMHygJUjDjGLGdDOikGSyDorp/IY4a+I1qNadnbpKl6mH3YAtWMyxr+fPaQ2\n0H2iiaiIupe4imjJCHGkTYJ9MR/MxAIzewx4lTTtXdsVlmgylznHsDAlVYMv\nx77O4PQJWvV/TpJ7wggxNIZz5exPUNUtz2MEbyS3xjtu2hK0pgXEsDMKIDSG\naW4Oa1Ww2rlcdWjoSlnJqhezIx7OtUAXzEDOUDWtCqVsbKM9RgQXW4rSjkWy\nMjCbT8L4pxVMWP/3uyyr3fXpyc4Yrzgmf7wmSNeUv4SFR/JJyHLzMqrKVEFO\nZ9ZKEdl2HIPuS5lz2jnTOiV0oBTr3AOVaUAPx6/4oimYEKmiwKzDkpzkRvv3\nARahxkbrpmklU7lyAGwV7zKWPzKwPbs9vdIsvJbgKK++7y78KXoHR+lg6tNV\nyj2osokQcl/a8HFNg324E6bBlUZTSAYUJTOBT59AY+W5dNa4pA7CNAjAIl3P\nQe6j9G4oTubJntIfKE58tX0K6QzxRMWlRrfxKKt1w2KotMRO+68BO2OMZ6ze\nOHO8xuURcAOYXfQuDCP85TaXhPMj7HTKPoT5bs6rbNbnl4DW/Zhy07LlpXtq\nkMlA\r\n=vdhV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGn/qosOwK3KkRSXZzEmpWqjDnmah3NqegJ8IUnpCKeAIgB1LnZT5EEMHuo5FdK1xDjfqbftprlhDCeRNkFuPfyWM="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.ef56465b.0_1589860102246_0.0677105452301261"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.c22dcd71.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.c22dcd71.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.c22dcd71.0","@material/mwc-textfield":"0.16.0-canary.c22dcd71.0","@material/textfield":"=7.0.0-canary.4497b86ed.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6a706d54228a517263b38bfc1185c9ebac4aae41","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a706d54228a517263b38bfc1185c9ebac4aae41/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.c22dcd71.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-B8AJDiqSEyr9lAst1Pj1AglY+AEkPhhvt/x1JzSnpQPuxLye/A8bNkt5jbTRwLDfkb3RWNhNEDWARGQUfRkEhQ==","shasum":"0d49c08620ff68ce0ff4af1ad91b0f72987ce5b0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.c22dcd71.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexBZVCRA9TVsSAnZWagAAM2cP+gIGfvP6lDZR9v51Z+jp\nF9Ttd+sIjfKAchkCY9FBmXXFQsO1YE6HvqewCj0K7hUEXhnbWRoiMXWAx0R+\nRHCg+Uy2zNnGT4tHL6OooPlHp9m2kzfHbYcT/9D6mI7CKfphNcJzF40ASOUf\nKp72CnvTqYEZKfP+i7TzvLlEl++MGiUd5ZV9me4hTvCO7/+ecRQgdY1gD2Gx\naQjPZr8NC77kqq44LjgYwOcGekhP26zR135Nm92SksgB4f2WTmnf/lJOCH3h\nulHqGmafqc9hsOXTCrovXkPBSH8akF1xvJYdoZlTwSuPbOy9CLzA2MupEI6/\nIg3iiOGuxN1og1IyREW/IkRS/HOUE35Hm1hZbev1fVvodLBWf1l83X3bgOlC\n87ON6pYXIfbhtqXglyVihEKRO6ZmPu6RGnzEpXGnJDosWopdceL78KgqrxKj\nrQpp4olbgoZaofSpa4f6R/tvpV3PbmNyxk6VX/FSj8gpyE0bDXh0QN5cMXTH\nGpLkp7ZSLr8TZI+v7rcjsJN13VhMWHeg0ma37BG+6DkH6o71ViDIxFIbnQ5a\nBAdiXePR7qQgVL4Ccr1K/xQwLQjZlWaqipevkAL6X7CJJSHzqZDI3eBU2SmL\ngXYLc4llR3oHum1YHXhqLAkuPfa/6p+lHS4G8qtuuyCYM3Dgk7hsqyOqFzVF\nOeL3\r\n=niNH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKKuvc02ZNAC7GtuWF61zkbzizePtUq3/yKmE++hKzMAIhAP0/P5kLVM2yn7fizM+Yg7nW/roWhXTxiUO6Wbad6nau"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.c22dcd71.0_1589909076573_0.5161987982445881"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.6eb62388.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.6eb62388.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.6eb62388.0","@material/mwc-textfield":"0.16.0-canary.6eb62388.0","@material/textfield":"=7.0.0-canary.e3eacefcc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"abe9e974102de52260c3cc1347abe8592e0d5e7d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/abe9e974102de52260c3cc1347abe8592e0d5e7d/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.6eb62388.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-T3hWJIBifsU0S682ZWggrM+V4dd0VwOHVDXY+Qqj/pCqbCQcJ5qnRwNqvMQzCWOZMa8deRaA07BJpxcENvbjAg==","shasum":"6b80d9caecf6e23e45ecd987e2611fc1cbcedf64","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.6eb62388.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexEPPCRA9TVsSAnZWagAAY0wP/3maAvvvtrN/usG7bQGC\nKwQjInCXkAYvKLgfZBa9jFKdlArN5apIGMlYY7Qtdqal0Tg+yLqPe+hVfZa1\nAEc0wiVl1FbWkP1PNxIqt4Mf9PQX9tNbnic3tkE7AfvvJ4aS+LCDLQz9iRXO\nLCwuWBpZiEBfMYM14syLS+09TXjgcHDDeI6AONiKOLzc/SV9cAQNGDCwbuQK\nL7AGUbTSwEGOms+K5R6oKjMY9+fAZWwH3smlLcl7lcF71G9IuaOFSI0BqjI7\nRohKd3+Culo4B9QBETA0BLZynzmiGPy+AGWs5zH4Jo5NEEzL3Op6cLCDbUD0\nUhdDmMdtreEitkgcaQdONmDvfaGICx6oII2p3x0cB+/dbt+En/AusiIaEOwS\nbbCa2Edw9PndwDenrPiFhFu4POimpEFpDRviNXdZ/g5THG8F9PtUrPTWO8r6\nfvK9LDi7B8AY+Zi7wT/lK0IJqBop1u4XHR9YHodUCjR3lg32tz3mBAROU9T3\nwvII/ZPgf3k+ByHPadpzSyGxYBvL5gyCa1YnjeFk+aPiMq3RbxhS62YOAo+0\nNwcfYAVS8be+xr7Dl3sZPcSBgltgCOTgAcBPb5n4Y/5827PrDVOUTNCVzm5Y\nQzXiNd5Eqf+JqMv23uNgm1Dnpu/iQo8+9N8/JK1H8jxgTtvvP1W3NrGsQz1S\nk5Jw\r\n=1i7N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAnlMILIM0uY4xmXAcVYPfimD1R5v6ly1cp18oWHAdeAiBsMtTwtwaNwi4xTk1jWJDHxsb7/nM5nGkXWjCyWYkPhQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.6eb62388.0_1589920719493_0.20162560706342214"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.9bc3230c.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.9bc3230c.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.9bc3230c.0","@material/mwc-textfield":"0.16.0-canary.9bc3230c.0","@material/textfield":"=7.0.0-canary.e3eacefcc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f02ad2a44567ccdf91e52b6e07f5986d49d2b375","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f02ad2a44567ccdf91e52b6e07f5986d49d2b375/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.9bc3230c.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-ni/TxT9d+9RE+5imjhhF6GccjePYuMSHyoLjw86Ss/Pp11yJN7+AsXPfzDuXBeEC1xTC1KP2ZWojcAvrTvXGHA==","shasum":"738f8d1327e3f5e72a839b3d7f7b995ba2f1ed14","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.9bc3230c.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexFH8CRA9TVsSAnZWagAAb+4P/309UREXKplrnhPXUrMN\n5HWfMSv8ULaMVH11JFuB7BdSrAYTOJyblKXj82TA9XqnwQhoNzopILtJSwaS\nXphy2jnqeiAk3XshlYr7iqPDC7sNA+iIjp5upCRuEsSN5Mp+cwCvs2qJhaFb\nY3Gk9u8xWc3ElOs0MFaBLwnCdee22xouV6fQ76M1c/WDdoWjPHz+zfScViY7\ntwNVRjtBJ1NqeICJyywyIO8KED8bBulbj1BnVczh6VHv3ea02U/53iEFuAzv\nfIwP4HgOurqqfOKYqRDrUVs+7ESVZC65+VmBk6NhI7nFNYMQlbPdDe83uqpU\nchH43EDdhFLNzpbBQzRcrSVw6WXj0YiceTYPgHW4NlFSOHDgjCbH3ijAjoDp\n2s6/Z2lWaN6abgOnLC6DV4fFGMjlJfvCNhgQKbbR/OSUK5sDNAJRPTN6QT6t\nIu6Px2YrALKrufnuJjuKWEo6R9EOagISvA2QoV/wAspDj5GTx/Yr8wRSmPCO\nXZ2fyh4KbSDw/HhyhOSESiDKWeUkBxE+aSPQc8hEWtf3EyBlXTNXBCAgTQfF\n74ZxloUu0Jh1nn6ncY1WjOPu8FjugZi+r/rbOtEVZyRMh660JdO8lQUrLHUm\nMOYTzcwMi9d1DIzqc/4YuLTWzlCDtUgJVSqJt/nh0lsH+rVQXMGQei37C/TY\n698k\r\n=GIa8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC9r1UhfqsPFAbyzWp3ZiWjMNLLtpqQ5qUC09Swg+iFGAiAqq+w62EKQxX2wF5nOgsED+8KcWAS1WdzfztUnj+Qp4Q=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.9bc3230c.0_1589924348275_0.26494180224252717"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.421a6856.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.421a6856.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.421a6856.0","@material/mwc-textfield":"0.16.0-canary.421a6856.0","@material/textfield":"=7.0.0-canary.e3eacefcc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"caa535baf074d026cb6a6f50dad38341320274de","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/caa535baf074d026cb6a6f50dad38341320274de/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.421a6856.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-FIXLHE8cq5Sr3HdVEGnRLWwV3zpx4FCIrpbbLAXlsfRbsXNhiHU6swY0YYZg7OKff+vrt6aJwZW+44oMoTCtjw==","shasum":"be8938beacc82069ec7179fee44cd5600365401d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.421a6856.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexL8PCRA9TVsSAnZWagAAxHIQAJR58TOfm+jfkls46xHW\neErZBoS/s+AAVB7g1C5U9vR6s2Md+52Eve1TGt+qxzkYA0VMVPkeGsSa+/Tg\nmqKobQEgNbtzgaVeJAzqJR0qGQq8CDC879On0pdvdTp6vlSZvRT1BKVTrFx7\naex2qC7mQe8QKNFST7Vlyz+Gl+bCLsAV9q/TdqakfES6D4mbGlb+tRPkaBnn\nxS5AAfV1OgCGIhs4elydbEkwlWrrH+AB8IiYSDDx3ywyU3PkwqVFi9X5gLDj\nvRBD3kMF5jkKOBNxx+650xG4otgIQVe7+HX2ijKaQzYjvxegQNRn2e243ULJ\nuuXFFmJw3wYLIOGFbJo/5+jpU7SGuhGXLxyRigmyjopm6aihM/Rjsrp9x1m/\n7qUfo6voRuNj14lsA12fouMHhwI9apdp5HwXx6ufZdaFH8XtHlKOiH7FKF1v\ndyn8cSn9E+Uht1IC5pQv4ITpvZgoT4Xc4uULI45t41zhIJKGRBtKL2wf9fte\nxwz6PUIKgScYuAjTafzvC/oZNSUk9+BsBcY87myQ7wimT0xJouQdJ50C9A+k\nz3QEPlsCMHZYAIGSZtE0UeyOl3KUlIQSR3MIz+d7uJnsDBGTF2gqRLo0fCH5\nVwB9dJaxqSNl+/1SFdkEmSMMq4+4MiTC+4bLv8S2GluT3/HjGpuwbgHPmYCQ\nuQbm\r\n=h2HK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICOmSArzg56STz2j9j4Zab0T2tddwC8wcMTh/B0b/kwIAiEA+zO1G/LD8CloXUk84X08vSehrAXKAsPF5qdnotc2lLg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.421a6856.0_1589952271115_0.047141518975762686"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.761aa6f2.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.761aa6f2.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.761aa6f2.0","@material/mwc-textfield":"0.16.0-canary.761aa6f2.0","@material/textfield":"=7.0.0-canary.e3eacefcc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2888b72f42dfca39ebb17e6fe3df0f964d21febc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2888b72f42dfca39ebb17e6fe3df0f964d21febc/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.761aa6f2.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-9zUMuejXY8JX/v8bntjxz4mhTVij2H/WvHlzrTNnOvD0r8avb0yppiMaRWqVomgwa25tR27hrGxs8Hfk8V8E7w==","shasum":"ea5c065712fd17b6eabcc8c193e5b8d3130bc62f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.761aa6f2.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexaGjCRA9TVsSAnZWagAAArwQAJxFqpW4rGlK5yP8TKeR\nTw1cLUwJFA1ofcA4Gx5jDbUEZFWDwgZgbPriaa19cEaOX7Uj/q98uqxvl1C9\nnOmylD7vqaU5YBiaw2FTwwzuHRew1DNz6lSbkmFT//uhkyrPynrN+cmbVC2L\n8+0dizIa/mwi/EPYy4BcJimIIHyDzfWWisrBZYiF1u8TysxZCQR6+s/tixY9\nZfbi4B3XPhwOl6+kdMo+FhI7yEhidHsOEKahcYVujNmWBXRAzA1KG8Nd+z7A\nC6Rcyc0C3r+lJfO5kVHl6hyRUcDiDNpozbQooGPVOCWCAO6YMeo379sF8F3l\njTRg8cPJMlvoi6T+F4d3ejKkuF23gVv1/LLF1vS/SXPqVGXC4OUKPM/WzMr0\nETkA8kjCzw/wNudY4kHjI2M+7Q3YsGzOxRYRjIzxk+9pW36MyhXFx6062pvM\nXC94NZ+O6TjzIzIGwR0z4hMSO4s9CN384K38oUVIHTaBiTJCahAq8so/xbvZ\nO/AbNB3CMeQsgLWxNrW5gjdyB6n920ftu682gxyLb58XO4UgRC16We1nBAMD\nUbHep1rtEyb565tUx0XQ/w6sGAGcOUQqqaQQQUBvhzPvYRVrBq2RV+NnDzyA\nRXGggk5DQik6svC953k7WU/xZevNqI9R7/ALBt53XvrR9UKwkVWmND7mhQg9\nlPPz\r\n=dnJy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYfKFHsVRT/278ZvHZOls/IMood0cQ37iQzoftXVmq0AiEAuzPExZT5j6ZCU8ZFFXVNNGHat8vdDFXH7drZEed7xbc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.761aa6f2.0_1590010274192_0.5237917843216116"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.f8654c40.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.f8654c40.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.f8654c40.0","@material/mwc-textfield":"0.16.0-canary.f8654c40.0","@material/textfield":"=7.0.0-canary.4ebce8d78.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3b845b0ec744d5631e466e04412254ba2fba6ec1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b845b0ec744d5631e466e04412254ba2fba6ec1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.f8654c40.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-IRbcKOh0BMVcS8Ub0JSYI3SErkH967fxXtlEM1fcs9Gb22bBhgEqUGd7t+v5L9CFJHQ70XweJkfgK29KCogAng==","shasum":"e8567efaebfb0a5db4641d80a0af6562fa18a0b3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.f8654c40.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexaPXCRA9TVsSAnZWagAA2uEQAImuOmYiAK7Sm0YQReFd\n7CzJ/byRdpuC5Fo9bhueOPUf+dns5siEy2MuhsPDkQutpwrsFZpm6VyTjiOg\nZKmHWHJ+FNTZgy8M+3ImMvpVVdPt8ndcicg/1O66Ve9VlzW5UmZuCVntgDJn\nIZcHnaYVECnP9hQwNHgUx7qk3ApPHVuLEpFGgVl83gOFTt8QjnOqi+SSGbkK\n3ZUz7ArMJIghgYGQNUHvDn1bZSAuVzHiMnoC7inbjN7OzYiDhn/dCv/bFi5W\nrNiTTQHhOehHBPcloIRolC4OGTpezRz1sJTRttKoyK0jGzRWOoY/4zDYJqim\nV8ltkzUKi+BmfVAVBrjPurkNhdb0C6Tnid06uuqWhMHeRrPvpNW7pK144Lif\napXTGESJdfUWfNpDLoWIS60lfaNpwi5K1CX1jfAJ5ue/jRhytVqzGqbk1AwE\ngsR1ffCu2q7w0Npv+UdEk1vrSUyx3XnWQFl5VXWCYaetw8olM5mZieJBCMp+\nN3ziwKuRAhgYrBEIIudZXlpyPzo+1RWOg1eMiRht0penze/R4J0JeUluTV/r\n+pPiCGIzwxIR3LY+ijp6TUKlCSuEGWpY/ojizNmupDaVspnivuu6iPBYyhAp\nYAMBy75MvzZkcfl85R2dELgq0FGAC+D57IIYb2drhkuauEMIkDomAwbPo//z\n+H1w\r\n=VxkY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD09QgDNSmUAh9SvXSG8xeO7mkKtSOeFlabAAJNb3HjkAIgJynHa8/q5GC22Gt2wx02ZgBxACmxLgvFXVX29MF9L2A="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.f8654c40.0_1590010839038_0.6305620735056796"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.05f3853e.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.05f3853e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.05f3853e.0","@material/mwc-textfield":"0.16.0-canary.05f3853e.0","@material/textfield":"=7.0.0-canary.c67667e8e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/47fd7bad9cbebba6f27bd4bc85aba3a4fe6dfeb4/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.05f3853e.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-KhzbFWZED/b+bUwFwAS0QW00t1LhQunaUn+zgZiDZNyOjj6zYJbdDqFAm0n/KT+F6wZgTRFTKPzWXxblwhnbvQ==","shasum":"2419307f19e12c835ab7686bd1dd5db4fda311ce","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.05f3853e.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrttCRA9TVsSAnZWagAAMY4P/18Aqfgvlpy4ImnmU5Tz\n3MsUJw1P2R0A4ghVh6efwEJwa57LlpqGwv7v7ikMQWg9qufL8qys628ZWQv1\nsWn6rmDTG3mfe23rtZM3hBmFiiGjiH07gtaLYpiHI18GcwtsKvW6UFp1Z8Tz\nlA7Icn0C3BMT6iYSH0p0icX+s++kLRfi5THPqL4x3Ee1BllCi4nnVwdtHmYq\noEHVwAcXs8N3DEXPAwlf7KqsQEiUFqafcEXmZK6lZ5CfIuf8fNvHS2tyl6WF\n0jCjpYUMxOozF3tL54mtKGDHo5tyD1I06FDWdtavFQpV6NSYXaxhuroJvnhk\n1ooU7mL2/VH151asXPukoHsa5ChJ0K/EYsFOsyFGBPAKPm7RniWCz7Jp0ZaB\nY0tJ2w62dKkIyK68UuM88fcAu0kaJAh+W31H8ZJcoEUMfHCFs0R5FCrGEhWx\nEwjmJTcgqqTR/YFYOJb4KiMRE0TD0xM6bXKvkklEfhnNL2gff43TUmtt85md\nNU7aIs6Dlwi8BIaDBhzf92S8wEYNCo9oIa1vbd+rBddiAySWx30eD962rFOV\nCh95our8jsZQwv486G8qVRTsR6C1kgCqnBEj/ezHCkbxS5AjsPa6Eur+iQH1\nhaihzGlnNqZA1mp9ZovOmFOR6XCkv7yjkFQWjp3HZzO7+CYpmEnpXuSXna0N\nBnF/\r\n=bkw1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCewnXOVSJrWghGT3+rLblqrnthhR8mS6KiwsmZFslxkQIgISH5YVO1urLfSb5lMv2YF08ME/LAD1U16Ae7VuJR0yQ="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.05f3853e.0_1590082412574_0.29693829586125675"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.5fe61f4e.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.5fe61f4e.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.5fe61f4e.0","@material/mwc-textfield":"0.16.0-canary.5fe61f4e.0","@material/textfield":"=7.0.0-canary.c67667e8e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7b3ddcc96480928cfbc9538fcd5a840b5ba5205f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b3ddcc96480928cfbc9538fcd5a840b5ba5205f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.5fe61f4e.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-UJQfbS/NXGXdn2lhU480THhmk8vZHrG/uVQMEDBPjm+Par3BDS5mBVAf2ecpfSLZJ0qqNnbfZ4wBgyroy3nKKw==","shasum":"1100ff48985675ee1da770f050c0c663417d52bd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.5fe61f4e.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexwnNCRA9TVsSAnZWagAAUjgQAKFEIarcNIhMIdma9Dfe\ndz34fGNoi859CeQQUbRjIa4T+QXNq0AQ51bY1iuh701a668xzcpyPNXjlCJL\n+YKZ4e0LZImGZ0K2TF5NYv5N4cjWhyaLNyd/mM1QGpTVDE22aWIlAwyVpL6C\nyM4lVNAA6ACqL8hV0e/otLO1yqTxYnnPwACkBAB5AoeYR/LbemTRu4JT3huX\n2dEjSny74Nb8IWar/7IGwR6xS6VfWb2Q4VRT3aOK/uXdSqU4kXjaYqe+K6Pv\nZKGm0CvzBFtIm3NxkHaFpjFkXTEClM39BcM8dqd+t9zPT6RqjrW/ZXF01qUT\nH+rhORv1MB1tZvSNa3y9eugiwzqJ2I1IHKKYAln1KId9xuEl6YBOtkExYcY/\nQ24YjkeGAMzdo7/SgYLuijBexFlyp3Awp3auQLTWVpl7al0Qy5VO+YL4+0w9\nVM4mDef3KccXfXWAygrV968m1EXtXgn1VDoB2ldtc1hzU+WLsrv5Q5eGmf4/\nuI0aeTaSr2eezXEENakyCq4Tfb4xjtOxEZzJtSih0op7EzTzs0hMFGl9AupM\nMUmVnBSR8YzD3H1Gc5KW/tESYD0qHUnYMIrEDLxkbG2UqdhvHC1y1uyKR9dS\nIoJOrvIYuCoP0khszzPsUiE9OCQvTxj7OOJ3+yu+/DB52NNVPJPX9AJJzqqC\niz8u\r\n=RGiy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwYcUSrcNLdfJdxWWzDiBvqUWiGPVGKaaYn31WKI2KXwIgfnAMtBPSBSqMZ47eN4StqxeJ/Mx2dt3tBMYs3IkptJs="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.5fe61f4e.0_1590102477157_0.42697962710706827"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.17d33745.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.17d33745.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.17d33745.0","@material/mwc-textfield":"0.16.0-canary.17d33745.0","@material/textfield":"=7.0.0-canary.c113fc942.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b97ea4369af06c50f10fd7a5fedf708bbbc380cf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97ea4369af06c50f10fd7a5fedf708bbbc380cf/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.17d33745.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-B3ftJlIqx1+sqzA0c7EMhwyQfsxBlJw703Gqp/PS+6LRRjDFz8zh6Uh5nZZkoJhKd9Ew77hab4XD5GiIeaRCzg==","shasum":"b725e15649d6541fb1139c8388fedfca2f7f2937","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.17d33745.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezUBNCRA9TVsSAnZWagAAYucP/RcLd9kChoF/1n7Iy6i2\nRtTbfF2Ruho1GBYl1alqtSZ3trA9J7DKBlSV/Flu/fS/KDiRlMsLOCh5iPhx\niRXBRAs7lX0jmb0lB48YXuxyG9CrB2rOWu10rzLLlIF4sjK7lrE3Nn2sn29o\neYVmcGNH0Bnq/kZ9CppJbGMZ/c33YbK4Bwqp2JIsN3LPhcJhgRIl9MGEsjim\naP4oVPTu1RJOBkyzi6v+hXc0m+KHVMAsemqCioa52y+eTc3IoB4JylJYpT9U\nzV+V8a1p8/6kYB0admNEjGIzhY0cHOHyRKnazmGSgv44LBK+2FGrEwo4EvxC\nMC9P7Ynz3obtw8voYZuZGRzd9xSiRQvDn+WS4YqItOLtXZso+/WMiaU/Dk02\n+dQeGC9zFDe7WrcgiyNnmSOKzAEhn4u8jz9VXkzY+1ir0vAUBuJL80gLNnxN\nq0YBdBVun7kJs0iv/b5pr2fDj3QnieLbrFPjP9iwEhmGz68854mUORpjQG7A\nWT77x6ulBxvD7ee0DsCcRHbZMXPXc7bVSXeoRYH/WFKgrW8t3or30+AWmWkc\nTUuMKim9AKufyRNATtLRZgElgR4pQM2mY9CeKL9uYupVsV2JlU6SRvz2ntE0\nkMiCicEmpTWJLqPZKXSK0xrJUv7digRa3qjMpR+UyXe6pESVvTgzdW64LxXL\nDCw2\r\n=+3Qz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVyFpq84vkHQ/+FkosZjooT/8YDP7Mwm4eLPTOr9DxIAIgdeEBXw93gRQyVU5YwjTPV9dDQPrKNhaS7Zm0LmwJZf0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.17d33745.0_1590509644743_0.12266495516611053"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.e8b52f5b.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.e8b52f5b.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.e8b52f5b.0","@material/mwc-textfield":"0.16.0-canary.e8b52f5b.0","@material/textfield":"=7.0.0-canary.c113fc942.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2877bdfbc0560854bc1aab7aee7ca63f798613ed","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2877bdfbc0560854bc1aab7aee7ca63f798613ed/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.e8b52f5b.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-xxzO7o8dNb4YQcVAYWB0eA2Q0XOLX8GN4oDj+TuGxd/oIuaIir+KL3rjqdOSbXFl3oLjSGoB8qmCmmr9XwX9ag==","shasum":"e5b2e8acf313326377774140ca964ff16eb3ea30","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.e8b52f5b.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezWM7CRA9TVsSAnZWagAATv0P/0wb38PGOtx+Tns43o7Q\nYDEyxoX7XFG7AkiyhsjCyTixNy3GRwgeugqvM6iE90sPvM0nQmzJNmZL4cH7\nuNQpFZscOKChBrA0tqcuxNhnLJPrGgM2OgOjGG7in7OSkPgeJuSdzCJ/4nOe\nmscaIU0DvAMAa3/8k9oa0iatgTDYBx2KZzR6MFuVnEL8xySuBKTgWdaRiljg\nYpZH7yyeRIsCjOslwWxedZModQdoyM9S0m+L+rts1vlO6AVOTGricRnPYO65\ngcfCFdnEmzSmkS/dXxKItHgFtcC/9iB0Lool7Ee2uh/Rtefud2UB2DAx7ghV\nwSRSrYUu8bTfzh6WPq3u2XESPt+zDclqWPJHmCbJRuCWlucM8XlhHrpluBYD\nOu6/OMkpMqqTqdbHaD40KJzA5dOkTSK5moGPL5yVkWdxSetQ2bRTr71S5kJh\nl/CLWnXEtqBp/SmYqksX2DI/Pm+pEVwZ63YVxVl9WCjWLHK0W1mosQfC69VO\nEXq4iw5wyxi9OZMZ1t1VJ5LbLnIXijAq6ZeMk2XKmP+4Sx4kK5CWfrrxYCVP\n7/FHUpbbGVMU+WPN6rLd2sfJJXZVI9vb3BFAbMcMAt8gctkSZlvIrZFL0AdC\nItem9sfs6nNxtwwqow7SVHZ7dNeGLTsJnxAiFZjOslTh5l5nvhSdHP/y/w5i\nUZOr\r\n=dNkb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAyueGqlk2VgANbv8pBzciC0H1eiMNWZ9kktTBvFbM8eAiBc1b1d8ByFKEB2f2JvIoJ5dKsM3H0r7u4OTjuq767fuw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.e8b52f5b.0_1590518587502_0.8458258093244102"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.09afa0a9.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.09afa0a9.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.09afa0a9.0","@material/mwc-textfield":"0.16.0-canary.09afa0a9.0","@material/textfield":"=7.0.0-canary.01de07011.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"924f688ba033093a21706afcd1d5b3dea4527355","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/924f688ba033093a21706afcd1d5b3dea4527355/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.09afa0a9.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-bzOZftpK6yCkUFEHivNNPUFqNTHpMe8M3vteYeSdc02mzJz8yATCUH3triy59VAi+1tfaKtDzR54uVm0ogd+5A==","shasum":"745d77b68d38b0984baad6a86984813cb347edfa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.09afa0a9.0.tgz","fileCount":16,"unpackedSize":177406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezY25CRA9TVsSAnZWagAADdYP/0oOGzxF9PqOkmUPhZGI\n7JZ2IAYM//j8O4HzJpHCGR3DMvUU8us/BYB2lcZCKdn0ZH0f1a0Vhp9FnGP4\nXqXnOulu/naZOfxVZRu0m7Rj/p8WodWE8EfwKqVrHpduYyAXytQp+Ras2fkw\nO7wp4Eh6Dye48saPpcMWMTCFNy4fWsoOzXO65KFZR3e7SRo3DYO5dxrKHVJP\ngqqEA+wFeo7LyLRX5ob40hr9mX8rrrOekmD1ZocfkKuoK9Hxjj9m1fQHy0Kf\nPEKjh8YgbnkWpaAj1HU01vH6gBoZVjCPmJQvpowvx8MwoWUOT0i0olUHMdcZ\n8ky4PPdMDAHsho5PsRHBS/MZojrvvoqPdmvKxRGVbuRVzq5SUpRWKSxNMDom\nX8Z5UOcaHnUMI178QkiltXY+JydzRZUdXX/Q5x05Ulfv08GIS4CNcm5EAest\nJz2P7wB3UOd2H2Dc+CFnf6zO3Mt0xlhtYxv3IgE7IL5RAVLSN8fmnjCzprcj\ng3gESbq35ul3XaRM8cUcSRaOMt2IIuWSLrP0DwSok6sCoQ4I4DmRyvmquYQp\nKb/PQ7LtOY71OWXS9xu7/v2rtMI419Z4s33SbACchQrbajXgnwjAU/OHr2LM\n91FPUrR63Lxz5SS3mmAf8gA3xXnBs1zNUZV6GMjn+mOhQVruKxvKyFhaqZ5D\ndjn5\r\n=+ckX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyzwzckuLqvo2TmgDkdTh0DsbVvNsB/3mluUzFqNYLaAiEAzZK3FCNfTfFX03gPF1UGLod6uCYznh004hE1LHIgbEk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.09afa0a9.0_1590529464752_0.5366996136862718"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.58bc9166.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.58bc9166.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.58bc9166.0","@material/mwc-textfield":"0.16.0-canary.58bc9166.0","@material/textfield":"=7.0.0-canary.d91794c7e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"71845a1e43b7378230bcb8e8fec40f195da11c2c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/71845a1e43b7378230bcb8e8fec40f195da11c2c/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.58bc9166.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-gmJdD0Xfo3LmWLRxoJqgvklkuqGfQOYvQ7K2mwnRolhfUb8UHFi01vJ7UF0eSIIw1K/b6Cr3nJYv+iLOKadWaw==","shasum":"6b3329773acc128a7a1ba49f8bcc7d1262d79166","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.58bc9166.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezbSsCRA9TVsSAnZWagAAsJQP/j3r6d8jdwaCTa6UyEOj\nTeANlKwmybkqRfvRwTo+B+bmoIN+7Kg+CpaLY6M3Xlf1LcpsKH+erWds4Ki5\nQRx7dAi84s9Zo28llLjoc16SJlohI5BSm2NeUxeyKNF6fd1wtub8KRBTp+DM\nY8x/5tMOzN1D0ZRXD0X81DbeglIAumvt1xe6+4QpHzawCa1epuCcYDU5sX/w\nh4c52OMIKzuiKnnChUMddJRMGz38rHMk3Ql4ePUVM/H18GaVu2I3XsxG/xkd\niHv3xYNZr7F/W/AmgHX9RgaOP+c2vFEYU0tOAAJ9QYpFVZheIHpELNE2aj2n\n6HDXLDjmN5aNMIk0h52U+l9y9pD9OpuTu/Bjk1ZQggJg2H0rQmliaVIzQ88M\nL3oVJpJUCWKVv7XlrY0+ymTUpipdcO4K68gLhcBx8BhXPNT4jFZr2Tv8rORb\nRO6cv7+gts1UhBt6dNZcxQEsr6J7B4trkc+TbRPWIwXwNsd4LPqz6+jXcw36\nret+4JD6tsyhpoEDJKXY7MQGnnF6RtDgAwHeT1BSvMOSqlheCkIxAUwhUHKL\nMcZN1b3v6pG9AimVfi+xJGRSwnk+SybDD1g3cCAIsfQ8Lrl1afrRnmmlhU32\n/UTiFI6jCSl8ubMcc85sNc+ZgoYpcWWM5vvfLbhg6g07q6x+0dk2T7Fm84IF\nfNxf\r\n=qPuk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYBKsLXg6jaQMsBayPIRyLZZ3iIYfuU7UyKQdeIR0pFgIgUZ6RBq1cZaV1IfjENg5G0/B9nEOOT7/IVge+mAXVYNE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.58bc9166.0_1590539435897_0.24519343995858822"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.43bde144.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.43bde144.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.43bde144.0","@material/mwc-textfield":"0.16.0-canary.43bde144.0","@material/textfield":"=7.0.0-canary.d91794c7e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"eb504ac1efc09a16041fabd1f3fbe62a49717c77","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb504ac1efc09a16041fabd1f3fbe62a49717c77/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.43bde144.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-jX37xlULBEskPm7F0XziCp6cCo9TH7ZUDP2Q9sEOFPsHvpxFwzW0lB8mLnbHu2gI5KC8qHpC2cfAPigRJa6UvQ==","shasum":"11810057a69a1964944613f23fbda514d0b9efff","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.43bde144.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezrGLCRA9TVsSAnZWagAAKlkP/19gXj0ScR35qjDODvTC\nkeHYt9CDmSvji6IY2oPUx7HQ1if3BTb/nCA3sqg/5RZpih3qEPn1u4c1mYI+\nyA+5peJBnouJDvi9aTpD+39oD25h4/OG831phi+628BSJ6dknZD1rgS7vLI4\nyJSenHIFlKhaRX/SaMPv6opHxTyAwfEf9T53zHWzSxxzQ9E7QaCy81lo2nHS\nXbjzpv5eV3PKLKdGhypksGqMdRwkUbneGWx4Fkgp8TyzBNxh+dGTVwJb7kS4\nYdrg+dth3xbTwk61U36g0BnDd4Ukvlu9o5sihFix9L7nrz2o/mY2haJfCgvB\nXsOZ0AXnEOcsU/5d12gtEtgdql6IAATn+zV4HXY3fYJxEhLtRKMjT1v5QQes\n829EEtrkle09Hlhnet2zJImGiKRNktzG3MgaAu9S9VWpzqVxl0Q6pUHyPqzK\nTMPRsI60s+18hG0lmprrA8iNHm8sN/iKK80MaFJwRWNWMeMRcaox6LKl3R0K\nmyCjLB0DN+BkP2dcjHNijLu3ADukUnl2wzQJnWuPCq11g1s+MeEOcGETWPfi\n1jVGVD7BeRe5fuRzNu+5Cm21itCvRh4KSXDAcTB5fdW9ELdZbV1923zgnB5G\nt9zL1tEmmhPy2PRWM0eK5RwrbM+IpR40hXc24aQwRLuOVpFcz3z2FkO9xzfu\nYeSN\r\n=TbbE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFD4eQW4D1/Op5rddJU0gOiv4+yPZZF8/C2LHgUvxhbwAiBBPmwZt9C1HvUZ4lz9QGbkMXRWP8tEGyRICKEMoWJY/w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.43bde144.0_1590604170832_0.027191773688798104"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.51067bbc.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.51067bbc.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.51067bbc.0","@material/mwc-textfield":"0.16.0-canary.51067bbc.0","@material/textfield":"=7.0.0-canary.d91794c7e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5dc99bc495fa061e0960f717c69cf33620115937","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5dc99bc495fa061e0960f717c69cf33620115937/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.51067bbc.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-2fXB2w88SO4wIkZNTkCerloApwfmotYKp/urExUpVvJ8sPM2g/Xy+SWJd5dBhT6ZBZasIv6Csvr/zpMqhuxxQQ==","shasum":"a44bfe82ca93e0f3a3fcb6c8e7e9bcaf20c7fa3d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.51067bbc.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezseQCRA9TVsSAnZWagAAxgsP/i+hva/QNd9H1WmTZuYq\nQI2Nag7FCHYYg5HWZmfNrDeqX/AtXrq2fHQZO8HG970VdUuAtxuUAE6B8ilj\nWlsnOiitOsV1mXbAzKTgSJ12AhrYBU9PHWm1Os/TF1/4SUHZocmGnKtu54S5\ny5nGxO7imSZeMI2b7hTBcJeDpYrvNa3JYJGaMcYmiK5twzGSG6xyNAVNX15/\nXRRxw4mRavK9ewscBS9LhcZCphcfdenTbxYxcQTpJWTj90ZwlCus+DGJ5JQ4\nPStrYUbPtKQ71N82tSIZzpFmDDXEZlJLVbNpQoSL9waZ3DdGp0I7Hr+EgN7J\nw12TrgCi77pEOuIiNOnD+Z4G9cVdGT5kTwQBVOD4xYmaR/xckBfYa+59xxgP\nxfFToR3SxIZyox/P8/7s5hp705vWJJD7ffNJtCM8SgqGaI8c27pQ0yw0hTHu\niT29qx10m4SYGYckpQdxrTVURSMNPwwncpzVTF5/y5jum+zR7m5K+Ne5qkxx\nFJRbxBZ/FGGYdKIJnlB4rIFBbFlqIO2W7EIpqnUzT5eghjvO5aLkglQJ/PKA\n7GYfAH02IsykYOAu95zeMvqco8sN9Wzp/JSdlSHJ2423caBMdiY2YBe76E1D\nfqXDYWqZglyUQsjOPV4yC6E5bxhXRLMcBOflGMR5tPu1UzCrfyVvOdMTAKAl\nY+KM\r\n=/7pn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUjdR5mgekv4qnMUG2gRPjFM1i3aon2BGzogf+6tPiuAiBzQ32hSBEVYwPovUrcrD+r0BZdRQuzigTArlUyiJjltw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.51067bbc.0_1590609808017_0.538314111707993"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.92751ffa.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.92751ffa.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.92751ffa.0","@material/mwc-textfield":"0.16.0-canary.92751ffa.0","@material/textfield":"=7.0.0-canary.d91794c7e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"534233b7f60f5860c6a4bd35799b98a3c5d277b1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/534233b7f60f5860c6a4bd35799b98a3c5d277b1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.92751ffa.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-PSaDCxRBT6+X7bt/vCgkB8xAOuKsv6mN59iBT9mzm4vNwPtpoWZNNyQKfWtZqT2iS7IUcQxFCVl/3oTot0nTpA==","shasum":"b65fad5275a379054bf3f14e50ce029b3cc41c41","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.92751ffa.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezt1vCRA9TVsSAnZWagAA+qsP/jajCO7BNSZp0nLfyLGR\ny5Ib27VFzggSSuGuextld8vVJpYS8i36Tbia2nO4OVqzibXitESk/0ApiuPv\nQd7QwxK3PvdVPAdmVL4TpUj4Mn5ihIkBxIimq+vVnreFaezNeQkXZjbppWYv\nJzp6XBFs8wzyAqBLwDUxB1KWL3DagXViibrypHxR6A47qsrTQIeYxKXkLmqG\nagqUzV/xEK0eiw7+DC4ZvbnqiRpNiM71e+ekfgtu5Lwg5/kZDVb5WoTvvj1b\nWJRg+C89ii8WbZ45BmjKtnMkugSVNj4sK1DoqpOv8zwzVilclbWJyWYH/6JS\niCBSYoppsXUI9AR0I/+w/BOBnsMW8rBMIPKP9u+PqpH1UG2nJqMOn7yTC8/S\nUdH4hUuivHcJCRwrzYRsVLipZwoASYF3GYg8+GxRRya8NMHXpgVu5IHOt9Rb\nB0dsf1K3jM0HZMtUEtayZ1CUjcQZkEDYyUamTYmDIJ2TDexiaR5rTaOPoyoQ\nfcHX2ZKeLGd0j6aKJME1tckVK+b2AQZqjepDS4GaetG+Oip3IQF/Yg7MDqpO\nFlKaG3snQV851S9uvIZoWf/ZJ/QUVpVAMdAV+RqwxCK/nYPWXEHXTUbHp+fX\nt/F8Eg9sRlH8ObGudQ5cpFOstLIvPMRf38Vf/3ase5d2J6yL7oq9jdua172+\ng7pF\r\n=g7gs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCO5HAiJJ/X8D6c3/xoV8LVgLV54KOMDMWQn3jqB1qC1wIhALhZYlD/u0oJDSlIl/qR97Ih/W7Jqu6A3ON+d0fYtGCE"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.92751ffa.0_1590615406932_0.7510384861602348"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.aa2b40bb.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.aa2b40bb.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.aa2b40bb.0","@material/mwc-textfield":"0.16.0-canary.aa2b40bb.0","@material/textfield":"=7.0.0-canary.d91794c7e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2da9556d449ea1f3ddfce5e0978fba83f759a1e3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da9556d449ea1f3ddfce5e0978fba83f759a1e3/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.aa2b40bb.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-lcinFCWnEPiv+G3TO6rs8KcBx8ATPqYmjMylC0ZejR/N/mrAR7UnQz+pl4JwNbzBLuU5wisZi2e+vaBrwKZDEA==","shasum":"e5c7e036d9fe663d56defe0b0a288f103a5db592","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.aa2b40bb.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0A3GCRA9TVsSAnZWagAAc1cP/3F98h2UAnA9khyrw1uR\neolAa1DEis4672WRDPlgeSK1R04R1cm5vLCkf0rxSpEv78UWFmcU0tC4uP08\n/uJ2Ll5d2jNATgzruU5aiZQ94hiP58gwF/i7C1V2EkrF5GQsb63zfsGr0F2m\nLzCYV9+WBE8qaHvT2Y8ItJY74j4GClVjV4qdx3tqIe7W9Ocfkf4/sBKhZvNj\n+//ZvZg8ukLZOd5kpavAVXHmYepOdLZwoSfDCwhXPcwLD9CViZjS1oRQaOvM\nrPjCht5gg6iDL2vCjawRewPxri4BSqux6BOevpYJzcgscKAXFPoEtWHAPmG+\nd/d9MiQmDcJZvusxwKJKYy/iG6JuAG8IQaE9p9MMj8t7LtE6bzRPnkYP+wXD\nSBvFE61Cg/Hu0rm0Gs/ZcFD+DhgDUH9BTI8nXxwGf6h7KVPpD8B623DzuOM8\nAzyvB4+DlhNYC/zvM/0lUYRdo9YHO/h4jwkz0i0rsgfrpa/E0yE1ATRjjCcd\nf60Y5EbhIshGeLA0wGbSzdhEzmBhpiCtaq7NHj+IzJOVZ1yTQF0vAMDFfYor\nqZVe6WbLBWLxEdi1rkixCUrkKk5F2gh07eBGADDXhyHJ/mro6Hs2JgLL4nlK\nMqEIEUtUGQun17V8xVHbrVtv4DjDJumetEk+bjEH5Sp7bc2kHW5KP8sBO8g5\n+Pwc\r\n=tb1P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICyEYzgjenMfucqvSaI8v9xpKvE/npgskhNdMkzm3xBnAiBhvdfzhp119LviYxO/g1GD68V68UQ5oSvNTkXZOGBEww=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.aa2b40bb.0_1590693318536_0.037013285184713585"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.1a870a01.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.1a870a01.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.1a870a01.0","@material/mwc-textfield":"0.16.0-canary.1a870a01.0","@material/textfield":"=7.0.0-canary.d66d22bf9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f9a61196d2e2f42c5bfffe7dbe30411a16b908a1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f9a61196d2e2f42c5bfffe7dbe30411a16b908a1/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.1a870a01.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-IiYsCx9EVIDxyorHU8fKRw2EZ4hbdXvFk8d5QyWpkjznHEu8ST8PLZNQtzWrDQqdf4QJjhM74MvIbpvenMFbmw==","shasum":"8032de67a2a3969c110ff6af20cba2757a85014e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.1a870a01.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0Cq9CRA9TVsSAnZWagAA9wQP/jEdgqcoLce6i46ebJEy\nWx92JVW5Y3Qy4qhJsceqBC4aR/vv1MB4XKp0wUs4qmZFK0TqhYnP1KzJ8eDz\nit77yFDwf55+44G5u6HrN3FiEh12/n+42sSHI800Eo+4jIQfq5iw9vWAtIU5\nNdk515gVU4Z3xSYV6I0P36uvBoAljWujiwLsr44C+EaKKbpA3L47TqZ2iTHm\nB7eU3zHhoBKyCVrpjmDRmH0V9ueY5zHuif13gxQOmR1w++VngX5RbuDN0Uvk\nkRo2jafGDdyk30noCWFxudQaPblxa/serpiQeVhpxuOizWLxkGerxpB9ZU8/\ncT6pKpA9rrOD4UDAj2m4qXriDGmrA9UrTIZ56yuFbRVzg3J3c2MsDRdmAW0f\nRfTmm6xV5/SJVOIsiEnxxlhzV3Rb0VthUrhCjBGTffY8kO76d685FtT3qOWa\neQEGURWj/drstEVjOFdu0NsWzXZ6QnnJdtg3xuTZni7GidXSN0aX0S7IyjLh\nG9NTk9VNzi2DQzVIz8iixkJhGvHd9kWWs4qB24BkZqC7ahlGPIsaI04YrEoC\nkvkOm88xEM619rUbVsbGBI2pe3C1T34EdGp1g4gbwgESGD8zI+jVNFUdo59+\n27lfTgxYtW9W7pFhEUBH1XHsgImYhrQBvLzcjeC6qoD/raNj15F9C1eoiucx\nSst0\r\n=cIGg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP17iL5OsQy98EpV99T9ZDWBZ5RKITf5LX0FLAfBW1MQIhAJWw+XBxma/dafKzsqpi07Q+O/38oPNSjZ2iZafbto6V"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.1a870a01.0_1590700733316_0.7937887006578117"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.ad57d086.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.ad57d086.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.ad57d086.0","@material/mwc-textfield":"0.16.0-canary.ad57d086.0","@material/textfield":"=7.0.0-canary.d66d22bf9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"718a29a398b0baad30119bd852a5e1bf4d8e8e3c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/718a29a398b0baad30119bd852a5e1bf4d8e8e3c/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.ad57d086.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-Z+o6gp9xSQSmZ7dQgCnrVJccn7KVnPk1fQq8SmsfQ7Kjo1hp42guqf9+UBaIvW27Bgu0z8LYrK+Kj+eaS5l5eg==","shasum":"cb2fefe409b0c9953357df168666c77d05d9ba56","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.ad57d086.0.tgz","fileCount":16,"unpackedSize":177526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0Z+GCRA9TVsSAnZWagAAtJgP/296xVR3U/5hpWqYVbkK\nL4Kda5oMUTHpct7WndXqWMGZjPzszlQIk+mswq+tuVlE/4yF5qI7iinV4Alt\n87CkPTKUG+qsIKOVDJTl4UcGN1WKwkXSp5G9DzyE37Sc+xJ6MU+BwGz+exAz\nzn7GIUvdPpHmrNudTjhvqJTZfCqaV9+c/trqRyB5o/outWmc3euySE/pAg0M\nXGSbE4eK4KkxzEVXYqVtdC9hSMoiMzYA4ENyqBGe/BUyrvq+HB5KX6x3uKVS\nFDjJsMQIzJzN/g++WuhKTxBKk5RiNH3P83bpaSkROQU4/ZHRTyKsA2pM9ecN\nl1D2dAsbPXRFpPHwZfMlhFdNTm5iBtG/E5ZYyXJgDaqdFPhvgmNN8FamXqhl\n6Roc24kFYbfoZ8mevlUdXshVdlNOqDMmHJvRUvwqyY4QMqcg0mrQwDgPWqXT\nkUPDoJkvDvJ5oD+79iUuzVcauDHMxhBSc6W7A9/m9AOqlYpXzuN60+W3X+et\nAduKcP8f3qN6e+q7DzGuFwfuXJKZExSOhbmm4pWGhZEP7TmNBFxWVqtepC6S\nRISe8FwFAeoy1hlOa9dZi42CpP0qOlDZYULzPq7/+f5boX3OaL+pSfUMvw7z\nMW68Fu5I5swAcSL9I7xOLedErRM+BS0QqXHkbfz7dgGC/x7isoBiMx4oef8z\nXtpy\r\n=cOUT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd2IsZGNRytswjyW93rwda4T0JSc4Kesh4E+uk+gSPugIhAKqzs7O0OIgcAWrckP3nRPDm64DwB7GRCkP30PnVQO9T"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.ad57d086.0_1590796166225_0.22635601123811488"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.3bf2b4d5.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.3bf2b4d5.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.3bf2b4d5.0","@material/mwc-textfield":"0.16.0-canary.3bf2b4d5.0","@material/textfield":"=7.0.0-canary.8073a20a9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"796a0757a7808c623433691d3c52ef63cda47751","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/796a0757a7808c623433691d3c52ef63cda47751/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.3bf2b4d5.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-ztX07cGgm8IQG553wdNNkrslxHhFd3k3XRgQCSzVu/3jEnkfy106EZS3bRuhppudpc/4ccpkjAE/gKW8Pg1rGg==","shasum":"2307d3bddc31fe55ba594950329f437d415097f3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.3bf2b4d5.0.tgz","fileCount":16,"unpackedSize":178873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0aqpCRA9TVsSAnZWagAA/GwP/REyX7jwSXn1+TigldTK\nf3F/ULeK1QUoJheVAlEHGBhYT1N+SJuzacG2FvxD5SL4ir42Aoqu+0wMgjHZ\nVQX3H6UxmC3WqJ/FH3eLTuqWULTi/MH8B4MTUu4YFmjEEl+ha1c1I5F/ANp0\nN+QfBFjIDvRavWDp/4XFwBwW0bmrB0ZVOQdGshBa5AeYpcDlw7qUiQzAfmnj\nZqMtUiMTYjons5060MTcQFvfymOQK0OPe1aM9bGFuHzD0YczxIAwD2TGXT2M\nYAdgCO5BxDDlmjgdb5eWZYmWS4KxC1K9Sf0oeNh6YV+T30ZeqRXVZKQ26DHi\nEk24OESaeCkteUfh1ASdkxgnKVO8B61AwhTfXmFU40/nJ9cVL14KLzyri1fS\nI3eaL9AU2cPTYt3OIqKeQRF+2wamGrdkXL2E7Kc1IRUWHJPpUMUAQ35410NX\nSarfaQEaCQ+lPi84PsIqNhz3c2UD6R5+P36ebXB4X30KZP8eMM2UeOr8vkTw\nZyR9yEC18vJ2gNV27QT/v7WI3UuULxlIea9Yua9aZlqkLKTaIUmXjE25M7TN\nEg1UMzqZfsMoZfWzPLtUxD1AfzrYlZCEfT2jFxKvChECr2puKCSQ0iMSz1+4\nqRgGsLMRBoaOXkW9534VI58CPyN6ZWaGrrwO1FrOuQqjPTA8UNupdnhIrUxo\nW6tv\r\n=MUNm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsOqfuU/SG76N/0nZNaDVrpZDBiwzFqOOamau1cvDXyAIgCGCM0N5JR4aMkv5agkOA46DWF05vRmlyegC1aV4qPT4="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.3bf2b4d5.0_1590799016708_0.2771833155829624"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.ac05f090.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.ac05f090.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.ac05f090.0","@material/mwc-textfield":"0.16.0-canary.ac05f090.0","@material/textfield":"=7.0.0-canary.8073a20a9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"dcf12105ac71a486ee350d7b7fafeee2e7fbba2a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcf12105ac71a486ee350d7b7fafeee2e7fbba2a/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.ac05f090.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-2Qwg2k6v7wSrCWGDJs6OtM3tBwOBlMSD++QjATYTSilCqGCxYhjBJnbbUo0aqz3XS4yqJ2Vn2r0Jtq4uHXyk6A==","shasum":"d6dd68be0be77bc5625b6746229a4ec3deae2c99","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.ac05f090.0.tgz","fileCount":16,"unpackedSize":178873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0cndCRA9TVsSAnZWagAAcSAP/iSWspmxEFXBJpMmCU84\nzUkdpvOe9qyR6F9IKF3GTznVvJ+2rIfm5E3tNlg4u+r1HQq2g7UZtkFSs+bw\nuu8gP0aP2M9dS2gRLnp6PYctUrJJyToRs4NTgEQmVUXBRqQALa7guUDihSzp\nrJY5zfbuO/w2ZLqrnn37kY1Bnbs+JZiCXGf2onHVq2jwzYfccpWbvgVqM0jo\nyKakphiGRRHZLgTr4XjU/I4f2ZzK//r7P54B8XT/GrXil9zCzVYFxZ9l83Za\nbaGzhRHY/BIvTs8hJER9Quc9DBW68hkpZX8xPtUL/Q2Jrhp51AE2TvCpct89\n4sUy1pptD2ON/cZ9a5qPZt8VZFMOkmGG22rGK8BWJXkwBbHQLs/6obrwOTJa\nqUrnBfxS8ZQz8G0OXtSltpmnJfXYNnomv6eX65in5DM0ZU60BoxVSDNLAQMW\nTTKKnykKpLWVdXTNH6DBibDWQXWEpAMTJmgH0Gxoz9N+tuZayXo3q3yIONAW\nPYD8BKZ0jbzje8r7MsubuyCbHS5jHbHTvoHgtmdOnDmTYZUU+PaOG42rJvEK\n2Sw1Zx9SZTgQ7PqdtlVAj9Cc9ctCxxrpXEGIoi78XkmtPsw9LYQNseyGkEVk\nsYSREcqMndcQ+b1nYA4mIpgtDZwwNaGcFpGmA3zRXpa11kuu6c3tpNDKwhfC\nhPOa\r\n=wim2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBHf4SXAaqJIdYlYsUrlvNNNu/c2Hkt2DdJOk1cqYyhUAiEA3oI7RY/9zxUM158302MH2dt/OSoOijYOQyCPlVTXSpE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.ac05f090.0_1590807004449_0.6784547225563784"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.0ba7b095.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.0ba7b095.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.0ba7b095.0","@material/mwc-textfield":"0.16.0-canary.0ba7b095.0","@material/textfield":"=7.0.0-canary.8073a20a9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ea87617c8c9beaed33b593554f344296ff2b1702","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea87617c8c9beaed33b593554f344296ff2b1702/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`        | **Note: requires `maxLength` to be set.** Display character counter with max length.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform**`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\n\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.0ba7b095.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-DkE0QGrdNaWjRS4zH7u7j6X+YWXUWIDWyHhf7lOlExLjC/FnPSUT89vh9xn+TjzJH7Oi8NgjQ29pr/ayRmczeA==","shasum":"be18671fdf9235953a7b8487aa6bcf3a0e7e0f93","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.0ba7b095.0.tgz","fileCount":16,"unpackedSize":178873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0ctsCRA9TVsSAnZWagAAiFQP/RPSupwX1kSKLtsIVmiB\nG9thvoh4C9S9xGHnWqQXko4NVdwcFMgkoIFcVp7x3ftIZwRX8dA3z4XBkRlF\niFIvrjyLz+1o1i2DhLTUI1/rnsMBVfkGSgepYe8jbjZgoH8OsyWf8rAE1rii\n2o3+1q/cldLCCk2UF3AIyKByresmUuolXskUr7cpvtTtulUC+jS46xlbgJE0\nydtMy5J69vP2sTO+/IcXuHlxSdN9gZrP1lapLwZSQNwW/OicrKJ1ZFh/hZZd\nKTnUazj9wdtcceaYwG+wp3Peqf+mhbeqK1obSkXHcIVlDfba0/wsH13sCvsB\nEuMPmWMRh2ntp/tLDGnsnrwpv1neq0rFex26PXih2NdM6vF3e9TEQXbKKBv4\nxPI3jL08TiqAH99JcCFllREOmzx7g97gJn+dc30Uk9QOC/uVTA9YhcL+jo1P\nMoicaok/Y6ZDTudepMY9Uf4htQ6436qHaisQOJQ4Oy7TFLWB5ya5ZF3Kht/7\nboR5MA/tirndeNmH8zZUTUI/yHD005pbzmdSHFRh0cAq2JCnbsRIhqmQt8Qf\n8is3oSfgeZg59LGdde53TY1bx9DNsaL0G0hlvZNZlGHnqkvwcGbFcggqSw0b\n4HtE5LrJGVt50aaCNhdtlgt5z465Ldk/IL1qVToj24drLszvmDUZ4J94lO8P\nqsbV\r\n=0qXk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVmD+M11+NQSbYjP1hPEsHmmjVz9qzo/FeUvwg4oLXvAiAkZLSo6R5+I01ufN2pXHIz8fqu/qBj9ZldH0bMMDYuIQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.0ba7b095.0_1590807404433_0.16382730396548828"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.5eaa9bac.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.5eaa9bac.0","description":"> IMPORTANT: The Material Web Components are a work in progress and subject to > major changes until 1.0 release.","main":"mwc-textarea.js","module":"mwc-textarea.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.5eaa9bac.0","@material/mwc-textfield":"0.16.0-canary.5eaa9bac.0","@material/textfield":"=7.0.0-canary.b9776b1d0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"971c5d20ea684615fa18f3c991d77704a2435384","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/971c5d20ea684615fa18f3c991d77704a2435384/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","_id":"@material/mwc-textarea@0.16.0-canary.5eaa9bac.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-VxhUHIfb6B0FtZ1mMZnUwRk8/ZuN7riuajZ6KfKDWe5uHuLyL0bhoqBnqdpteZv41zUx25qh5CcfJnJiLYDZ9g==","shasum":"596b56c5d5a5533e84e5218e2631c50252d99751","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.5eaa9bac.0.tgz","fileCount":16,"unpackedSize":182825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1Y9GCRA9TVsSAnZWagAAuXkP/j4fZjL9d1E/goXc8yvw\nk6CdigIPL/7PB4xPgLwYdcGzZJ5fB23f05kR1vhwqjvyKoXXEO/hgIEhI0Jn\nD/ZF5/eZwNXklvq7olXsY9NOwwLMXqevxQzBd8igsPsGQ27KUwhv53eeDV3D\nnsinVMWkujyT9z75fFWvqvjDYaYdVHSU64c5VtndolZ1LLuDnK6KUHqWPpxt\nCo91vXboRQkMVpXKxDorBfgFATN7S7i3Sk1E6FFzF0N89GjjBPVaHvZaw4mz\no1zxI+BleTn05N45jR1pOhDNvI2WjupN9YtIH0MEUfO7SxYBQtdmI2U6A1wo\nO6shAWDMm6yiDHkXK6eZA7rVaCQPS56WT28Wu0/ALkWzZOSRoJUktDDqIOQ9\nooIgz46LYCGgCmr+VKM0umsuh8uAfMFj9vAJ94sDdTzrcBPFhiWwY4EmXtSI\nP2KMn3bwBG689rSjN+YWv0eSf7GIXkaCBqCwfaBcQEHwC9s8Kj2+gKePQuUc\nlXwrvHo5KmIEIPfK3nAimIL6Ek7y0qQ2BdjRSDUSspqO7sn1Blf8dARb6kcV\nzwBPGg+eYV3npfjx6FUQeP2eAAvaho34E3C6acSa+GC37R7rGv0eRylApsXZ\nB588Qrx9fQR3VLId24BXq6zkf2lq9yEjpxYw1Qu5rsQxc/5LjTXipGOZ2lMs\nM5sE\r\n=dN2r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/dhABb/THf/PTNYgaEGJPLY5aOVnL5xYFXv1jNIjz2gIhAN0eelBqpT6uuCNYNiEEz++6DQNbXIeD7upjav/aqbjV"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.5eaa9bac.0_1591054150183_0.030895167247204425"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.5677ac20.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.5677ac20.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.5677ac20.0","@material/mwc-textfield":"0.16.0-canary.5677ac20.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"371e5022a95234955de71585477022efd63b4645","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/371e5022a95234955de71585477022efd63b4645/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.5677ac20.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-kH1o2s/wES3rsvq9Yysfn0+iWu+smgg7gj0opwMJpcNPLJer8QAGfwjJes7WOovNCSwh9Ic71EBnFRJYWEztfw==","shasum":"f2a1e2e9832f02f5408c5363949f84d664688ec6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.5677ac20.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1ZXoCRA9TVsSAnZWagAA/LwP/iaKJJ7Drxf5p59+eArZ\n40YKF4ZL6OWHGM5gARMX8Ochq8p4qUjUVuwIZIh1KXMU2ctLp64XBjnyVCiC\nwFp3zNKEUTiOT6TT4ErPmEEiaspqQnUthePT5TEFHbscptxlb1/vnQKkLnCb\nXDWYCvyWhHPbzGvRCwqCSMA5xCoxmEYGgrAfKx71waP/co8dnmM04I6In3fQ\nrOMzJysmCjqyjTP+rzMKREJNDTaaZzGLvSN618LNhdNp21M9X0aU1cpfQfsL\nNlHu+clh6xdunwYluhQWrexaAj6t78hp26JMUiN4IDZWbiqU8Bz92zliwaBP\nXypZ2n57qlj+D9uFafjw1tchJ17tSUiQ8ms682w0Gc1oYAvK62Bshxr5jmG7\nLqdIZ2xVUpmmckZi5TqhVI0/pMg6XxzqnXmyoM8D3YtQ8zXHIUVMPHjAD6Xj\nCY4eiMFlLnXeI+PJSk8Uy0yLGXlz8Ca2u1IKtr/k4NlVu1fYTk4p0nSX8mNa\nCrqaIOY26wN97usiUOQUBTcnoMNrfVYKRkwZuX2Z2/d77kUg9Vz7mA6ft26q\n/agBpVK2C9oDvzw3VMy/WD8LGKOvZ5FJrXxjo7DW6VrkzHX+sLt419qG4m49\nlUx2EHSGqOgSF365TP8IuJEKmXaRGUA32gWsP+nyDADtzpN9gO5cx8/z4n+U\n/YI6\r\n=4CbD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDup9eRFGq0VfHwIFLTwWGVKoQbEvqB8QNOX50/gIpAeQIhAIxUCESeXdvkXClglmpsy7/9KtUmuchzDlIMtsRAczHs"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.5677ac20.0_1591055848166_0.7020886852043973"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.7ac6bff4.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.7ac6bff4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.7ac6bff4.0","@material/mwc-textfield":"0.16.0-canary.7ac6bff4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"393ff5005fafa04ca276d60639975d8bbe851f70","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/393ff5005fafa04ca276d60639975d8bbe851f70/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.7ac6bff4.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-fdg/LJliIM+2mKwqRrozntte7QW42vPPVr/3x9rmJidDWLJFI5jhlzW5xdn5C+MHmBpG5SwZtR6XHPmwt/O2cA==","shasum":"992782707d664d02c8901160e4d2c15bd8142283","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.7ac6bff4.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1Zo6CRA9TVsSAnZWagAAAWcQAI5Zt7hT+EseKEH9+siA\n9foyro3hifRiPAB0INcSLd13s2UnwrGUKKtxNTWsrEhqs4CdqGSf4yTDfhIS\nuST0kyQc/zVPZ/GifVGNhQ3UfEDuvFVKtfPpqzsUM4RwQJqx3dwWI9bPtWWx\nnDvyr7XmToX9sgnVkKjKIykBH5jJU2YKLrGs7psYAwLzIoT9Y1vmGGDx8nv6\nZLvXlNTK/oRgA1dqzx1MddMgcnVrhk/pVtNa+BKNgAkliEiNHDggILcpn5l4\n2GrHJqJI+EK0niCnbRivV6vwct+RBwxyaZfEMr4P+XMiSqoCkZcL0IWZOv/S\nDZ2ZWlCJEeHfkIpp1ngVc5LKPVjpXWWxjle6aO+MOwyFlFo1+US1Ll179V//\n46lXXAVjbOErD/Ej1ZpGBRsg/bSbe8tecrZOearecj2S/U0lSCQQusH5f/pC\nKzh8zEdUy5w2c49QUjE0MUYBt+q1Bi4uRqVYRW2ql1zQKQTZ6c/ZQeLzWOM6\nRMOCusUo83r4VUj0xUYJILxA8qA9vwFMVTw+jw71vuekp+iBBqjnGeZ0Iu/B\nWEkC4J9WZ4UA+90CZ9K5GN1oqRiSIp1yyhPRfURzxQ5QCorDSgS0wmA2PCzR\nMMi5P30pVljdAx9OFqt6ro0+YdkP3IxPJ2GUrf3yHV1L/LUxUq4U2vSJ98mf\n0eAX\r\n=U8Y/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEe//YfY8broV0fH6n/1Yp0dBA9bxImZu7ufXdWn8o2AIgQAs3HCXyWYzwsHoAwn8K2SPO0su91AWb5m5qpY7F4dg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.7ac6bff4.0_1591056954444_0.9508068984346039"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.d45622aa.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.d45622aa.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.d45622aa.0","@material/mwc-textfield":"0.16.0-canary.d45622aa.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ec53ab9a7c87df6783ef1e555aba6d7de86c46eb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec53ab9a7c87df6783ef1e555aba6d7de86c46eb/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.d45622aa.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-AN5REBKvkfJGTZvg5BtqU7uk4NXwoTXsQvNnjtiZNW3zP1Dg1AK3mi0i7X9hoL1sU6RY9TWwF31pysXNgZ8A4A==","shasum":"71ec0449db43a40e0f33f680e27df94b532e7b04","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.d45622aa.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1uTCCRA9TVsSAnZWagAAI+4QAIMKtu3S6JXm8dFCrfgo\nSA8EsNOVJ+bcd/gCRt1whHebKqIYXgqsSfFOZwre2LNOEguLEOjmiV0hZLXa\nofTkIvYUmk9ZICjFtk2OH0K6EW9TbcgYX6X9TAHRF7LoW9Zosti49olZZSDy\nYsJ404UM4t7StwBY8Nj8gbhIXdipS8BC3PLNqXkYw3Y5SBHt2wOn1ahxpv0p\nbxS8E9f7w/8/Rbs3yid+03VDbn7knXHlIQcK1m6bjfHQJC8kb4jrJFsnr0py\n8cR/s1+xuS6sKNXzgIsmblyavw6ZCg0pizbuKTqHvqf1j4w9URLwpYSuS5OO\n2mbNFPPCjnGfy6mjbCqOg9Uzta6WkPQ4KOt9eTUQn5p8WchLq4Bky8tLu3Dc\nXzrYw7s9xgkpyxLy+D8KhxOdMmr4Mbgz36xe+GNbbx7HGBl7HddXlQF4Q01N\n41KEs7AkSPK25nwzFAscNNygMBCiIeaSf2uriUmSnoNn3hL4rBnfzlox1gjQ\nAboqZTmVecquzG+hV+ScABYm8ww4o7JmqIwWDfMLrW/B5np0gEmptFYpBhYk\nlhWt83HxY2JzZDU+J6AvEbPs6bPqZNZzGrReWeFGL4T22F6Aiv5mDaHN9PsR\n5E5FiRvJbFofzqs5HLwAG67X2egcs5g82No8byZf1zuVrlsLFn6EYm7bSpxD\nZcCI\r\n=5cDV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuGql2sVh3dVrJokLRsFy8P55Tc4sSeurESQ4cSVMR7AIhAJ+A6pWUNakyhakIDyVyyCrh+XRLxPDcHFbJluVczAoO"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.d45622aa.0_1591141570390_0.6737797220651629"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.dc26c709.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.dc26c709.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.dc26c709.0","@material/mwc-textfield":"0.16.0-canary.dc26c709.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"58a25b562ae31e6c32c67599f842dc6bd1f86398","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/58a25b562ae31e6c32c67599f842dc6bd1f86398/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.dc26c709.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-7lpl2K92RQXn8hsUtldlrOy9tzNlrxPbwJQlW9nNCx/lGND8Qo4fQ3xlV6U6XUVqHD7CDZ8SCkMSmC417EHRGA==","shasum":"a113cf3ea2244b877a6230f69d82b72aa90614ae","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.dc26c709.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2qk9CRA9TVsSAnZWagAAvOMP/322GOyqGvJ/4Pl1wS1S\n/t/vKH6dHAwWhKg3CiByKmdiz9rJL5g1NlXfRXa0ksuNc9FqDGuSdOrfBfZN\nJiB3ISVVjk2FYSIFBFkPeHCF9oeceUGUzeRoD5OAJq7COWzXvAcwbOvE8Mvf\nNDO2fDe4OvaGSWmjb0IDc8tDo1bSkrdeUu440FvqEjOyAkywEpDHXksbMmv6\nFrG0ntSo5JEoFjVCdVtUXBS63fhRZnT6I7PaXnsj/T6Xb/ZctujdqUpbKwH+\nTeVaaFNqfk3Xl+NfKfeVKOGY043bmfFi1c/0S9WLwoEA1C0Raiq0CReqGA0y\nJnIJ4HVifcV1nCxbv5mC8Eiip6jaUmMWAx4aCDBBI13NHLQRhjg6+mf5bwMw\n9EhzSHzYYrgPKAYIAOaH6pHXfQ8kgjMosfuzDos63jdrWPjSp2Plq0yp6QQu\nEgLUfLpzc/PkXAY3f4RcXHF+04oyE/+1ScLLDfdjinghToYqzue2dhaxQZQE\nSvaTZGOR7nOsWd6nVWOhcaB1UWpkc6DpXo4qpoiTbzYoZn/0tALQuE0C7IsF\nl+dvEibFdWBhH5W1bVor1YBeXHyrnwSKeFQ9yR2Dbxa3/0Lhi7ioJjDviWbf\nR0eiUXjW3moWpipLOhAeRX2EIHVZf8TWqxseFakrDa+GNeBFg0xfULfSI3ux\n8BFf\r\n=ZYbq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEkBazaXieyz1NjmCAFUereinPgLS3EeEzOCrsjpAQzVAiEA9JU5lKIuXQ9yUMxZHmnQYq3wCa5PkZTEM4XyWsyEnBo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.dc26c709.0_1591388477077_0.8624263567211159"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.b9baf6db.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.b9baf6db.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.b9baf6db.0","@material/mwc-textfield":"0.16.0-canary.b9baf6db.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"911d44443a75be4f249c595f2fb8a90e42365c6b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/911d44443a75be4f249c595f2fb8a90e42365c6b/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.b9baf6db.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-wRe4Pg93ID3J6toGxJIb9lgQd8CumLUxxyGjNz/gC4CcA6mYv7SceaomARaB59ZSqmejUdA0IPjhwKFhbW4tDQ==","shasum":"70580e33231040f0602d8ec17d57a020fc69fef7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.b9baf6db.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2qmRCRA9TVsSAnZWagAAA6IP/0sAmVTI3NbDmZF70A6y\nYBsAGzVeXA2oj+nJ9fhYY9NhJgevsmqY7YJkHYBvKkzDptJJzSd+/SLH73t/\noieE9diniyl/VQXe4M8geOyoZO1DpZRSS6CrmFcpZkDWav5boBIIY////Mip\ngP05BsR/tHYEHWj36uxeFW3m+rHOmlVXd5jMeQTBBb6j2wTcjfW82kIwIp/n\n0FxTOaForfFfqm/HtZQNoPty7e6RfXcrwutep0OZH4x1f/vb1v8RW66kYgSK\nb6WGIMAJn7ThRw3VbipYr8naX1Dcp8TJF4dD4jT/PT6XEWqbhbVnIhNZg3Zq\noBzG9iVXSWp3tCZC5djWGwM0GgncFFN6qohOmzYInHwvXiQAr6fqP9DWmDr2\nQmteH7E3GUhpwSjGwwo/GYit3a6uiwK6eJlWYAq7U4M3CZLP5cK6z6qWJRMs\nPeTq4PDDuD2dGMSPtXCKCsJ+rle21iOjSmCCxE+oAWEjh5CaRqYJ5RO7wVEu\nXL/5q8Az6bEpBar4AkvsA1sGPkfSnyKCFVtdaQ2Nxc6dnU1efn1DnQU5MXvS\nZOqViK7pHxl6MhDNEGZS5ttDGgpXeeb0aJdYrYoL9DW7zZJFLX0qWGlvohNW\nja/WUOB5wi97iYWxH8ECU/dDkfb4sePq9XpA1LWl55ga0YrvPJ3XTP3KDCri\nKa+j\r\n=is5F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGq18cbUj8mAhOhd2hBBWEbQON1a+bBALjJDTpshTcFxAiA6Eu6rm9zlGGGFRYZ4DyH3S0/5vwTDC6WdAuQni7hdVA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.b9baf6db.0_1591388561296_0.5230406094835334"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.e0b8c9d0.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.e0b8c9d0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.e0b8c9d0.0","@material/mwc-textfield":"0.16.0-canary.e0b8c9d0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8067f7c0024a048e98d327efa458b70ed21da6e5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8067f7c0024a048e98d327efa458b70ed21da6e5/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.e0b8c9d0.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-me+Y4Wn8nbsY4mLAGzZsIiFaMGq6dC/1ey/Iekv4cJUNa4OTvCni6qQTWcEaW0ctDphGhgAVQpXICBSVSyurWg==","shasum":"20fc8276c5fb703d323528935a94503ba3fbfe88","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.e0b8c9d0.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2s+oCRA9TVsSAnZWagAAZb4P/0YCj7c3HwgYIao36fp+\nwoW7Vvu0A9Ip+vPd6xQDsDrfvYaVhezbVmzDGtdMx0E5QXR+FznAO8Lm6NQc\nBa7Bzgezyugqx6MqmsFSP86EJplQ5phX2gKXdOhD+E62TuaWYe8PglZt/j4o\nKeBu3BDBhyJVAbn7+CCiQPKugjeH/AYVeTW0Ky5xCJy0e2T+YcUp0QRhCKAf\nCv4t7ZEvfJTtrgxzumuo4uAPB5LKPDexBjusBBBS3WStAho3xOU4kBRx5DuX\nGJHgWOosGXMzrDuhJ2puvesB3oop8Yq2diC7gqa5zsA51kShF2JUfYq+x1dG\nEcdoHRi5irKkySl64M8Eej7r7V8FMVMo0bsmfoM/457TRI5W11VBpQfJIumV\nH6zv0ebReHKqWVG4Il/R5sJONqhu6xvtk0iqENQX9NnacTeJe3TCvNC4RHvo\n0XrsW4fFwnT8v0lGi1Gy2N2M0cziqrNm26c7gW85ZkG3PabvrM52abG2azxu\ndxTZQexzN8vQh9tXqBVTF0xYmFV/an36zQYQkqKThmkNlBkZbXewm+Irr2HH\nWjnfAXbuvl6OhpItSMXniv/w5Zoz3Jp40oESyax/5LgnozAoyN3WbfGjWGDo\n71Ed+DaBcd6HKYwG4LDkwhEZ4AN0jmaGbFNj8mE1t51piAoGQByOGlmWqFMq\nPPL0\r\n=V1UQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTe74GHe+fbaJZ1slLEcRYIWlDZNBb15s7qsRR4tUeXQIgc86YfajJ6JY2QVQSQLy4lBkfQXbEGgayEWS3P7UBbW0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.e0b8c9d0.0_1591398311036_0.13904270043153155"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.51552859.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.51552859.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.51552859.0","@material/mwc-textfield":"0.16.0-canary.51552859.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"be62282108625892e385a5b64edabb5c9949ca75","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be62282108625892e385a5b64edabb5c9949ca75/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.51552859.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-nrkQ/LT0Hy5/KpuWL2kY7fD4TJRvXqnkUyFqCcWVgI7qEIbC7cbv4MoKmKmJ7MDjojDr+fFX2tA4u9Nkqx4eTw==","shasum":"feb4b724e2215ce3112d2180ca29af88a9e20b74","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.51552859.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4CR3CRA9TVsSAnZWagAAnFAQAIBABbdozCl11G+2ROSM\nUZEAgF88UBtksvHaT7XI5twjdMvXG2KS7s6+3Kd4UDmYOdIE7cAc5auXXhLw\n7RaUvg+m7/tuzhuPLMd5eaSjki/kVKMjq+G+XQUIWby5tXeo7OfrVRS9e0je\naFfftXD9Zog2ia6PmF2zPwMrCLYtuVRRPgWrVHieu4BZv6x7kmM13Cr3705h\nCGdXPec24O/MMQpDcbhU53CbmQ/+0aMCScq+J7q71e2YU4OamrzEYjeUtW+4\nge7FbLbIyvEo5in0KMhabyhRXcGjE6tdqbAuK1F578J4R9nWDuQDCpenS/uf\nAfKc3orFcXOQlJlW3PgxLeVOf1d5qDfD3mQiQXGFZJFimfz/xUJxgtvcFJHg\nPBNJBKQWFYNxKb0Leo967jL8ZdMASoubRP3zBDq127wYSgSiQpBh96KBykXA\nBYfLOcMTCVNtVTKwe6hN54k9F0EJb6wj5xRsObttb2Gmk0k4xPA94Ku+ZxDc\ns0xyo+nTuxvdopxNpYxyjkCX23yYO95NbUZdwriKEVa3JvdUKuwn+39XGkr2\n6ZthMSflUgT27cLmwqD543X30dQlPY9W2enkHYw3d48rIr5qHsXDHut2Tl0u\n+yqwKNpAmy3jRSxiJauZKVgZpuG7t4Ytb850kC7gN4E5Wx9XAhht6fVDhPf9\n605+\r\n=8JXy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYVDvCq9V0Q+/7ZwXZjA9PjK96tv97vrhFGy0JGaJbVAIgObcnMvaZ+PXpkmdAi8Iu1faEXFcHOseLHWbLz05Qw/I="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.51552859.0_1591747702647_0.43387350120271284"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.2e269285.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.2e269285.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.2e269285.0","@material/mwc-textfield":"0.16.0-canary.2e269285.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"de64737d606dbb8ab6368d8fa30690e62fa24cb0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de64737d606dbb8ab6368d8fa30690e62fa24cb0/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.2e269285.0","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-KbjH22TBQrU42mDJIVbVErgZujfRUzvOM2+1pHC59R8NOilZZHJtNf5t1LkfoYQ2apNgG+W1hQzt93uNCU1zvA==","shasum":"c0fe534e95ff6658e06312a4367b1af1f2debc15","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.2e269285.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4Dj+CRA9TVsSAnZWagAAYNwP/i+jCWWbM4vTs2pXSIbz\nZjuHASN/Q85KZZ+4RBMZ7t7C/a1D8WADRGh3HDMc5TqlN6b3E3ljJdxPgaez\ni6T1gyduCn8crhKwcPI83N00bOYfRMqLVqb7MUuPXjlcJETaxfhsuTkqca08\nlKrNVyXpddfNH/0/mZtDZMRDjuAwZiI5Gw6sBVY1GYfD4pZaysAVUmm+9MB8\n2YA4oAfVROAl15X6h4xmItOrfqsFxEF8N06ZgoN5FVOtRfXo+mwsFP5/Tyfc\nOqjPK+L14Adof/zjS1CabLlm6jhHkUnfm7KTH3KByXeTP0QBUfcpeID6KOTb\ngt8YJD7Wra7YQZmlRrtrmjdPf0R8d7BkyyDfJTVXl3kNAmOu5GhQh86IeoYc\nc5rZuYKxmPSB4KVKFO+JyM+cV3ZRBJF5vGhatAit/7RJ84AyPSptutzL6agJ\nmYThDS3zEmDOPMJ8gEmvl122WNuA0eq4edmwSsYFjZRa2+Nba+r9lmVJc3BI\nFBcvnEsgv2DeeyANz35ZYhsqSIKT7bn7BSqHvY3vwacLUBtkQ51SKf3wbtX5\n0qqzjS2unBWLuXWdsINYrNWyGc5pKE1vQqXTOyHtlMBGITvD9+tmfGQqXgCq\nZT7vuBtgcgtrkbkydhjM+a/rl/T0F5Qo7x/F3cOldRwt12TMx1jOms8BYD7E\nZtVO\r\n=x4b1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+0ZZLvLSeKEE8HIy4wm9Vy8904/5DMM6sMMeHJNGoQAiEAi+Z7t66fncCiXPadgWXSbFD1PtqcIn1k7FnQFLwtvN0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.2e269285.0_1591752957593_0.9203395517634907"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.be138b01.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.be138b01.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.be138b01.0","@material/mwc-textfield":"0.16.0-canary.be138b01.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"cd3bec5fb787616d9ec3c5e011ed8224add04ad2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3bec5fb787616d9ec3c5e011ed8224add04ad2/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.be138b01.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-6jdu3BV7IjCWJMsnbISNXIKf5Pmb0ZU8Wv1mPMIqu8yP7UX6/xYVZMLAUsnG+ity8UAYFUyh1dCXcz6cNSi7qQ==","shasum":"54b6c8916d4ca988fc0b646d5a97b21feba98393","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.be138b01.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4UdRCRA9TVsSAnZWagAAqjoP/j5pFW//yXNNHhwv2lU4\n8d5UpXVt+4NxHhQOEvtB7m6PaMJyHLOn2rk0jVbAIS9Y7LlIe4hp3HolCCiL\nWCwtjwCthybF4OD/out70FMKDPOPRG63Dta7O4QPR7oa57CSb4+0seujiU5m\nGmTCU7yOjONjrT0j6W9WJiTjLJRfr/AnihTc5yKX+XksTrpBDe260PJZH+6j\nb/i9k/lUCMfV7+p1QDKZCWIo21AWD5kq7inSJX0SQbUljh3H3zAuT1JQ3i2+\nKRBPL5K7wFSCaI0ngrnBM3R63U7SGibbraPlB0srgBwFNn+B4jvBKiGo46os\nO+icvSW5clTwuIxAlWFmMdiRHoq72nv1uUumIhXkjC1GlH3C4WZ1vhmxiyVK\nQVjflq/6XDQj0rkOmeOniKcclI/c9nt3lP/UGJ+tLVwI8shPqhe8GJu51gpG\nCdjwNDF05jaaUKB+Z6ffXp3AyFaJaEktfB5QbB5jC2OxAY0PydJyBG/GERqu\n7Pf7pguz0JdNz1fdiWhL81/PWtpLTYLhnm14TPEKGknyOdgQ6YgQaSTVGX8G\nSIoiXvHWJClnCND2Z384R+Fbn67dsxbaZd7CBHkOpd+nn/Jfa+fe/QrghG3w\nk2P270AbRbEIoieuuWwevdX2yaVpM1V8a8EtFodE5129pfuEhX6eREzi9CjB\n6Sww\r\n=mOya\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTcR+4Cpv4exhsIF3X/wK6i/r/guFvDc6pkhN0bTSVDAiAgaGRQKZacq3PjZ6gFkFhDMV1XSYDBU+aevg5F6RrxkQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.be138b01.0_1591822160864_0.6365801315836075"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.04bccf5a.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.04bccf5a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.04bccf5a.0","@material/mwc-textfield":"0.16.0-canary.04bccf5a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c077c9c7d3e6ab509f750f7ecab7ee8a858e7d22/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.04bccf5a.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-UqC1jhpS7deA4Ee2dX4yexPgkBQKq0kAwyMVynb5g/2LLlGeEOok3+glhYvGJgxmFTaVd/PZDiqsoqwHQPpe4Q==","shasum":"6bfce83b5fb6d8d1a7c842d72f963226e695c1b5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.04bccf5a.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6BlhCRA9TVsSAnZWagAAOF4QAIWcxoN39UsWi6CLE2mH\nEiHB6AImF2plkLaB+Gx2mN05sIBfSWPAo8ZDnrNImvy+QWT3ULFAQF6/fUFN\nK4XeH1PxTjk54XLeHtHRMO+1WkEvRh5AE1mQz/DJdNNcBYu75nr2zYXbeYx6\nkOSsSt4x3Tin/gxQEmuPsVDnBfgOssqTaODP4VpFqtGMXvfEM7D1mUXAH8LA\ngxVY8s7kimaPjSgk8FNZxoOZ8KE6a10WEYPJChN2/Sb3IUiPiGPq0qaYxbrx\nOHQg5IKXOgMg2jtKCilLGt6CGV6hEPr/W8A56pG5CYPwKuO99PLH6b0nBWaQ\n/AJayMfexDo7N0ANAXFVoF+U4thEnHTSBhgSQtoAztAibWSTmW1QqfbZXh0v\ndPYLxH45RAstQ4I61BXRm8cLHnsdftyji32eQbHlbr5Nr+TD0vMoIzDhP5qb\nyoUkBhVY3CdBkKvPSeaW4ode/Yu0xmz+qt7Fte1MOjKVkaVm0iA7xn8stIcc\nEIzDM7qbMwPZm95OBCIxY63kVbllWEvpNxwvGEu2IQzq4R2ztwl0IO+4Hb9B\np5Mih8xvVbxQ3cs+o8zMNh/Y4l+a+cnTNDRIN0cc1J3GURLIfl7fvPjTpCj6\npQehptbnJz4Sj2l9E7KoGl4jbT88uqx272nD4zMfIzLl6AhxpXWZrmHlFzUn\nvcez\r\n=oTcX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjpgABlgrN95JJVsp6pTrED4wSDlPPd8I80HFtNtoQugIgT6HJAdWwHxbZOS3jWv1Rc0ApfFeYHTAuQlzGA1O91AY="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.04bccf5a.0_1592269153177_0.515348748396321"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.b44dea36.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.b44dea36.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.b44dea36.0","@material/mwc-textfield":"0.16.0-canary.b44dea36.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c3acae783f88caaa2b0db088b82e7b98ef4ecd95","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3acae783f88caaa2b0db088b82e7b98ef4ecd95/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.b44dea36.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-/i6ULShB3NmJvesRnUL1CHbRr2N3louro0hmOG0d6UgxQ2siSxOs7m3vXqu50XyIplewmXd7kHPV4M/h4wombQ==","shasum":"fd834ae28ae5ff6c32610022e00945ec58f16bf7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.b44dea36.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6TJcCRA9TVsSAnZWagAAWjIP+wWBoZRWfxZ2a0YLljRE\nKfoQlNAkMMU3MHL4PdeUiFkMuStqFgvmfYrn/rMIWbf2YdbhUk/RcRiJZVO6\nLiHDqfbT7scTrbIKzHs8+1oyn+trQGohr8b1AYlBhRqfCn6Waytw+h9yJxVS\nbnTOedh6tzWdy+YHAVhUaF/KD17ZoTdmk/v/tFJcCjOKvJosPZZvGs7jpbRR\n8ZatW93RzwzO8SSXcYqCtgPwzOI6gW8VgMRyl+nKgj754vxKpAgae55CFbYJ\nckF1n0OpThWU/jzyU/9ifH5KU/3KAwlzsn6DXMDT6nOKLPkT3+ojw/ayGDXI\n/0cp/Ov0iPxLlYoLyCW5s1mFwi/jwFUzXfvsaRC1+JBoiQMQTdsVmWJWwmk3\n6aQ7ZsX7g2p0s8DxP3EdsbODT/iwSaArcgk40rJbM+DKnRYYx6d0OXC2mQpZ\npU75QDQuGRCEQ+KRgJevfORN2poYMrF6F5ypNnlVwjlqJ9UhPk2BwMSmhvnr\nhoN2xL+M8d5slbMShej1jOxy//A0SH1xo3jMZ2s54qw56vN8IVRgoRUABmmw\narmm1Y4svWpZ1L3800qSL8N/+/2NDPGHwivcDFAeQNHs1uGjyVKLrx+WnONB\nF1h3YlVpgt2VMtsn/OA5GmMIb5zFW7aD09lCUTUxxEk8u+GGqVylgPc53a/I\n4HuQ\r\n=6OsQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqJmppPZiDOsWOzlPZz2dS5VlJcJ3IvVoRqGybI37fGQIhAMVDwA6jZP6YaQRcVF7EAe48AQSr3fnk3Oufl6HjsTa9"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.b44dea36.0_1592341084145_0.38751125571818856"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.e2577e87.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.e2577e87.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.e2577e87.0","@material/mwc-textfield":"0.16.0-canary.e2577e87.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cddb26ad140f9a5ae7e41d4f66258da9ffadc5f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.e2577e87.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-bao6rDCfyAsw4Cpuoo6HvTcHIwEynIq/taiisWJfdNMFmrL1ouGbIkqVGqnvoUO5+nZyhOOpWj1EodSBOsgmfw==","shasum":"0d6a76bd0d4b8928923ef589928372a95d5e83b5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.e2577e87.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6TTpCRA9TVsSAnZWagAAT/wP/0KeYflGIlDdzb8HUJFb\nsDVJ0I586aCGWjcTma20ROrE8bBa3glue1fgru67k0xIopnsjHr1cPmIFq22\njHnOxi4wFePXbHVogyASrfCVyVHUCKE1a76vSxrKOjaG9efpCjrwAKRaKk9J\nCHINTxTBcVP32shgaTUXDi1waYZBm0Ej3bexO2wXTYRDOxN4HzN4q9zxFkzt\nxhdpXARkunzu3sZeYVQR96bOBM+sRCNDWj1axGm1LFc1GKqge+JJER2uBT8y\nvJcXcaQswyIe42JelXnWBnQRJSPKO/hrwr/awdfIOF38U1MjXK+OlxqsiFJw\nWSG+GZRtf9RglXlroo7Vm9+emA1ga7wRnw41B0psjiXkgk95cXVM52DVe+VG\n4GWRZWVZV7fm5JrsEpueGrab2iq2QgPwCJNS4zcjpRk4BS14FLoBuAcgW/9Y\nywXZObn7jLFXnv2Cn0G16FtTfTDJcgwMrY3WCPiR6ccnjkl/T6H5ctQtIgai\n+2Le8p8nAORDJUKjDfu5EuYfagYUc2iBDw5CjmXHI9puSn/bcyFtBrq4hfpG\nr5mal8mg0EE8fjGJxSlmCvgLOUfpLTZBwoMlCQTSPGetvNPzRrYNgXtpbpog\na3RCEMJqc/4Bb++gK/kLiTq70oX+OmICE8ZSUQQYCUzmTq976XvlAPeeViC3\nj1Fy\r\n=uTmX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE0NZD7yoAaU9TQc4IWLFIUtpN+YxKCt17AxVWI7sAowIhAIwJygpxgEfn3Ihj1hOgmI/xkih4IM61PWNbqF4xZcYj"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.e2577e87.0_1592341737060_0.7171327226377942"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.58b73343.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.58b73343.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.58b73343.0","@material/mwc-textfield":"0.16.0-canary.58b73343.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ba9eb85b43f514dcacb8e7517e4b8728a3629bef","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba9eb85b43f514dcacb8e7517e4b8728a3629bef/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.58b73343.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-lfPmwTPhyKHz3zPTAxdXajNNr9ZoGif1aY0ExFuLcIMa7630HbADZOMbDijYCaJONmZJNKmzM6uwrtEzgvwqsg==","shasum":"d034b45d7199ddd4e9d6327a34d33ce881d23ed4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.58b73343.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6ThtCRA9TVsSAnZWagAACYsP/R+J8xKF6GrLQUfNjbzR\nCik3ZZN7Z8ZyMZQR1mbR3fxUiC+SUl6RQlBsSjqdnBc1h75a0y5CyjbtxDLc\nE8B4e2KTrsfmQB11uh+8e+HY6KhHZe9E1dKLq+4mb450Ok7Fcygfd0Zyk/+M\nFj0Tf6rcvcJgXns5Z2t7GyMdCTlCtj/epnwI1V5o2VpNMG6/b0UWKYdwJ6rk\npT1H5JbXQAQYQ7bPb/6VAE3s48agYKPcc2pUioWycYKKtKbyPjxxXJ3oDi/Y\nu01I/EArcftEAuYaJ53is9XqNYMgZXqVBSJw4eMwZ7frUR83l/NG1pkSkEX3\n6wGX/Rjm1/Tpkzf8/yI/25MmSZL8TGIbUla5XkWRmkVuXID6Bk2sVbqWVYyx\nBimsUe8Fp2UlfIniwT0ZE3JUOgG6FSct74gTmVkXPyarNq5Vhq5dqxyeCdDc\nAWWs62JuI/06mXaum8On+ppicYVUPq+Z8pSmIBK9hXw9aY+SANakzVT2fMnI\nklICUOKLLvZq96T58h+ruqdpbwl3RxzDkcr2iR9o6gOkSudRmh9FaR/cF6TG\nCWx+nPoND0EujRPLmpBZ0r6jgKGmU2zPPjA+Zf+dim4csPRo3W4Mub9948oC\nTBJw+n2LGPPdm1dL1wl6OgXDx8wp9RLxPf2xFRAJuuKgGhqczn9DRYs6RbOm\nBC2S\r\n=Meof\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+nc2SzV6gK4OI9wDefDpLGwv7yhVK/xvCgBhJTnutKAiBiW1k+k5emeMyXVPUjzH/pjYFlVx3M+qZEPlMqZ58o3Q=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.58b73343.0_1592342636982_0.8826493907127777"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.f155c058.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.f155c058.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.f155c058.0","@material/mwc-textfield":"0.16.0-canary.f155c058.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"bfa2e71d76745185343aad4d0a9a2b6c3b134563","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bfa2e71d76745185343aad4d0a9a2b6c3b134563/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.f155c058.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-cENfSCa4IyZgtx4S12dwE7Y9tCZOHsaCfCzTxymzfukRxdmj9qiUfh9rSrwOV3OlKlqdBi9f3I55D+8s89meaA==","shasum":"e097e31669a4178caea9451761b4f6a1aa3f4a75","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.f155c058.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe662GCRA9TVsSAnZWagAAC9UP/jkTikVbafETWqN8cTHX\nsJzOUpwrl7QsXmlX8QrP1ZkV6bBOdQcz3sZv6ttOoOxsIKqae+S9eMGs71GJ\nPnWgXfMRrfE0VJs8/pFn9QyyX6GIGoaplIA+k/atjucuwLwiYHL0I55EWJW6\nOjCttpklnUoIrsfnqAfgRzlJX9uSqDC7P9qlpl+56/quVDyxk6m6D8nuS8Yc\nHh5iq4RxNXnXu1Y8H8w3NDG2DQUZ5uQYylfhLquX/7fpTHyx85ua8QxgIqDM\nfkNo1J1K9PFUa49vxCYb8kJOX7/d4IZTYVNGni6DGTgz+S7nSg/KvljZqh9Y\n8MBiCgHJ7H3XlZm+Cs+88qAXBn+umKQFmYHB4ZQYBbNLHN/7C6aGB9bypqri\nZrieGDVYE0eueXyRYlqO4rkgACwJ5zSkkQPVG8r4qz8oa/QPWP7KiWlI7kzc\nZSRJ52vsKgDD0qpwUJRnrHyYKv+R6Mt94gUu1aYjHw2rcg1kSAHJqLmBwdxl\nNHvDgWv70sOLQ5r5SP3zlB1P8XlMoDHbAbQF+qi6DwL5WrLIfDr2l7QOppEA\nXeUZAgG2zawVpIfBNy7D7uM1gPCgTKxzXVrQMK/+3ThPLy+nmT/FNG/G/XVx\nUWtSzJmhEuA/RLLOeP0wR99ygL9WX1OATEznCBPJx61pzl6z/UbVhZkkXV1k\nf2QY\r\n=o4TJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6qOLZPpn5fHVOzRtrvj6ZNkvEl24Bsb0Yvp9FgLifFAiEAu7UhWYBs6d1dG8CObYhEmKgtEA9c5exUglSLTHlXpbg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.f155c058.0_1592503686589_0.5210426899948915"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.309779d2.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.309779d2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.309779d2.0","@material/mwc-textfield":"0.16.0-canary.309779d2.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5227f0923971be3709c93d0a8ec0d85564fb31fb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5227f0923971be3709c93d0a8ec0d85564fb31fb/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.309779d2.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-IdreBKYbTUBIp4WfFA0ry6FWPA089rG84vIqSYvbz00crW8bF4u+JvgnoNgb2LKCUloxgk7gLjmYqooJqxWodA==","shasum":"0143bed796e1e6f3e45ff88b2ef3dd59decf4218","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.309779d2.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6/++CRA9TVsSAnZWagAA62IP/3HtG77uJvXoxkknOaDW\n3YSxWhPuJchHI0Y3A2x5u3ciXBeGKFtGhYq/Xsu4qn50Mcd3j5lThlwKDcIi\nI4BPZCqw6GYshyS6cvwRhldmeonUh2e/iH0lCuh+OX9DFnbl+vmvXVvXF/86\nAGgrBVVnaSkCAEqN+BBR3BKoslSZg5g7iaeETZJTfyagNG8v8nvejEcLTP8Q\nPKYtyyhHCZ2dItFZJIssF3HfdCeA3ya5jJgB4n2S9uGDrQWRLgn3WhuPlEoH\nOoYF1fDl5OP3fu+9RkEDbdVguPlVHUgtC82FN5MkyqHa0Pssg4O+2OXfdFdY\ntEYVkEwWwW0Gj9Lz/hTBlSWLclQDOXb7h41XHAMWwxdBAbxs6inSKK5TAtw7\nWoHDGdfQQ1dOgV+KQL13mMx5iw/8aAbzCgkiZ0JSfGPai2nopQj2Btvcvclx\n7rDByOS9kZiNCgHQPiJYEoLj4BaaFbXPh9SAkW9pxU2m5QyKei5bfoZDc8Tf\nIJmNMz4WuErIkjwiKadL6yLL9AbBlFJxYHv+SvzgPdce9VHu5iqvCbOduFOW\naiHXTXuglyviEI3loXlVIJNKJ4HFPSWORd31rorTsUe56/hYFqOlHPSIscDr\nfSiKKqxgQjuCRW3QbgirYqKdqbQhozEGamd8IAkKAhDzb1LFTa6GJxhxxSAJ\nQGn2\r\n=1C5H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXtipa9B4pgroZYr14C/QaAu3pCxptspeI5aRVVeEJpAiAuzSfNAYqbNmqbozmYLGxf1UBwfCYJlIBHUshMSihcQw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.309779d2.0_1592524734323_0.6014560947205441"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.e7649968.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.e7649968.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.e7649968.0","@material/mwc-textfield":"0.16.0-canary.e7649968.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"33e44f7015ad267b659c9bf1d34799ab8d508993","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33e44f7015ad267b659c9bf1d34799ab8d508993/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.e7649968.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-pYxoPg+pUwoX580/4yBC4tzRKFiDas9V7BU/YHXtJod+u+/pGe2Nz4FCnpSCHJKCKSJTzQlKzQtti4XUs7Itkw==","shasum":"a85b2248215aa4c6d9462fd8a13d94ee9b92d45f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.e7649968.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7TDsCRA9TVsSAnZWagAATqcP/ilX2FplTfhO3bTOH8gb\nWD9lWsoAyLnf1fL9DcCybE6ut2hEV6GVTO+WOuqB4o3tdN7W8MW0aHv9JwSI\nzMZRe0Y3vzqZwhvRHAjztCS1/qAJ7eHKlzG1En005dZ4p5nZOXnVhR9Tn2qc\niquFjgupSZQNzLm1AiLoz53D7mUCkb91o291LGqhf8SAm0UlaMx4TMl26UiC\nxNAkhy5deBBHQOSLj7V/vwmSJaJedY8n5pK15w4tvqo9eDF50USeKtXvvqGQ\nlF+q9xu7fO0YN8U5b6FohVUWfEPsz6uzKhsPsi9eiZQUzNWkFwlDxRqtapyO\noDTOHoca9PIiTfqJG/JLlWnCfikmWZaw0iUsZ7p0CmLyxhvwat0P2YU966cL\n1tqoMZMUzLdgcAVSrXQU+9vUzPWzSrPclpjceH8gDNFXpBB15XeZFPJpga0o\ny7TqOLZYyIT98zCeeLHVyXynEM3ccF+OZ/AVaSbs+VLxFuRdWYR3n/XXJjj0\nuJMvp7IsOFxqxtcAeGLJcPYxrADvWRs9veRRjVPPZRqSb4eu86Ei7qIYaEay\n/VbihVwQiJx5a9RET1IVbk2iRpp8mWYJF9H408521U09jdTW0sgff59hhfpj\nZv4dZayPhMuVF2OOMhM2wkzkNqsxgkSyQbQti/p2V6nThIkCrUPWVWOcRA+D\n6U3a\r\n=qJ/i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRnZIHISwwnNZAM0X8hAF7cmjHYx5MO16S/T+xg46qQgIgdeydCMigBXxfHoc4dy6YTlczYvBpCSr6LhViX8BgU1c="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.e7649968.0_1592602860311_0.7221540360013001"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.8e21c78b.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.8e21c78b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.8e21c78b.0","@material/mwc-textfield":"0.16.0-canary.8e21c78b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"87567a000d0fe9c1fe6f2b37030908bdda7f3290","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87567a000d0fe9c1fe6f2b37030908bdda7f3290/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.8e21c78b.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-oc+mwZrWDV3zcw2EY2viLY5ctZeyLkxUSZO1hajjU+V/kUK6kKvmw+FJ9wtCNz/2L+7hFB8vFxwcjCc4q/yVIg==","shasum":"1d53801432657ca6bad868f3786a97aaad6f4e8b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.8e21c78b.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8IoGCRA9TVsSAnZWagAAAswP/3Zmw/0IEQHFdwye338i\n1ZUR4FpRCMpLgHBOM/yD4RdqFTTKMRSM93wSITWY+fYUzHxj/d8Zr9d/3W8B\nG+ocTfNbRTdXkoWuGGxLtCZorKj4Gqr1/RTaIhWz3fBDGzQqjubWmXDuZABr\n5mIyLUcYs7echM3XXNm3dgxep5F/hohKylFyP+bAGepls3qu4b4d+tMXNIgL\nTJiyPb0gD4bsBzqH3h+CVRdjc4wMn1oq97B2lCDITj74Z8YnAQMPvQSWjOj3\ndeOvK2Zts3NnGw/h/eM4sSg1XFOLS0SPe67QeXCYfZIl9Pr1XDSk3b3rLbqh\nOeq+51WKyF+cnd6SawISPdoholke7MKaDGajXijefYT+uWNc3pZc406OkQnJ\ny1s+hro8nxUqDFczkHlWrzbr9TznSCHRpUn9XRHaS0+CygZ7iM3h7nEVKUAm\niSd6Nog3QE7glpLFnDXlNjycp921pCNwSdGH+l50uWdgrgwWXQKgfh5hAV66\nzhE0VgRlcROcoS/bw2fsLPoxN4nNCRQ4YVmMnOFQ5bs4WtaETznag2AQ5aMq\nlxHv0/mGB2RzoqJSMsdRUfu19Hgm4fEwS/1KULTJfZ93kkWW/V5/615OGUVH\nHxz5Mv4MgCRUbUv+rkB1G0dOVbBoxyzIs9M91gVRnqFwra5VWnYTW2rh4cTg\n93Do\r\n=lZEK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/bKXr2gb1lPoC1daZDOmRUvVY8zNdARDE41Q5blH+dAiAZrpWwnDcjsw055XD+FL+W8kRU+NCKi1sGG7SOs7vNfA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.8e21c78b.0_1592822278078_0.11582334356287771"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.6db76faf.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.6db76faf.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.6db76faf.0","@material/mwc-textfield":"0.16.0-canary.6db76faf.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6e23f797a12e3585f2e2fc7bf0311266b8908e40","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e23f797a12e3585f2e2fc7bf0311266b8908e40/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.6db76faf.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-asTHAvPi0OeO6VBeFVeHBrY0nRCZD1AErpaumo93UoGXsG9ML61khuQTrNtA2t53uY/JLzHuqiSOg3HtkTEOQA==","shasum":"9127827e24465c640504c3c6bfdb88f08cb87121","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.6db76faf.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8R7lCRA9TVsSAnZWagAAYDYP/AmfFjflLqTQqhCh3KQi\nYqKaP7kp/AiSj8ISARmIewUPrC1SxVv67KdvMRT4Dd5BC7sGAICPQuiy6Hki\nRUvxGaCKwLOvchKB6sk2OzYkuHpRgjNRFGsmzmFbHgWvA+LdWlZraK+Vr77h\nUkU/7M+K2LbvGb2FoB8Z+xq1ALLtuLfO4nMhMw+fQue1pWSV4yYS3MOyiC2/\nkn9zaEzFX0loSKCvKbU4JT8FJ1iDG676lfxCRF/um6toqsPi4WEE19OV6HDf\nOpr7qaF/BrrA9h0SxrhXWpxr9vRUShQVhXtvoJ0roR3/1NlkkmfDrmnb4KsL\nDufSxGllccGJD6n4zeriMCaTLRNewWyqXsZyj2L1ckE8ekL5i1rZ/4jpeKA3\noATDY+ZpZHy5Kmgu9S0Hrs+SH9ipJYL3AGz2fjHIx2wxuakJ69svEyZ0MCjD\n3qrTEo7V7T+nD1jKy7ZL+I2XvM+W2PEFTErkEzUaD4elzRltugwLHoHZg1Gx\n5goHNvU+L+e5y3lGGpv76FESumuD8FmZCjVcEwhsLzAbpH+7LGnfC90Wm8hW\no35qWEyTN/KPlEklDbvBUl4eMaWKTF+2WNBP7I14iizVmX71qxrHrJHHPL8T\npCaHq9FBMIzIBifP9vZum4U17XXaiPatYyogvd7yhQqpwKGdT0ZJHKe+aAuL\n1V4+\r\n=Nwde\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHe9Z7f7kF2826l21M/d+lTplMpTvN8Sg4jF9SDwa+yuAiBNgiZigQlCW9IRQ4mmrWfTVvJlhFRxFuW0WD5KNMNy5g=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.6db76faf.0_1592860388777_0.06031135480215899"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.c4dd9684.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.c4dd9684.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.c4dd9684.0","@material/mwc-textfield":"0.16.0-canary.c4dd9684.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4cd7dd845f6929aeb590a441e62cfb720106f05f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4cd7dd845f6929aeb590a441e62cfb720106f05f/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.c4dd9684.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-b8SLZuWdyWY0SAwCG2I7ezo3s6mWDU1U7sEgwEeqEc1i7G1mG5QcMqi5sRZr/Q/+B9bQIPvS2gq8Ynsj6oADzQ==","shasum":"89cf6770733b9afe0a5356e9a20d8728b5dc8c6b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.c4dd9684.0.tgz","fileCount":16,"unpackedSize":182965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8hyGCRA9TVsSAnZWagAAcYgP/jU/t4TG24a8nxRarD7U\njBACZrGv8J/LxB6Z+vzqMQoZ3SenbO3dsWBSqP+eVnwfl2orUF7EWG7gIA9x\n9eUhOAW2Dq0bq19uTdNqk3HJmS3PJtRWddHNu2Q4NdCjDhGUlQLB3MaWwGwB\n0wEad8s7e2+k72ILgbE6mLnyblanSPR1UFy8Vp/F4oRZjmR8AFBuipbUDOE/\nN6h+SFJIDru2x9LUSDvo9PnEgputtecImR2XeY4Iba3iomZwQWJwpVhkR2i0\n7oWDByL6z9x25ghIDEd7NSHysjwU3kXQBUaI75qkzd3eTlLpN9pMB33NYl+Q\n6VtniCPYk8KSyadXTlJj+XAFSXoyjbWQiyxlpK8r5+N8b8LFClUB37HVeImX\nvlieEaf0TnyXHvRKc4QBc3C7RwvYKL6hLYWqr+KTvH/VDMJ4o/odSPNT/RJV\nKxq6PSh5MRKC18MH1smqrURk2Qe50zK3JKPmVSBm+FVpF+mT72a1Q58XDJXD\nTUCZKe7n8kq6e6eQi+BCSxhRR4Ajvd0v1uoJzVResA7qdinQ/M3FKux7y1GI\nZOGENv51APO0Ws+B3vlTgwx7E9TNukqJmXFsmrgSbUsJvoWOaX27rMj9BJM/\n4HKaNepgRwsrXZWyS8rGhz3Oo0ctEJF59hiot8beCj+RwIY1XdNDVpD1KVqa\nuSEW\r\n=lyok\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLpDoto69Bp1ezQw8WrWzaGYWpj4rXn4f9mz33uE4+mwIgfGdzd0T2m8FN2bJv+877uTvXjNrkm79VQaTiDfvMr0E="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.c4dd9684.0_1592925318464_0.5184852288988981"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.b3e53981.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.b3e53981.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.b3e53981.0","@material/mwc-textfield":"0.16.0-canary.b3e53981.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8d83f2faa9e72fded29e88f843dec080efd318b5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d83f2faa9e72fded29e88f843dec080efd318b5/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.b3e53981.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-DT2zwi5nEsPNQdFSf4ta0/NAan3BioRzak84DE/7Wwk24Is8mNHzqdme0OvusWhDrI5SVDR7z4Kbi/KITRZDoQ==","shasum":"55899091ac85ca665f174c4354db2211ce25c8f0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.b3e53981.0.tgz","fileCount":16,"unpackedSize":182968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8qDFCRA9TVsSAnZWagAAVpAP/3npG/nN3wyNuqlhl5lb\nL1LOMdyiE5tUK0TNbBpUFbyO5A0r62E5gtyvaETwstBNGM8wEz4ao/4P/qnk\n5LOMRIY1feaKDdwiysDQZahkCkfh3ISInttDct6V+6ZwoyzGs+2irxYhD/6N\n3MDVrkXeIkGGwtgr8TYfy/eOVVv6EFBwpB+ydEE5tvmZard/36B0/KvHFqM1\n/W5cJR7Cr5II33d/X9954TXXFbtbpDVJDHpKYB64zfXUGXdB9oSmjy7tn+SO\n7KBJLFcmx0ttsORP/ReeXj28Woy32abIkptJdEPxY2E43ghZbrBxuYmf4cZh\ntw3ZSWlH8WZoPb+02lrMhcY2YJCf/oXf9Nnr79772VowUim4bM7i/JgU+1jD\nIOLNr8Dd/te1c66ug1ex1muPCsVBKArSyVdALeQfo3RcKwuPJf7A8PQyFvAb\nR7+hSde/DvkYDAU6pByxTaz57/wBHft22SNhLa+YD1dYjA8Hk4SYrdpnZU/F\nhQiOM8RVtPD1rAeOkJAyBMC/LD+ANC2DEo9agnnsFJuCKbh1fh1tkDLs4KpC\n3RfIxf1opPUuOuSYmCkT8JkZnQm2pmH02qE1aFIapcX2PDpnbvQ+KM60J2J8\nGdUlzlU2F073r4P0fJOivNrMg/wL/gLyFVqwIxfynqriwNU5pMTpawPhuO+X\nitTc\r\n=aMua\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrE7RZqPArYKFyVn2UL6Io5+NmU5NZkaolPVIy/NT5pQIgYjASeXZo9wNU0kbVazt/W0Om3BV/gYF0K4puJ8WC0rk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.b3e53981.0_1592959172878_0.5837836969268739"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.b9468f77.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.b9468f77.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.b9468f77.0","@material/mwc-textfield":"0.16.0-canary.b9468f77.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"89bea892912be98e07d72fec0e142b11d1874487","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89bea892912be98e07d72fec0e142b11d1874487/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.b9468f77.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-cXhXinXRx6AdXaFTyjePlJPVw8em22Vte7BmpfC0VGI8OEisI61J9Tnc3GBpQA6qRuKpYCbtOVo3C9IWvlgGUg==","shasum":"ca20eb26c9765921ef7fbd238bc83a9ad287a2d5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.b9468f77.0.tgz","fileCount":16,"unpackedSize":182968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe88ugCRA9TVsSAnZWagAA7lYP/2a8j6C4vaTRQ0QPTlEB\nd0x4T9XVrjMP4WuwbQPFp8hh7Me+64EMCANQ+2yyQLXGcDXlGCi72/7J2OLm\nq+UpLD5jbyT/ZcGXWUe96pp05IyKdMGSMkQXmLKsaUAZj/nRevd0rR2JMC2+\nTyx5HlGy47hz0SAt0BJ+ry/qbpK4WvQk9oXP9+wz19ymDJLFVpK9WMQfSyfY\nLu/ApBpMKIvqMmBORnUKw1SZge6fyS/SfismkRTn36B1AW0BWk51Ixj6Dq1/\nwpTRYRhyquNfkkbs9cVxuDaHipA4XIZ2e6zXgPN06zvKsmstWn46Kwd5BdBy\nI/QTBjqgeogStUi+Jn7p6ezD/Ipay4Ze0Igp8nyB50EvNWDiHPpNzRV50NBb\nsERp1T2r0u1U2yruoG1KhzQknLaUl1FaGbhncAAmDEWVUi1lCC2Fw73ZAPwi\nfjMN4LVRIgKAZ+5ykvdHfBLQeBmKGDAeSUO6N0dWPR20KbNBUUjxPb0LRZwD\n+sKuqAhzS85NA8G7PmFzPEGyqFwI1oXVd/wIk38sSQmi3drcMibd3AtNpG71\nhPTIP20TzaKvas1XTs8rsEqArhyJ9z0uHsm1bLJnt4m/2qELDU+vX8DNNbiY\nnXBVwpAe3U3jIB3WhH5XKsaRSwb87j0ZDhtiB6S0Er4D+Me5ChsfAIBUG3a4\n0VpE\r\n=1gNg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIwdSTZ0xGT3ZHJfvZ1xS0eojoj+MJ/OQeG6uSXpRRjgIhAP7PEUo+m044c2tuKETYrOoXsrxQoURGqnbeRGSdOh30"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.b9468f77.0_1593035679794_0.8026174130749073"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.eb790e49.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.eb790e49.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.eb790e49.0","@material/mwc-textfield":"0.16.0-canary.eb790e49.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"722b9fe701d60a27c2554032e63a2a7579ed4306","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/722b9fe701d60a27c2554032e63a2a7579ed4306/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.eb790e49.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-MV80Frhddk3UCMVPsViQPH7xdIpsDW28B8qdnjYAKZdVby6FwsD4O+pRcVFa9ZqOtiDDxKjaNIxBGLXHpxxQFA==","shasum":"6ff6d16984109ecda916618a26606b0e68b6149f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.eb790e49.0.tgz","fileCount":16,"unpackedSize":182968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9RTPCRA9TVsSAnZWagAABIEQAJBmOkCHG5HbivhHE1yD\nucW22fHPJ6fE2e9Xph7W5cW7pcajRDZ0yxY9oKlsJBpEVie2lglLwcQAF+lL\nEDxWhKugcDxnd7Y9CwPOm2cUpsxg+387MpCaYarJRdWfcGlybx9o6cA9TX5A\nsX2NbFIexIIZJAvNs/Px0eJqgJVQs4cxpuJb/KwBx48NSON/lwJMzBeMurSm\nkevUJl94AoEwb5aRmBcV93Jl29ATpimuv9txMAkEZV2M1Ytc16toEpxaPRJq\n63oz6329wD+w8Pc8L3VOBoZQ904zzEQJCOeHQ4gg0PhewADe9yrkZMLJPBkc\nffVEwllROId3MAtvqZm8lKx9DtwT1fmrU0zBhRqfmnOhhR+QXZFBeQEF8hW8\ns4JWJY/IVo61/MS6nbjcoWvv8b4PiAVgsLR3dk3UMeOMU1fFVa/h+BnyLk8c\nx+VCgkFbJQLjDauTS8V4cdfssF2WznAOPCvY/BHx8341MMykKqSe70MOplOi\nRRY0R0DziV6Lgb2HFyizjE2L9s/1HFxd7kjedT/zS9ElwOzWAtCDEq22GozB\naYgf9RzbTnK8Dd6W+N98b6bblilwLyQ0exrPAXGqmJvPgUfbHOjFlgnxx/XT\n0vTbpUU9VErH3JNghA0qNEUFL1dhTjuW5veKe8mzPmuRW1niV2XEeSATsH2I\nCCc3\r\n=kzFI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEv34Jh7VLBaqkaiQvVY3HEPTE0O+W2SxV2ShR21G4Z6AiEAgktGZKLO4snZE9SKb3sX18iQDYfbBpPSXYx7TXNx0JE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.eb790e49.0_1593119951265_0.9366649857500369"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.9aa1a5c5.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.9aa1a5c5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.9aa1a5c5.0","@material/mwc-textfield":"0.16.0-canary.9aa1a5c5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"04b200e2b2832855ef5eca7e2000672e53739c05","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n### Fullwidth\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04b200e2b2832855ef5eca7e2000672e53739c05/packages/textarea/images/fullwidth-outlined.png\" width=\"762px\">\n\n```html\n<!-- Note: Fullwidth does not support label; only placeholder -->\n<mwc-textarea outlined fullwidth placeholder=\"My Textarea\"></mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `fullwidth`         | `boolean`        | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.9aa1a5c5.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-A5mCBVgQcaDT5nhyFXTVX9JZHUQhjue1BUqBAwtmkqTrqJS/wK14boz5Wf2VbpbhD77z0aoLgxsoVHcpD3Y8jQ==","shasum":"ef186c838e58d390d8d4bedd46ae9dbbf39f7682","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.9aa1a5c5.0.tgz","fileCount":16,"unpackedSize":182968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9ircCRA9TVsSAnZWagAAfU0P/0y6YXC+K+GIj466YW7y\nxqvQYNkTnLrph6+NIJFxwlcxso0/DCUGtX960oPR7vNIaRWs6PfPIRKncEY0\n6y4cFUHQgYKEo8HpjprmA4Ew7BYfvprzq/vZ0ILGDYEOJAX7qKfX5LW897zw\nKCGP52xIw7pvGH74Y29Y/C0sOolmpwHPXJZqLcInwc8XFn8grv7yc6VxG5jo\nhW6QAn4F/eWjFZec+AsEDjGiFwlLindrqU9mIg6Q3ek8Qz1dBlqQMs1WM8eR\nLchmIa9tH9qRXLHAKfkL1vhMk9ODUdj9FyuySIVL32i0qIv8Ds/X275C42uz\nAI/ICaEouXHN+vNd4kHfIvxJxKoPRjdDI+ODRfixAsx+E7LBMFQ2gyO4WomV\nxc2/OQ2Muz/ycLIf2KQSWa53gqgxxOlpP7RDqdG3XjvMbE7C+BkHSodwkP7z\nsprIN1bd0XfVEwvTdTHqL6Z0D7mu6mJ0exZTK+znI4qPxBGUzwHU5XTF1Yr3\nNfA+paKxFOuW+Ti9j+RnniTB2rc0+XcEQFE8VCmKx8DCFQ+Odxr3zxcHQH9C\nI7ihINKRhyPKbTFNyMdMQwR3KGQF+Kjy1L14QLbIZWlBZpXU0yJI1sTC5lFS\nA1JTysksgk97D6XOTtwn7nEVJZ3CZiRmqqbQ3q+c9bIWOJQqNF/j5AvgQ89J\nFbwl\r\n=/RCY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgVh7PgNAwN+jAliK6OOmJKqU6smFZgcBhYz5UgDDHlgIgTRt3N6BEq2f1HQH7krMr5/AXQiE2MYGriaKiN3mkTfY="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.9aa1a5c5.0_1593191131964_0.10019726605048995"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.d36e9861.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.d36e9861.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.d36e9861.0","@material/mwc-textfield":"0.16.0-canary.d36e9861.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"06dd7e826645eff53f5923422d6024010828a4b8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06dd7e826645eff53f5923422d6024010828a4b8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.d36e9861.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-W7n/ViQllpH9lHoMafBwHPIAOxoKmQ2Y+ZoggnxfQJf5CQn0eerXkr82UeSvKnrAewT8I8LdU0lJA2UisFtswQ==","shasum":"ab436060fe0bc08e3b817730b233ce6a68daebb2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.d36e9861.0.tgz","fileCount":16,"unpackedSize":182157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9jIqCRA9TVsSAnZWagAA9cgP/AlOkzVQmOwzb9DrqWT0\nNtblQ5CW+t0uMlIt2K1RYTZmheKIFL8MJJrot6qbwI2xKUwBZ3JygQ+qnB+j\nuXnlDPNppIe/G3U2l5+6DgpXktB7JkL0w6YH70OpPJ+K9fmSW2MZHRI2Y7ip\n8K5HF2+qzLnu1kYJZvpJMbCPqdO/nSdFuPaTbV3i/aemurJuacnYCtikdjY8\nHVQFR6N6ngQQ380hcAoG7tqgVg1rf6QDnnQVqus93fNbhzPKzaq4huOzYCj1\nonRO/vpcDTXi+isz4kb/j7fA5sMKhH6om7wioRag4g+26Fl9QUNU3vYHeWrJ\nY+HrqrU9SMj334w8q64kkEitDcP3QL8BCYP1T8r1NGYHaeLeLIudkCMquGdq\no9vVZS5GQuy2Jm4UtTT5KVIrdzG5sGqGmtqMcjo043mpsIHLoChuj27V7Tfv\nu3b6BqXuI+AnDlcVC9/T35+o9z9XV4PQwh3Z/LL7VqdfZixdnIVClMyuODQR\ny6HoPiR4dCd2UZxinKhy+IltBU3g1wmrAr5YYniQXPs2d9XOmGM620EIGKeC\naWWnMDNIFv7QP9WgRQzFTnUwSz6oo4a3G/Q3D48DCpAyS02Ud8N0ynEHOlQ4\nf6oOY3mpU/z98FIUNDZdb+cR0uioagYfEi7Eosm0TomJCwXG4mZVvn1aAB1c\nseFO\r\n=C7R2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5lX5mQ/MjPuspHRG3i7oSFjDuLRPQ4l8o2zzXCJUc+AiBazgxcwv2kFTTe5XZWG5VrDdrNECjJfImdVeMmQlBMhA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.d36e9861.0_1593193001885_0.09690086236179929"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.155c2f85.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.155c2f85.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.155c2f85.0","@material/mwc-textfield":"0.16.0-canary.155c2f85.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"28a52966d069b05ddf3f845738ff3207532f05b7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28a52966d069b05ddf3f845738ff3207532f05b7/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.155c2f85.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-TyKxi7Qfy0fG2LHwPX/tRNhV6lk+X3HNDqCqkdckmt+0FnE3clJfLghYVwVjQ7tASiMy+Vl/3C1STwI4zG9xow==","shasum":"d60bf54bfdffd46ea9ca50970a7fb5adbbf59bfe","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.155c2f85.0.tgz","fileCount":16,"unpackedSize":178701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9oUPCRA9TVsSAnZWagAAhIgP/2toJA6m3bnWOXDn+ADp\nL8aFsbw+CwFlXVcTOkFTIUUQ3WHNVGgAQT6vmtaVlit6IVBIgikwY8tv4/Ws\nhhqol2tI+oG+sHWkIdvUQp/dJHVGF/v2jNG1ncuhKWElmllbcKRlcE15urPY\nTS/ipFge5k+kOek1pq0BiUp0EiktDyPvMjyIira29pReWHOcdCGezBF49jJa\n/qskCJS6ZmuRoJVdhdSsRSv//o49tSoDpGHl2XIiXumtRH9aFAYQCITlhD3L\nR5AnwTL/S5yKTa5TLLFUuut4Q5VKkAj9elL+kDby1Vqy3gLT0aiSX5xKhZ1m\nv0HgzBEit2EyhrT1WvuWwK2cZ9QiNr1yKMmHPDZRDowVvXQAyfn+sTCGFIEI\nDp5pEYbD4afmiVHSmr81IRHBavi6+lVIk2i3B01HsI9KoaGkkQBipF6T4n1u\nwtFIoJIfR16KTuaYVniPhHqRybdenZ/yABA3VzUTbkO6toNqTci832OYUrvL\nMo38WggvWhW832s42yNQ0ypzkFa8AomBoSLyKipGCHWLQkiB+4Mri4yj3sIv\ngOvZ+G1q9yT6P3ddpQlumHlp9g9sp3ui4dJ+k6AzHx9I9TnW7l4ivqXnfce8\njQIH7uOr6L85zZL0PZCnnJItZ+Ek6SlL4yRATn/YYvrFf4sxDiCOkj/7nhWg\n89rV\r\n=Wku2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkN22hei2U5gSRueqc92cDKjnKu8Dl1pxV01Vt2RuidgIhAPxIFN0J7h6cg8IkhYCWfO7KkJrv60IPMZHuE4TmoVOY"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.155c2f85.0_1593214223257_0.9748081660099759"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.340c9c40.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.340c9c40.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.340c9c40.0","@material/mwc-textfield":"0.16.0-canary.340c9c40.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b65b8e518436cb4bcd2fd8c59ae2898f2715462e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b65b8e518436cb4bcd2fd8c59ae2898f2715462e/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.340c9c40.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-VIhGEVa37tPaGtVdUdGWyI7PNviOpIUk0UPU6wD2Wxa+F3ssUhrlOkAKHJzu6CRhsKhwtNh7kgX1+VJUiYSw3A==","shasum":"838bd78ba8909aaefdede9528303de562d6307b6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.340c9c40.0.tgz","fileCount":16,"unpackedSize":178701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9ob5CRA9TVsSAnZWagAAnmIP+wXK1iPhIE/IUHI6F5+6\nftGjrVI05hS7+TyXNGq5uEU8mCQXlxq/3G9Ejb14sAsDpARp4svGNkGV8+uA\nbfvqr3q/I9G4mJshon6pDMnuVQJYFcqUliszaEUVC5uz59D+RxxuVjQpIvtu\nSYDWWx0I5SDHTiO5kAJd1YuS0fZgfs38/xx1xS/zkF3ltLIZ6W4fiUGJpZj9\nDLqOUOTfKjvgm3ME7bLf+BgH0+gzqc7A/b7FfHSS61S4FXOr0GHP8bIEqax9\nGAfKAiuDTIDO/Zmul7tAvndhV/yiZROZ779q2nvbZSeOqNFWqf10BvvETI0M\n+zY1DM0oJ6T7A2ydbatjFe1xt8X7kcnkKYjSEOu9H/gGlVGQPKj8AvHQ7WAD\nXRWu/Efd+7OqQnTtCcZTdLnEpD1P7KfORRww119Js79QLCNVmeRwH4zzB+fx\nTHAhybxwtRIsTZ9Nmhr19k1S+DarCYTTi5Ln14kAlNr2krHI75PYobWE5FWt\nU9OAmoKpDjO8EudfnFg7MhLG38cI5q4A9OebMWIPIGlKslvVDp4iOXq+d9Ir\ndIJWLnvJ2e+/w7lDJmF8hlh2QIajPLnKcdR1m3wMiI8XcJg+VdhTODLqII4C\nVwC6ywpKbx9M2uK5mHvctwFD8LjXuO9/69/Cz3qHQZhXDjFK2MuFWP/D/8r+\nKxHA\r\n=5b9H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBcANU4DvGmrIklJD+vTaU5LQrHLly6hqanZEUfihTTnAiBp05jgpkF6ey9NG/kpwH1hJQ9P3BNvJI3fXZeEM0LE6Q=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.340c9c40.0_1593214712928_0.23543224077080183"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.0-canary.a3384d2d.0":{"name":"@material/mwc-textarea","version":"0.16.0-canary.a3384d2d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.16.0-canary.a3384d2d.0","@material/mwc-textfield":"0.16.0-canary.a3384d2d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e09d50d940709441416a3ec78b0600a867285980","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e09d50d940709441416a3ec78b0600a867285980/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.0-canary.a3384d2d.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-ruyTMYxTfqzMP8lPePNn9ymf/rE3Mflt2pBreMHVdNAuY7soWJ7oAGSizJd9njHQUSgTvnZg+VQJLSMHqmkAlg==","shasum":"d6ed92b4f9ec6a97fed90bb07ef472dd6ad39686","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.0-canary.a3384d2d.0.tgz","fileCount":16,"unpackedSize":178701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+6f7CRA9TVsSAnZWagAAx+kP/1RV+wHF+kmDrPD2/gUg\np/QyluG2p4zs31Ta+nc2G4zXZ49i4Gn164yd1uZZtHoyCu27qmBKuAn/O5pU\nf8Tiyyf1j3YILOYzIaWcwUCvFj0x+eQKkA47L9glmscoMRSaW4ZfWhbSJvVv\nKV2KyXg4eLnze1xYK8CxT0Jh48qmYxR+GCgzUoAnNtIVi4u6umS45w/xFcIh\n+CDn+nBr10YyqixAhxHJT2bpLUR2uYoCxHlYEy2Cv4WWSpoPz1F8hMUiI+Cq\n18HTUjYXXkNAVU0MRbuDaN7tpkdMaLXG86W33BH5bwu0egpWsBVvQj2sVVb2\ng/B9HK4A7UT86327aiBouI1Vjm00k0xU5WlQcY1B+c6lpMGTMKKf1Tk6zjlp\neCcmWOU9TV7mvL4uqRHMUJC29+MbKJ+CVuLcpDPrIH5MvGUFx57iTxSvJcCw\nu/5sj5P9ATT0CTEUjtjoH39oiCmL+vZ9xrFgrh13/3DD5YPcg0wie+bPBGwO\ncgqnzj/xafDlME0BSGk0O15wrKBpCTL7prLnfw2fnVwXyPzX3LoovPIG/KN+\nTfx4nBDZImFlfhWCvwmk09DKyFTcxBHwTGQM00JfNI5lT7+eXy07NmtniCxI\nVLJZv5u8OlDW3zForuPlUmrw3IHlo0lW9WhZ04ELPSMa+bnVsw+xd2Yqk/F4\n4UJK\r\n=NPBz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCp+8gTMpXNSD5y972fX8KzcYPysGHiN9VPT2Rbm5KQNwIhANqAYxpSJVUxSKGP/Zt4FCqUdKqP8XBPfZ0ibU2pz1NU"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.0-canary.a3384d2d.0_1593550843436_0.32523649272278554"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.17.0-canary.6d056c96.0":{"name":"@material/mwc-textarea","version":"0.17.0-canary.6d056c96.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.17.0-canary.6d056c96.0","@material/mwc-textfield":"0.17.0-canary.6d056c96.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a0abcad0ecc43697e7c489d2c4ddebb257cae5e8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaping Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/shape-left.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/shape-right.png\" width=\"256px\">\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0abcad0ecc43697e7c489d2c4ddebb257cae5e8/packages/textarea/images/shape-left-right.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea.left {\n    --mdc-notched-outline-leading-width: 28px;\n    --mdc-notched-outline-leading-border-radius: 28px 0 0 28px;\n  }\n\n  mwc-textarea.right {\n    --mdc-notched-outline-trailing-border-radius: 0 28px 28px 0;\n  }\n</style>\n\n<mwc-textarea\n    class=\"left\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"right\";\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n\n<mwc-textarea\n    class=\"left right\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.17.0-canary.6d056c96.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-5bVxS3W6qof4t4iIV6W6lQF3TL0uu050RbELKgqFUK0fBMfAAUCIjj1zZsNsHK/QGY3HajhXbt3dvH21NtSMEg==","shasum":"be70c58d2a6d590bc387917fd0074124a4d16b08","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.17.0-canary.6d056c96.0.tgz","fileCount":16,"unpackedSize":178701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+6osCRA9TVsSAnZWagAAeDYQAKSlvp3sefmDP0mMZRGK\nvbv+nImtKSPc2vLFqyxT49OD1xLjRf6y5wPIW90Vfnwq1AfLQAwfA/wIqzB3\ntjvNUjul3CewO5v0A2Ek0IKxDK0q1mNbN1qLO2n3on4ejD0Rt+IyIBlkoxG1\ngOmCiEwLCb/BCB0009mz1U8WexPwNn5VRTZaVBRed463gf6cTDvfIU4SdvRe\nXeSwYK8ZWoLUsX0wk46YL85V26+pyFOUOiJSW3IxnuMj2OWsJhsBe9jwArhk\nABiin/uuDXP3N/Jh/+Y1V4IHEKjmFD83NHIo0ABzbcNxkZxl4vQvuogiP2R5\nwgImvpGcuBaoHmKx+H2QmwqB0fq4gqoXZWbboNJhPp8PQAgfLXsUxonn2rKj\nM06ZTChR4d5KlbLmLFhmumv2ra1MYo39fuGyHhvawLfRaUD/9bsrHQUeAJRm\nEayJYhZpasIEFnoh9Lu7QjhVJCzD2MW26rXp5/GtZYk+gg3f3O/KF5aOgYDi\nv4vlk9OmHZBTIQoc8pUhauxsaXpe8zLhr5FKFqBwCHZNsbU4SFII1pQx5Zvm\nNIR7aeMdDnCtjoWAKFgs9uC0ikLZiKWX6pCDS9ZQOiOlA5ljQ6jYThjciteo\nJMFR9kW0n1TNEE77jRgCrgmkVOnL/10WDO3PNIWwgWgNrNQRdgo063mMhrpt\n+cY6\r\n=9rLb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjGl8GDR3IH9wX6+TR66/uyIdOghsxCufe8LTlaY0WqAiEA84acPAwCeQ521/ndkMaszgFtlbBpntjkggzYnB9u8wk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.17.0-canary.6d056c96.0_1593551403987_0.18623820941616476"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.16.1":{"name":"@material/mwc-textarea","version":"0.16.1","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.16.1","@material/mwc-textfield":"^0.16.1","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3b47995b0b098b9e7dfcc7b735eb23e892cbffcd","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.16.1","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-Dl28kDmSfO7U08xt2SSbQf1LV1++8uPnpMcNGh6jFI0kgHEIsDl8fygO6zM+qD2pKl4lolcgs1yjotz0+diIFQ==","shasum":"f0944e5ed768e7506e7e81a819bb16a284ed317e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.16.1.tgz","fileCount":16,"unpackedSize":178649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+6tTCRA9TVsSAnZWagAAROcP/1Lc8QqdaP+8g0s8qWVq\nYjlxdNKXa7iCM6zk6naaTbpP9Ak1rbltOOD4E1B0nrgJdnv1/pkqg6JxXPww\nQWrPiBF6jfd9AtKhfWo1QM4QTSpfWldICmKpJwr7JahrLtUuFG+6EF1uTt19\npCq4mXXcV2HAaUmq3NjsxHzqw2byLz2AUFfLKnuMRJ+wj58FXww+9pc67jtR\nNSuQZGHIypwZJHT1JUg0XOKsvKsrj88XCYyKaoMJL9atNbzV8n+6H8lIT+f1\nRTwm40z9rg2owGOL0VFa/74Y522ixHQ6rrLkD3WlewyHCg5kjOwv4H7taR4S\ncNUtBuuhoDumcB0vHvlsRyL1+gWpefKHL3ByLSsW+npDQ486ABefN1HCsL7E\nTEzgycxsBrTr4iK8BV5i7llBqObR5tS6QqeLn0kLReDJQsf5/64tjItvnDkc\nIsxINVLXo+I8zrDsiITbvR3rDoYmXvTK9CmsTxc18X0XiMd16mGVoNbaLEzw\n4rqbqutiT0Gd88xZ1YKjveJgan0vjTkDFWyxbs94lb8dHCJbJQe+GVl7S3Pv\n4zONRmm0uz2CWLZiK8JHGd5rxW5LC7HurygKbbjWQjdUBhW2UeuTQyNp0p7c\nldyrWbwkq1QKO1cslqdgHApekDX+6ZpguiF0AG1Str+90+p6z6WNsfLQkWn2\nv9UX\r\n=V1xY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYgLeKxiKFHtc0DkBCfQ+c6NZbr1nnEkT/8RX//vIEVAiAOWszY//C0g3g/q6GFcf5jt0OuFzEYzUbL845xCjkY0Q=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.16.1_1593551699003_0.1202162027435405"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.17.0-canary.f7e37607.0":{"name":"@material/mwc-textarea","version":"0.17.0-canary.f7e37607.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.17.0-canary.f7e37607.0","@material/mwc-textfield":"0.17.0-canary.f7e37607.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"898d9ba1603fc85a0dd4f96b0dca134bf20f6b37","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/898d9ba1603fc85a0dd4f96b0dca134bf20f6b37/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/898d9ba1603fc85a0dd4f96b0dca134bf20f6b37/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/898d9ba1603fc85a0dd4f96b0dca134bf20f6b37/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/898d9ba1603fc85a0dd4f96b0dca134bf20f6b37/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/898d9ba1603fc85a0dd4f96b0dca134bf20f6b37/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/898d9ba1603fc85a0dd4f96b0dca134bf20f6b37/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.17.0-canary.f7e37607.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-W3Eu+BbYFOwVFJzBJp/id54g1ujPHw846in8XQo1LXKS/+svU5kc+Hj6tIOv/wPV1MlXyNd/y/ndbs+lJqGOMQ==","shasum":"a5b1c671027894db874b84f21f8eccccd931819a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.17.0-canary.f7e37607.0.tgz","fileCount":16,"unpackedSize":177649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+7JACRA9TVsSAnZWagAAY6IP/3PfNYZHjEzXWY/D2BKk\nzZakDho44UcJ1FOF/4bRnr/8rd8udYXQLvjLRpNSSvJwdLHZsCpyt79sHqiy\nzzC5tKkCTk8xLKBXHPH3zxfUUDhxbKpX8OnU4yHAYd/O1lLM5Dy7lJPrqvC4\nfMg4JIb9BERIuOUrglL1U39sq5fbCDRx6LfBeToBeBNeKO3UfHCeICyslf1E\nbGsQSXX9S/eHVhyWsgQDqHrANZtcNTKuzApRMLLNDi9D1rlQy8TtBeD2JQDp\n291o+IapFveWkey0NsyP3FEAIODslr0O6W9DIZVsXHHxDsj9cGtYKFESxrqw\nNb/9Ioa5KTY5T2RRgkmGGldpBi3tEEEt/whOc84ebLCgPA/Yo1DzRtYHgxlX\ncw5DsM0encCQ3teQCMYzHPpm6Er/rO9Ojr9qsAgcWiVLqt6R8V3SDJj0JuuD\neOLemIB/AxeHLYGsYD37DH49w5nms8ISxKD/2N3lq9FmZ2/SwBEr87/Ahh3I\n0zz9eyOdWRxVeqasJ3pwJ0Kc2sjS1XgvI3fVPU+iTEtCBA5BrAA5R3bStJtr\nzU3MTnPDoOVzbFiF3Taim9YKuII8+JTME+n73yOe2a4YOhuxo4un+prk6cOK\nFUjib4OGQJDR7boduwLuGXuq1yCdc85aPxl7NLMD6LCeNbyg6uEAWw3pxUFo\nAXjC\r\n=Wy44\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAT8MZ3OaxR8izi7DB+fOhEw4HLO4JQYI4IjFOmdqxH5AiAKa4PFuoPJt27R4WiYelB1suuTgwpYE1z7aZxmRCWNqQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.17.0-canary.f7e37607.0_1593553472054_0.39062145525497094"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.17.0":{"name":"@material/mwc-textarea","version":"0.17.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.17.0","@material/mwc-textfield":"^0.17.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0afbfef219df4add1912c90b8608ac93135d876e","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.17.0","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-1NxL/ZtreOhi4Gjm1T4iGQoJ59hzfJH69ocwvYpYAULqfac/bdtRkjlsxKLZN1EcoB1HLkkzrOXp104B/eMHVQ==","shasum":"5519d4992be7a5d54097cae4e301eb17e6956476","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.17.0.tgz","fileCount":16,"unpackedSize":177597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/OehCRA9TVsSAnZWagAAhwgP/0Cr/CCCgxtdHRPbGhnY\nFW+ysFSGmaGdAA5//TL3XoEx5MVT7knM/494A5HgxbLBh5hkskrbgUY1XW8m\nRPfhybcn7wU895Q3ILp5SZKvDOzB9B4s/IdVZhVcGf3v+dkfUqRszcJhDRu3\n/Or5pD/Ql04fMn0Fx1vq62E2HJLr3FnPOqYYn53kmBwqKUssAfU33mEJfA1+\nsQZ88MSHJSOr9+/saONvCwPtenGXHJugBdEiO/2g8yqsxLyBueQNJ/zVCQJs\nxqNqNskmq/zadacS48jLUqmy9ShV6bxBJHh6J2mZQXCdzRhN6mGKrTyh67LQ\nRMcVsBKZMVNLSbo76vVcAXjB3MR/ulEzLAqADPcMZi0bBA9D1hsF0MgmDQcJ\nS3si7LqHKKOxxfM1o8cyZYldeqdNuCAl0KvlYrvSOeSmJGdqQpB/I/SqM0uE\n45ji8YsUhmIlxV2bVu5GtTlSGuWzJ7jigH952XlupTBZ5B6ZbAxTUxcfCDjF\nSsoySlTwABIIISHlfRS8Fn0T6qDDkRc2nlIB6rlMICEVUmC93wQgwlGER0Ta\nRgd6sECLBa8aiwvigcEXCrGV0n44lyBNo5kfQzRWzTCFaK7F3xW+MG0RuPxo\n8lZQQZAh6YvwQRjxIN7Q/wrzbvLXKLce75CjwZbHazn1uJ1mdEA1S2aj1PSv\nnm5+\r\n=iwHQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFX2flyRsmppmWPkIQuQF9Jwm7/uyPi+X4872tEvRFlKAiEA1WhpS8se26dXZvZB1CDYqwkVQB7ufu5SnbqF4kbMkTM="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.17.0_1593632672841_0.39965276400032845"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.0afbfef2.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.0afbfef2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.0afbfef2.0","@material/mwc-textfield":"0.18.0-canary.0afbfef2.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"22b3cf02901c0c438f1e4150ce9513d5f45f21d1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22b3cf02901c0c438f1e4150ce9513d5f45f21d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22b3cf02901c0c438f1e4150ce9513d5f45f21d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22b3cf02901c0c438f1e4150ce9513d5f45f21d1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22b3cf02901c0c438f1e4150ce9513d5f45f21d1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22b3cf02901c0c438f1e4150ce9513d5f45f21d1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22b3cf02901c0c438f1e4150ce9513d5f45f21d1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.0afbfef2.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-56syrQudYtemLtIOrgBYKJ/05Q+qzyBP0GhoSUXHZJsIorfrBF6AS3+hRwFkzcnXShrNSf7jS4bRF64W+iDB+A==","shasum":"a82c6503aafa3acf69d34f6eff839f6413c68c7b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.0afbfef2.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/OesCRA9TVsSAnZWagAAP3cP/1E9zPD9da9HdY38SjTI\nSNqzJ+ew7Q6TQm6Lq3QKTtpHbpcJXbD9JWo5ZzyaKnoWq/0ttBySlyvupBGF\nZS902KsiUspPLv7XzyucM3ibNNUQFQsKLbYAKsK9ZYN1m49cCNrbruyCOyeM\nVj1jnqZl8vACOH641xEyiRsW9uhFpDhdLcXBL01bpE8vZagSPAJQAGDAwVa+\n3Kzr5VQmpfsDtUrCUqfjvkXP+seykODbjcXI+AZPh1pMIDVFQYKfDvSoGZwB\nJZSGYs0ajtQjw5bLzXbGIQT1E2pUdlO9wm8tJQr5qb2OtoLGHe01E1gDKOQT\n9ybfYCGBXngzwJjbFDtIPn4r/mZkHABh+hLla9e9g9nHa1yO5/QlWAVhutIB\nhgDNC7hHIf+4kMZ35eTSSQAp+22tFfX9kvfV5OYNtAeKk6tfIK+wC7AuD96M\nDUThA9ZMChgBKepxNy0+YG4wIunbNSIXL0/oszvdk3qRR7jGppmN5cDyvGpB\ne2NRJDOG6zWiHsyBhnIqAVvI18y8kcwWG6KOz54XISdQMw/N1WTpHfNWUJ2X\ncVWj0oKcyFU4/l93NwQPC5iJzxUg3hlrVcTO6wex7egXnNws+vWHUYwq/2cs\n3VOYkv3CoSdXXx6YoEcnIZYLj/KWoVLgoCvqfa6A8LBj0yWqyyF+iQzSpJFe\nCog9\r\n=VFFW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDK6tQt0XxBu3ikZ0NYMvEJX2omkXN1Z8mLIZViEWI1RgIgP5JUP6V5XTv2aJsG6nRVABVbYUhfuptJLZpu1seSNVo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.0afbfef2.0_1593632684160_0.2473879740132825"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.fd970958.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.fd970958.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.fd970958.0","@material/mwc-textfield":"0.18.0-canary.fd970958.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7dc6a8720f1d1adb0ed9ae03d2ee54b539251905","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7dc6a8720f1d1adb0ed9ae03d2ee54b539251905/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7dc6a8720f1d1adb0ed9ae03d2ee54b539251905/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7dc6a8720f1d1adb0ed9ae03d2ee54b539251905/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7dc6a8720f1d1adb0ed9ae03d2ee54b539251905/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7dc6a8720f1d1adb0ed9ae03d2ee54b539251905/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7dc6a8720f1d1adb0ed9ae03d2ee54b539251905/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.fd970958.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-iKotrKq/IuOaikuyea7EN50mYf4FfD1BidhH32jEEhvHfomKLCwOOmLEMbWxWC3TkShCCiCZ39uOnMz+Ojv05Q==","shasum":"5fb956f2cff701c8d8b67aafff608f8c2356f6e7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.fd970958.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/R1ZCRA9TVsSAnZWagAAa5MP/3PEMvggoouBVviIjS1h\nL4K8kzDpK+bm5LtX2MtxC5Msy2ApPkL6qktT5HIwQNaT/9Uj1GqZIxeXMV35\nKVay8jWRbq+FPHrk0BZLEti8YoOO3TmBzR6jwvlCjO/LIpS0OmLMRe8oGMTD\nzw3kq0y2PATW+Zt+AKEpJk+afZZa8iOiHTaVnX5oXvKBZUZs41z+V9hHPAQH\ndRi8RjiiedBgsBzWx7pOrnE6RmidLC+Jr4kxTZKPkEQrO+f7al21n7/VCv3m\nfR5Xde2SQw0ZrX3sQosJksgpGtSRlndS0te7xTJ4LnvWDAFMAkC8CC21WJmS\nw7GF1r75hOW4cEualttIFlEI24SiUbSXFFPDJ69YrNI9t5AlbccP1oG8lNH7\nvfDI8RMGqkHElaqDjqZFn3eMc9+cwlKJZFf80034S/cJEtLcyVZBf0LJURPG\nygeghf/qq89+Ufjamh5RprqS5guw6lLmPJj4X07RprTg8HRWT2wVf006zwAH\nKwMTquk+5PRIdvXL60vqZTrTpsp3hPonTzppYUxx5WhCcIe7D5+79//6hyBS\nWaArKD8vzUKz5aAfgAqQ0Vv0GT/ba0AvSi8ta0zJAH+SwpgR6nHOLCOMSvgt\n0yP15qf621ixa1fcO7Sp08xsqnv+UBp7MJFzrSvhFBKGPmzNf3IPRGJ/WDDZ\nagGw\r\n=19O+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6uH3qhkrLVC+IIPuO+vBdGcs6KErMO+ciF8wMeY94IQIhAIIxfTdOMEeH/8bzMTfj8zByuMJQ5FtoW6DRdrtT87KW"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.fd970958.0_1593646425242_0.6211014717398786"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.fd44be19.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.fd44be19.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.fd44be19.0","@material/mwc-textfield":"0.18.0-canary.fd44be19.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"19ed8b1c754f72137cfbe305df2c3a6be32c041a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/19ed8b1c754f72137cfbe305df2c3a6be32c041a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/19ed8b1c754f72137cfbe305df2c3a6be32c041a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/19ed8b1c754f72137cfbe305df2c3a6be32c041a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/19ed8b1c754f72137cfbe305df2c3a6be32c041a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/19ed8b1c754f72137cfbe305df2c3a6be32c041a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/19ed8b1c754f72137cfbe305df2c3a6be32c041a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.fd44be19.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-gJoy9w8/vak6jLf1tSs4KS+nxAGv6RJH9eXXmOOzLg1HFiPpeNOE1SGoWH0WGM1D9cIHOU0WzomQWxP0BOAucw==","shasum":"ff494625d8d9962cb23917133cf067ce4ce4dfc7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.fd44be19.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/XVACRA9TVsSAnZWagAAMewP+gNz6LlTav9QoNlEup8O\nBSQqaPpsfXa2fpVzBPB7mnFGMGDyRq/+7td8bSD7pqbH9fKsCAEmp7AO7Cjc\nXbuJ+adScTuAHpmihaJpQdqarSImfU8mdoxkAfKa2yzOKIChrOgeCSZMJnQJ\nxoQhdihg4b+FZEYQAYHV1zozrMw61rls3bLVaUq9V8r6OM6ttPU7sIrdypY1\npwe9+xqyd9FlWFzo1WYfrBrtq9XKKl2aKTxlmv7lHY5JCRgc/DtY7aDy+elf\nqlFyDzi88UxH3X/4CkQ45gq4k0jQZM91Wbv9Ad/ogqFlDYwKwv8V+FBkP+mW\nRS2/RKCLudTVixoBixenhAKaSSb4Too3Jv2EE2LI0Guf+FCjq43EbjzXyYEn\nOlzMk8evH5v95NyC3mtXYjQtGeplbqtauWw2/8/qtKP5p+PL/f3B42JebjCA\n40qecy394awrJh9EAq7W/ZpUociJen5TPTSCepNuklNQx1i7OJrbOpBZeBgW\nm2oDSQcv1AhVPzGVOUC9n2DocsSuj1sfo6m0FEVMyLup4fsub2+kUrHfKMYs\n7OJN0Pu7W28kaBuAG9wjiDguA2B20N+U71u+DgFQU5nam79GS/T0oCNUZG6k\nEqgt3uEllCnfc/L9qNxD8fUT9YaTZEpA9XvRIu3O4OcEYJAVnVYnopMAupkk\n8emI\r\n=53kZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnhmeFYKUqOQxS7hfap7s/VZLPiz/XSIAe1reiqkKhAwIhALq3kJBcqyYMjqW1lNvdhPsiY1YKsA2asUBq45eK8N3D"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.fd44be19.0_1593668928011_0.8671962671319011"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.17.2":{"name":"@material/mwc-textarea","version":"0.17.2","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.17.2","@material/mwc-textfield":"^0.17.2","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ca6fc6de0c0461ca30684d96cbb98b8885c8cc6d","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.17.2","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-XC0eBZsGV01IvPaetCK7iIyqbHvdOlpuMh5qIRHnQC/KI+gKih0pg7ojQt/TNJ4mrO/B3HTGGWpVqdENRN2hCA==","shasum":"bb201eedfad480bd0daf9dd7a9fe4f4bafc28313","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.17.2.tgz","fileCount":16,"unpackedSize":177597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/XeGCRA9TVsSAnZWagAAbGsP/RbxTJRg5M6sTTXG2rV1\nVUgS9ynr1xHoGuz4OlhyLUUa9vjBLuY96aj99LIobi6LEIwbOr7d4GM8yo8G\nzjq6ULwZdaT+KE1urbmN+bVuBf1znyspWQSyyfi7pplm8mK28MlZoUh64swe\nIG03dmc8X/FHATGjywOWK5M5y0YAzGQE8HNHI9qziYkgTnZqsG/qeqFoQEsU\nXqej+V7/W6AP9JRXjkTg7iP0jDHFARsXejdeXZTD+JuM23EpbgMigQstG0SR\nZWWhLb1r/Cyt+IJm0vtxljO2kYoWj1F4T9j5QqoC7xZrnKPLfuif6GqccUAw\n/C2LX2eu7tbhZvyoUTtGyDR+5LeK7sm6O9u0Ek+6nLfHS9oBLBt229fELDOc\nuM46cXlgB2fSsISAsoUVGWEmUPorutgRbSpvzQ+ZBqWHfdRrkDj6oEpkcj5p\nXSkE3rWZ9LlWJY8HNmBUFudATKVDb1R4H+Hc1m8JtC0K5mBiBiVka2n8YN4w\nmXpqsZHZRF3OWr3iaDEcKaUqTdkOfqpx0vZLpFOXSQhVVNHVX65s2OarDLmD\n/xmU+501nIJq/FoLXUlNT3ia8r8TV2PhEaWKJiSfvturJYO0LYbT3CUUQOCc\n4rDp9JaFzeZjFd8ShTRwLumnzJo+JD2Vr9Kqn1wpuTU8qP7qCIfTMOO68H6/\nk/ql\r\n=Ads/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgd8bKrDT+PQ5KG7hxqd0ZK4bO8w/Hn2FIuJ/bG/yqDAiEAuETwn0ELUvn8XD9rvx4CYf8RFh51RgbsRYxoeJ76iDk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.17.2_1593669510079_0.26239284870019164"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.ca6fc6de.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.ca6fc6de.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.ca6fc6de.0","@material/mwc-textfield":"0.18.0-canary.ca6fc6de.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ff7df8fd7df07e908061e32938ae550315d255d5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ff7df8fd7df07e908061e32938ae550315d255d5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ff7df8fd7df07e908061e32938ae550315d255d5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ff7df8fd7df07e908061e32938ae550315d255d5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ff7df8fd7df07e908061e32938ae550315d255d5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ff7df8fd7df07e908061e32938ae550315d255d5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ff7df8fd7df07e908061e32938ae550315d255d5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.ca6fc6de.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-oxDDjBYqw8Pbi2GCYSQsh7YMK9xm7YTR1ckJg0R7tg8Pxps9IuHT1v3KB/OITAG4DUYbHbYsG5J4K1CTTKE5Cg==","shasum":"24ee837669db9ba179b09d1bc284e509cb41b729","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.ca6fc6de.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/XfMCRA9TVsSAnZWagAAaBsQAISCafkVcqie6xSsIjaE\nKYCuNifS79vVJBIQdlM/eebAYKdfOV6PMVX2XxSE679l3gxn0ORhIGx9hUgV\nDN8/xS+pdg148C7T07lBGw81GBiBTG6JFIsXiZyuW23jQ/ymsnJ9Mo55xTad\nWda/fLaUIkpFeZjdymsd8/76d0/5+sHPVKjOi4F/RqMyukoteNRoO2F7crlP\nHPZtNEj9Bl0mkQ52sHsDZ/YhsWk0hmOo/Ro4XO60ANLfX1ZPU/r2rVhTaVaR\n0rJcKujijiJaCtFsZmlgSIehfd18HYkqnbvCYxeHWi9/PsTZ/hHEyEGC39C2\nndgjvc9gqqz+qgBXayztahOjjaZI2KTCIdWh1QQckxaiX2a5+ItBSTDnbeef\nguLGf8Ds8zjC+IVIBjhnhM34DwcCRO91WHeR3tBCLGSf4MwuOHRwhaLC42o0\nrgDnJ/i8PoHiMRfiyseTCpsGK6JB4CdvJI0ym+3zdcuttbVhtd20X81hWL2W\nlNoH63JV1zLtNyRZiiBczIj1Ou9PG/FpmQaq/shKEbNGCzRdOzqD6j8EQw+i\nnzr+qdgGF1FlnOq8M6d7MN3KsFSyYzG60pRmsAzFKG4Wp1Z+HQENA+17LIfk\nEYcXC/uqAd06dyW/YwDh5o+6Egsw0LkWNsFvh9s7bj8ARGLLL4GxQ4dZ2wej\nBBgu\r\n=c2NV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtMt7kY94+uqE6eCaJ1MlCBkjMv3hDKrjOUBzCXETWrwIhAOAQGjTD/HGN9dbJ/mQ413l/S6uleAcqaFsGT9b56BRg"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.ca6fc6de.0_1593669579463_0.7555949639662793"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.79f1ec2a.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.79f1ec2a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.79f1ec2a.0","@material/mwc-textfield":"0.18.0-canary.79f1ec2a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"28823685e1aac950044fe1d868c6233ae753ba7c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28823685e1aac950044fe1d868c6233ae753ba7c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28823685e1aac950044fe1d868c6233ae753ba7c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28823685e1aac950044fe1d868c6233ae753ba7c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28823685e1aac950044fe1d868c6233ae753ba7c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28823685e1aac950044fe1d868c6233ae753ba7c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28823685e1aac950044fe1d868c6233ae753ba7c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.79f1ec2a.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-qL8JMoR7z8IJzoAmMg+sn5/8QkzHmUxHNmgKflFzua3aiIoBc9AuIb18YHejdgI1aQHMDB39EDZKa62o7rzusA==","shasum":"6a661fbc0aee6b867e5071f87d4233fcf26e8bdc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.79f1ec2a.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBLHICRA9TVsSAnZWagAAdb0P/1mgda2vcWhbati1DFsi\nroMn0BIK+CjfKQO6V2hBxe2V2e2Ls+2Zg3puSabzULm0blx8ydBrRncJcy50\nDnac5vDh/q1tjtLChHb45OCGEyv1cLiRxEf7kXffAQzwGTvUrUl+4Ok1sGZJ\nnnPmsDrdq/vYP8u2uux74ZmJyIijfEOPq/f6SWe4KTE1fjy1nWcMB10RA4ZA\nP76ujFehUzTekc8h9LjkT2iu3c8ZbqbjYxUaRzpXzlexh8N+s+a5CeRbtDVx\nxu3JMyxWd9qnQFRCxhNJNt5wJcNM+IhtSRy6P/XFUeshjYxlKIL3WgQc2TK6\nmOd7zUW1GIpoKu/elcj5tJlNDHC1Ze4ysXs46YMSp9Oj40JhC45GO0KnNeT1\nNcKo+LP/XL0c5bWRfbIv6nxdSbltBlTajL0SYbc4Z+KgDxnXKuT8H2FBQK+H\ncHAitFGDD7e489Xw3mGaGWj0mAC0fB7ym29HQkZ0E+o/grmNDAY/tvEuv4yf\n8RWIVNXJpIxOtkV0nWr5rYoE3x7CKnEB21RduuGTPnDg6Ns2qdcJHEk75Tn6\n8AgZ7ZcyzYNwUnxJaw9ghDKRM6UbYicn/C/0FW2HeNzMOd+NhHy/09iTIEaC\npvukQj6Xm2NkS5yaIYUu65aB2rU/qKnt030kMqpX5HP6nLcECbBhxcfgFzps\nY/al\r\n=sy1w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUeLKZlI76lJmvRKOLpBCUpjoJ/NkTT8s+Ib2tuBUZrQIgTC6mGhOFJZZo2Xp01C+SlSJ7iygXKLjcqrqa6RenxMM="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.79f1ec2a.0_1594143175469_0.03547816574693763"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.a7bc45ae.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.a7bc45ae.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.a7bc45ae.0","@material/mwc-textfield":"0.18.0-canary.a7bc45ae.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"fe14f2ba9c3850967039fb923e6ca39978290d3b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe14f2ba9c3850967039fb923e6ca39978290d3b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe14f2ba9c3850967039fb923e6ca39978290d3b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe14f2ba9c3850967039fb923e6ca39978290d3b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe14f2ba9c3850967039fb923e6ca39978290d3b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe14f2ba9c3850967039fb923e6ca39978290d3b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe14f2ba9c3850967039fb923e6ca39978290d3b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.a7bc45ae.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-lPPGczZnfwNNh7fOj7NLTMCwgp4ujaqfTX20wyXWhaQEeEoOM1v8kzeetktAb3geGNcOqXkNBDyoag3p0fv6qw==","shasum":"a1ef118ec6db9a7cef44188c5b57d6e384be8e29","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.a7bc45ae.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB1KWCRA9TVsSAnZWagAABUQP/2jgYlzQTuUUZEeWBg3u\n9/oWm2z0fYVMP+8wLAle++NyCzDGKTNsEN/Q30X15zeMG18HF9Qt3ouFp+rF\n8ICnoIpgd2s5IqKHTcUjDYvikoDVrMiAhchKeAgRovUsBoEQONdUBIFyGbJT\nMGadhOdQPk+lS1YGuKuBe15FhkY1UAB5sogwZtn1dy9IXhouWP6uqjz5hqm+\nAIf2gH6hJ9V34XJV4vWbfYzw94qKpp/S9e5V0yMsvSWf6PMuQNQToZIdSmbm\nL1ALCB7sNbIOz2BswkAaympogC8ydU8dpJC/gYDCoQ2aupzmDskSyN2VwV9D\nFju6/73gof0x8woObInPGQS6n8R4iGtqua3dtjXDv9u+UgrigBIrQw6ooVen\nFZsAacdagBFrPlrPwPl1YNilg4zox2GoE1x0CaWQG4CAdxviUbNRQpeW5ETk\nEMRZJOqn19VXEN4sqQhMJrQGawYv1JDEM9gkqAV4Zsw4O3VAf8HexsyCM8N6\nqq9cpWpEHnwzI42NQ9DB5WFYVjIPP2p30X9nnjOkzpIsOksTc6YInaDCoM3+\n66wTV875CcjihzzoLxQ7FfWm60aoRFAYG0qDlzT3tAGkAMzlHnp0qRDTiEcU\n5U0QjhkGNWl+nc9tOIEi5SZjzr/ju4FRFmwn4sZZ9fEnmy4fzAH3V0DxGSn1\njVaA\r\n=j/TS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNw3mQrA7KyyDXlBGGtucLfOnD6jyGk9268aI9MtAVsQIgLbMMtRCG7wn7mFbs4xdVs82ITUOUsuMKwNJXh/gQC/o="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.a7bc45ae.0_1594315414319_0.3914738061770786"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.b184bc1c.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.b184bc1c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.b184bc1c.0","@material/mwc-textfield":"0.18.0-canary.b184bc1c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ed045f87cb3f1a4ba70a20cb1f586b80a1aa928d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.b184bc1c.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-fZg/p8JTJXVSToYtPEFmmECotuqNeHDc1/oVsy/XoXljC1GGxfUCFUAI7h//FVxwJ5Q7D3Mx/DFXlNyuTqiB6Q==","shasum":"0a9c2571dec7d1f3dbe5974530c22b4cd4f88564","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.b184bc1c.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB1S9CRA9TVsSAnZWagAArUYQAIW4wMAc95ifFilHQJtR\nWgnqGYWrTA7iBZVyd3vwPMDu3dFkSB9tE0JtUb4cQ+O3+XHoeAtDxdW7P4tt\nDKcusGrHmfYL7v+1fAW/QTKiPs7jObSbeoOJVsqxuqSJWQs+fH6z0zYMP2LD\nR/T/YaDfWkihJhw0riy8gLkW6vlcAzR17AtdzXXsM1/lrE2kaK3h3n4hPirB\n/6EfGt9CA7oQ4iASR4O8VkpGxB52Fa9CQX2GFqJfxwuXfuDt6iW9ZKsuyLJQ\nGD7iEH/3qEZhcNj8sN9e0Po++df1q2ShzFLU7MStQBZ6Q+Tm1O/sBfaBQhZb\nkT7PkzVjHXL1o5i0+WMTRUAWAyTy2QbozASYRlQaiICSVE9K3TEBUpPlCMlX\n4Of65DH53HdUKmDsV/BlQJXf8evrAHOjJzNjptKZnsAr4VupzZ/6ibkW6FEv\n6DFErtVGP7mbaCJxA/arFA5vHFK93p6G2VEq2a8w8GHa11jgCOZFW5vkajZg\nTuj8F44q2Heimg4uEYzhQBfOkWIDLaLmeJZzipp8dQB+q+97exI9QDPuRk4O\nba8WvjD88vwSkWBQSdh7XtkLH9Xr0ko67HMxEb9baI41Tou0lu+Vta/IVs77\n7POtkNgv4RhNHFiRpaTHTnBOSce3GPbGBRjNrgxwsT/dEs55l+9thUkIL1yZ\nh/4e\r\n=ogoR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxUi7iaiHhRLwdw8Vl/BiXbhZetFMJVdcmm7dz2y6OBAIgGgQ8/uvMMWM7H5wGAQZIb8SF3F9J5DdEDNZKcRX14BU="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.b184bc1c.0_1594315965518_0.688535961949609"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.b39fde62.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.b39fde62.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.b39fde62.0","@material/mwc-textfield":"0.18.0-canary.b39fde62.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"561ab4c73d80c73f9b95c39655b7057d622fa2ee","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/561ab4c73d80c73f9b95c39655b7057d622fa2ee/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/561ab4c73d80c73f9b95c39655b7057d622fa2ee/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/561ab4c73d80c73f9b95c39655b7057d622fa2ee/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/561ab4c73d80c73f9b95c39655b7057d622fa2ee/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/561ab4c73d80c73f9b95c39655b7057d622fa2ee/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/561ab4c73d80c73f9b95c39655b7057d622fa2ee/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.b39fde62.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-6Vcf0+OyNJ7Om3e7mmGksAyUZPDyhx14Q53sQNrasvITElzuqjXJ0/KVF/7jIsuRA3r8NtJsowQuybNT9zjMbw==","shasum":"94b1c7750bda8847c483fb6e2418eab5a7823f16","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.b39fde62.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB1X3CRA9TVsSAnZWagAAbhAP/jYwVTL7FrGuN+WsD97s\nXzGTk3JFnaXLgPR0SoyGESX78qHn50jXIbe8pLyRXquvYnkrJQ1fkC1OkbGU\nzqcG2BKnORcXrJRYjtT3TPMITdGoRHSqiFn9IY+1LEthJvJ3YAcBhmSXWH1K\nkThSW6a+b9AB97H3/fTLRsUdEzZ7ox9ZvQQjbkBPeqVNZ2DIRFNFdXtBjjmI\nKKY0wc9fJNqghs772SELYefX8/B1zf07OvC3YO/C0E6mqAc0d2dc0fP4T4IU\njkhm3Dza9h7CpPQshWdpkuY3IJ2IuHKBasoKD7f6egt4lWz+24oA737blUfl\niAda0gLsQQccdRajG3j+Lly1QWEAZ8hzxMQeXd3lPQeKKHCZOFn2I/HZTO1n\nFh/rbFkBXU2l7MK8KHqEFzTdj+gv2IsaTRcyPMaBeE4gxcPliGnvQ2KZUcDv\nery6dzQZDBhMaVF1qAuYxfS0cyBmTua5bfrAtPARBHgMaGM8+3RvQeI1Wv+g\nrUzGMdrSS5VMeMHSlXbB6s1WhdQ7UZC0+/YjmFvQ9KgwlkImukp/N2lFhKwC\nNPZLC3iQblzg5cFhLUlipznJpqp7D3pd21Uh8LY1XgnZ31L4WGraa5vZguzT\nrnys58QuCgVGQ22/RnwGmAJvZcCFTzYmKFMs5kiOKaUmTMqWMan8LT/uW3i/\n53Q4\r\n=gHRY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHytUcZGyCq+/RJ5D5cqXUdw3cpZGdp/VoFnghpgOYXoAiBuGjAYM+UN0l6Vzu7fIv8NDzMYxVBAPa7kJq6lcgpo3w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.b39fde62.0_1594316279320_0.7047060483203589"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.dfdd8d6c.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.dfdd8d6c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.dfdd8d6c.0","@material/mwc-textfield":"0.18.0-canary.dfdd8d6c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f0aaeb4b52155318bdfca32a9cd375c7cf8b0ca0/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.dfdd8d6c.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-r+XujUChEU1NlF9lp+oU6fp1PqwydCgfgEJQulmCCr0KByu7jNnFJxvYgNFxH0nWOmEIwY1dJxwZwF8AwKLcug==","shasum":"16094db05a1bb1e3132a7fdf348b4ae7500be0a0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.dfdd8d6c.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB2E8CRA9TVsSAnZWagAA4wsP/2HyR7pILAkhBM7xoxZh\n4OCs16ZSsnxY+YJWYjNwT2YbtLXXKwHj8fXAyIkjox8g/IqZV0xRI6SO8dsZ\nfDsMWF19zLH+2hmVrbszdAMhaMVfxUyqRVAFdM6ZgRGcxDYwQKJKs514OXkc\npRoLyZgS7XbHLbNCmkcg84f6RuQrsBgs9EJAyrdIpx0hWj4FkOjXrU75m2aw\nkZNZo4INbHIMEtTZhVKUCqugWb40q4EPRWITlnLs4tb8Cp/KpyzLeWfsYe0X\nA+1w9rvlCfc8N27K1hDV/hHRoFeUlCxA2+hI/SpkCDwbbznOXGinuQKyf2CE\niphwL2fA/lm4LBGPOpHIfq65OMBioXr+re3PH4NUs0meMJQLR4XiXRXWpTQ5\n+ad0lvGsOi2bW5V2M0C76G5o9yDhfehgbFtCsc7bpWuXurccadzbbzUBK14r\nEIy2b16VdU45BW6V3Rpjg3R0Uj7Ez3bBuW+QQiDHRe72OjsbtPNsi3XmxjRy\ng/R7GuOtaTyiS1oKY2L2+eOXbfdupFErlyikFJt7ruZSZxvwer0JcPtPJJBO\nZtsXaoEjQZEbFy0Ww0vjpT7RIBlDwe9AfPUfjeV3MFnP78SweuvloCtVCQJO\ncvrfmHfe6ZqHMa+eN1M1mVlHQLZXJ3I8cO9N3/9E7el+3zkiFvjT4sBU8mV8\nbSII\r\n=WIQt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbT6wlgRff/zjf5mSRGJKchFce6/nMc2FatQFw4IZkvQIgPNW8ppUg3NkTWJqgWOQRtWDPaO6viLudmup0owZekro="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.dfdd8d6c.0_1594319164144_0.07046467307969384"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.11cf2694.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.11cf2694.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.11cf2694.0","@material/mwc-textfield":"0.18.0-canary.11cf2694.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"652e6b8d96cc6adfa62d59e09d264defbb4f259b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652e6b8d96cc6adfa62d59e09d264defbb4f259b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652e6b8d96cc6adfa62d59e09d264defbb4f259b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652e6b8d96cc6adfa62d59e09d264defbb4f259b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652e6b8d96cc6adfa62d59e09d264defbb4f259b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652e6b8d96cc6adfa62d59e09d264defbb4f259b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652e6b8d96cc6adfa62d59e09d264defbb4f259b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.11cf2694.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-9oSONXYxnGuhUzZP6zFfMPSXNK1IOdeZ5WorcZsIZBn0+bv3ISGWQGpxFQhMUjJ+ct3HwCnRBDKv9AcUSiFotQ==","shasum":"e28b740596211d3dc6c32e986a771921325bda46","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.11cf2694.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB4GFCRA9TVsSAnZWagAAntgP/3TLPtCDXjmoG/vAWPKK\n9yNmEAz97mFj+faAy5yQg5EgH+UJnsdM2rPxMxatQSMuM0xGxZOE+9oNHzdq\n9zmq0rcw9/cXPgQmOaN+yBlw5Qm+c5QQ+NVCJY3x1Dkm5xvdYfuFR8khMUTg\nGg51TdZpF/sa4cOHXZTvBC46HL8SIYYyxNazDYLO0qMpxCCQfzMeBILgH2P6\n/0Hs2m/FgyVv+BbUaCRjztvupEOvBklp1O63C5EaUdVN2i0gosXCofPQYsGx\npwuEaO7tvue65LgpjuPEM8ff8rxVSPecz7SzE3G+/wAtCxGnh89Wk+Ml0mf3\nBf4b6m3zxNA0SuHDdQRUD36IL4cv4VvR46F5u+YKNEi5JgqmYEmiAUmETC8e\nI2AWnHlLHObD0EoBrAY4TYtLHeqPiJVk3haquCZ3usb1DPXheahQazNNQYQG\nS83PWAiOh+HVmCV3bLbKj1pHzzmF/P4llx2rVB40IuPLwrWa9p8Kb2BL0IiG\nAdTkUqlaMSLTgXvdBJbqK7N2m7QAYyUNzq2uSAEe1ay77Or8HTZpBZu5aU2J\npYerKA401LSSYX77YY28GSRQB8H6rnHWLXiP/ryejLrxVtNAKEiZ6lOr74I2\n8pPO4EfMPNTQunbymUNA7mMFVeukSNqycZtsVuPDzyTPJaktBAF0fVZ6cpqX\n0GIr\r\n=QMx5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACPCp4oOs3/qOQlYTnp5TriKuhrdfbdKvHmQ9wbI+IcAiEA0EHwaAgM9Ext/rmMrZCpFbh8ppZei3TC2lFCuCfyS6c="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.11cf2694.0_1594327428992_0.5110687796876991"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.436d66e9.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.436d66e9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.436d66e9.0","@material/mwc-textfield":"0.18.0-canary.436d66e9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"95b44ecddb7a4ad5662751540e79c58656790fa9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/95b44ecddb7a4ad5662751540e79c58656790fa9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/95b44ecddb7a4ad5662751540e79c58656790fa9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/95b44ecddb7a4ad5662751540e79c58656790fa9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/95b44ecddb7a4ad5662751540e79c58656790fa9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/95b44ecddb7a4ad5662751540e79c58656790fa9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/95b44ecddb7a4ad5662751540e79c58656790fa9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.436d66e9.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-1q/n2VHVVurY4Lih6oqyS+iYU4TEQ1OJCu+D7+S0tIOL8xbaWOGuDZabCFUDXd7mD+wmVmTS2iIprBKmLvKhDw==","shasum":"7a7a9745b0412aa5e08d1303657258d63f64326b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.436d66e9.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB4KlCRA9TVsSAnZWagAAt3wP/AgZZGSZlm0H8RhlItD2\ndFCbSZRcLfIfd4WqO+fSIkX4PU9Cj1xedR37KK8tky+vv4sy0+EBiMT9to5V\n1vjwEctGc5I7JArpnIAmjB6Y1LLztRVz+o1sd66eU3FIw29UoOAwJLN8INaE\nBDxaB8qIENpfxvkEtR7AOvwIUmJuFcMETwd1qlWSPu0//5idmBiSOC4N5Puk\nIvn2MGTxbZgt9yv1xheFzdCc8wg2Q9l6RuCZ8stjxsB/dYGfK0dcp6Dkd2Zz\nEKddRhUaIV+6BNVD8ZF/sN4BdlOfFIBKDGdR9TZvNcUteISuuT3m8tNc5jF8\nkzCLgv9S0Z5bK4H2TQUtIszdQdTfmSFZF2JMCqxLy3xhQ8E2CEvD5O2h0xuZ\n8DHEEPQ9gYNyz0XRK/hAd+wPAnKByOdJ1jPks+QkOAmOO9FCTraTkBMtVQR5\nhQ2aUW0JvETTFyoskOegNyTYBH2OONGoDeJQbPf6j489C2GPFb+h+HZSN4R0\n5XzH6BJnMOQsJI7sYfXZ3Dv/5OtldL3s7Hvrj9nOBxkwFw3r/goTppb2XFrb\nEGtxyV5R66bp8pX9st2KTN0CpW4vjeI3Wolo1u3rMYkHhPAhtf74mlz/xvXt\nhLWI+rGg4M73lgN5lBgGuVDzjP/fsQQ9i6tlSm9VUyoZc2xa0/otvF+nNETr\nnqt1\r\n=nCY4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEa9a8HFWGd8QCb45nHv0K2lzrBJXPBGrto7s2YK5WhAAiBweB78q5amNX5bT5Xf1o7gdecYQzdbVUOiGY6tk7sMow=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.436d66e9.0_1594327717124_0.9732297537555441"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.3a44d36b.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.3a44d36b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.3a44d36b.0","@material/mwc-textfield":"0.18.0-canary.3a44d36b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2cc46bce7534ef7046c58891f32fd054a1fa8b3f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2cc46bce7534ef7046c58891f32fd054a1fa8b3f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2cc46bce7534ef7046c58891f32fd054a1fa8b3f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2cc46bce7534ef7046c58891f32fd054a1fa8b3f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2cc46bce7534ef7046c58891f32fd054a1fa8b3f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2cc46bce7534ef7046c58891f32fd054a1fa8b3f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2cc46bce7534ef7046c58891f32fd054a1fa8b3f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.3a44d36b.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-5RSHIIJIpo68jOczo6s6z341sRYz55cgk1xHFMZ9pwAvBReBE1ewaStjD1SyNqXMz0JThEz/s69pzzm854JE3A==","shasum":"55c880defae77a85c1e704153414a869e8db71d7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.3a44d36b.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB7hSCRA9TVsSAnZWagAAnvoP/1zU/IWM6T6wcEQMJDrJ\nw+q2LwLtBdK9UQeBgBpSVXO19Ux3cJf/BxLvUcEeARjlVtyZnocWD4HTtYSd\nxoB2aJVpkDghFxevG0KU49aGfhZWG3/98chaDVXvI8HKWzpJluNG0scyJhsP\n8uK6Qfx+u/nESCwxy7+xjqaqpcn0jwYiUjSUkn4F4X6gMeeJwvWvc30oOTmu\nufnUUBQadu9PBUEKAdV7B/3wUCZxsF7kYICfIQkebGTRYXiSWA6754ITeool\n4POaNgcMBdTJfaH/OdrGrKKLDHrsqNn++1wZHztthRidNlaqENfxkw5AEqY1\nB2vhhq//PK4+EUC+rwRul85br5/C2yUTXioJ7IKBD+2Tps8ufGB4k477x7zf\nKKaBcQbvLoLG6esP0wh4+f6D5UhLIMG3ediR8gtHCh1Vv6ccIBG83Lgb63BM\n61iLD41BHfl62HUUWvReE10elGluMEmRRvyJ+PmIfQA2x3pKBhZAO+K7kLzi\nW99Tv0+5LVr4rAiLlkKjhdAwPy7v5mq9vsbecisfiSCb0iDh0AsNZ50tUSy1\nRJ0L11e/3O3x+y3dLUpu2kKNuXXxs7EIl8SfeS6xLB8Tulsnwni+vBDo8YF7\nG61eblYzmLxUnRyPqZ5XPrs9WWKK2R33vtZIomGe3Fv3xvbxKT0ZiL7VWlfC\nypTp\r\n=m2k1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDWZ+qtiIQf8BdFlgslBNZ4dmB1dM5ja7c9XxJUXzlQAIgEGO8abV8yKuz3tKs8mjEz7S4SReiiC1QT+UeD64+AD8="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.3a44d36b.0_1594341458303_0.4415631286812416"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.ec11ae6e.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.ec11ae6e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.ec11ae6e.0","@material/mwc-textfield":"0.18.0-canary.ec11ae6e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e68c3fdbbceeb46e346d694dad4b236fc74713cf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e68c3fdbbceeb46e346d694dad4b236fc74713cf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e68c3fdbbceeb46e346d694dad4b236fc74713cf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e68c3fdbbceeb46e346d694dad4b236fc74713cf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e68c3fdbbceeb46e346d694dad4b236fc74713cf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e68c3fdbbceeb46e346d694dad4b236fc74713cf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e68c3fdbbceeb46e346d694dad4b236fc74713cf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.ec11ae6e.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-6fIGau02UrwtMcD3okWKWla7tcr9OJyvHxEg4YpwsDoH9IVREMSTipaGv7ZCo8/eqca2MOJTPHBNN9X40H/0JQ==","shasum":"a25aa6a3e7be80c8e68e1fdde96a3809dc977995","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.ec11ae6e.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCKsUCRA9TVsSAnZWagAAansQAJLtvQoqKnNPH3fgMsYU\nMh/XYKTuk9VpeLJLG9ORjAfnD7nLTYqpJX2uuxyrHq7D6Ff+RDbczgoVXjpB\nuJ1APYAmBI/lZwxZmc936imgQY5UyYEcprnEbct8ZEXV6+RKQI5w+THGbX6A\nKjiWgwOjUcphbyNnPu1lF1dlpBDhEVSZHghqjFrPBbkg5yUQaddSJ1oJnY8A\nJWJilzJqAiD7W3UMrfg9AaVGPVX9lpkQ9eghEaZ6l0oNJCj0d4XoNwG3mggd\n/lI/6Xza9XGC/fdwgW+wz8+4Tw+iiPg8T1yXIAwF8Vio0QVKU1NvIv6+h8k0\nW8AtF5c2gydu+rhTqUd10NdGZIJnhKFLpSbOvbUsb1o6dtGGL/xjpDd4x/MX\nO8g5qOUlw+I3tKL4tLk6WOAR4wDSS5Wqw8JXZLjYtzyc/pnu61uWgRttTDGD\nV/vMS2wyCHdCD30PCwgEMc1p6D3i12eaZgWIQdMoKeXN4vTNzDVf7sr46wgz\nZ71SholXjPZDlqJ3hQkddSUjQdLhgirgn+kPb55rHPIQh1f4TQg7EGzvppEe\nCrhFEiHqIJx+SNY3c99+yIu/ktxFs7L6QqhfKrwTQdMkhXc/ohLnLWkDfC15\n+LCPHJdUJZwj1EbauIccB4r7WVuFtp341+3J8ZXmKx9QJotySeV4PMlXwGOD\nqVix\r\n=C5YJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzZJ7UWAphBi/GMMJYG7Kkn1lbicZDp/OVSTbzxphdyAiASuqMALKNHBaUTvafu/jdUqmjSBwFYHTpz554iAnoAXw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.ec11ae6e.0_1594403604223_0.4129929503442644"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.17f6cf27.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.17f6cf27.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.17f6cf27.0","@material/mwc-textfield":"0.18.0-canary.17f6cf27.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a622acf92b818bebef7c3f77eb5296521068d267","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a622acf92b818bebef7c3f77eb5296521068d267/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a622acf92b818bebef7c3f77eb5296521068d267/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a622acf92b818bebef7c3f77eb5296521068d267/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a622acf92b818bebef7c3f77eb5296521068d267/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a622acf92b818bebef7c3f77eb5296521068d267/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a622acf92b818bebef7c3f77eb5296521068d267/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.17f6cf27.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-t+Tn2LoiiIOK5T4K4TW001KKz8JXxpf3yVguYcS74od+OScgtPuF9geZFsUulchyzaYemGwMNH1gxCHuu41MQg==","shasum":"7eaa29c3371358aca20bec4d40b16f8214cc8988","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.17f6cf27.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCLRhCRA9TVsSAnZWagAAjawP/i5Pk6wptRqHUYYcaYij\ngFOlbkqlw4Uwpn0+RhqCc9gb25tTNlJ5Bdtv+kBnZje0Dl0LYvZe2l3mB0sN\nu5cJHqckZc4V2G/7QYN934SZARqoUbRZ21sDvd97fLWUx8DSn+KCh9TK3zza\niFDA7/ibXuv49Rh2NGa+NeXlHGm4YSUssjLnM2TY7QADKnUYljI00hjUWbOY\nYT4JQKHhhi5CdIOHCroPptxsjZ4j0q/9DEUceGwC5/uN50HL4q+R979QoeAr\nxqbL+w8Fc5jITJ8Y8QqROTdLqt6A7ull+iRD4eNi++0EqhUv0DvdlQs8vvQQ\nOw1OCXvqcr8vkoMAig8iyXJa6Nq6suly20pddPMrWpr4XvmnyxBYy96HdLUX\n+rOZTALXIB0geFzkGwNumBrCJAcUXTGCC/FeTl8SKxDOZeGZERYvyH3mJb5I\nVb894OkI3r5/SS/cXVIOgpn1NbAxd5Jk1Eyh0mK11IUsrw05alMyDNC9I5o/\nze2i0PCBeeKPHpC9j10a3gKs735DgAsXpSomBzQPswHqy2yg0BWqlzSECsSj\n+Vv+zNGMQlO0aiymVZn3vEzzFSrhQsoTFUxJqDvffaMsO2kcwSAGYgQ//Own\nFyx/K/MqYOc6+N30SQv6xTv2i7QEWykqeETPs11ULzJAnEQSuRRsK2UUa+Yo\nB3Rr\r\n=DeSs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDV9DIe9NBId+3ciyughlZ/5zDfuGF5vBRt5n5P2oGkTAiEAmv3TZlyXYT+0iIvD7N0ID7Dl6hr8YtWnIX/Uwx16pcI="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.17f6cf27.0_1594405984860_0.7499954255756485"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.efdfbc21.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.efdfbc21.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.efdfbc21.0","@material/mwc-textfield":"0.18.0-canary.efdfbc21.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d0c5bf147bc31e55a775562b113790bac6052eed","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0c5bf147bc31e55a775562b113790bac6052eed/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0c5bf147bc31e55a775562b113790bac6052eed/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0c5bf147bc31e55a775562b113790bac6052eed/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0c5bf147bc31e55a775562b113790bac6052eed/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0c5bf147bc31e55a775562b113790bac6052eed/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0c5bf147bc31e55a775562b113790bac6052eed/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.efdfbc21.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-GQFU6PoY56Z1Eyu42OzW3HxiAl7/sEgzpGj8mIuz+mFSjmrBwg0vrdIk+4LZFtyiXvGZnZfWEoQvaZm0Sy0UfA==","shasum":"ad3d3ba7a3fd8dbefa4f52f2bead11cdcd07e488","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.efdfbc21.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCLcmCRA9TVsSAnZWagAAvMgP+QFgGFv+daUSd54A70w3\neWcPVIUGye/kyT4mDrGDkQOD/PtZiD4E1TgDnQ1ZEc/ULeuNet/LSJPf+KWF\n4sIEzahj+zLtSA9i8sbdARk51bEXDhBvXJxaIz3yjrz9C7RDOwY3qTb9Pnfk\n3NUFrSxWpWEG52EM1UskzSWqotI025U5NN5u9o7xSaQEN2YTHWrRbvvw6h/Q\n5vQ6f0LXskNAAoW9Wdaw55syxFDVPPFdrzRCxIeBq6tlIiQW2S33dsHzghix\nCVM7B+eYl34k9fqxlNzdyrF/YwQLixquDjBULcwOpKKfLwIy7g0JJUo5MQgK\nsHfZTLNCkEmWW7BqRP3Nr3q3Czl5edyky3A9pt28EImgzpm5mPROSnQN40tz\nZoW5Tykr0pOxRFzl+xdez6myh9qnV07it3KOS8gId2DwtkSy1fOCQ6ICs4ay\n8WqqoHRVfffLtz8J0wuYWnzRjz6EExwts1EYlki7QVvoJfoeGH6ZW885Lm9t\nlOb4UF/JvcOZwhcXLTlgdz81ZT75cLlIjGW7qBBRlM5DPwrdcu1m9G6JSYrp\nZ3/MovSHqjF1zs+JXEIWO3/IAyS2xf6doMoAghoGMCbKQO6cL/bWDQY8N1yk\nHs8sbWSyzOfA4eke02gJtPLBGeiHWr5TtUtxK4tCHxzbsNYW49L8TMNDLwL1\nTVm7\r\n=xgmw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYCr1w28vWlu6OeQVZyniwmCAQ1i0K/rmLT5B3SZiV1AiAIL81m0vt5aUJTLQC8LpUMDSpgf6tmVlp+8ZlF4zuW0g=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.efdfbc21.0_1594406693840_0.19155586230154986"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.bae4339a.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.bae4339a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.bae4339a.0","@material/mwc-textfield":"0.18.0-canary.bae4339a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3b615d0a523f0cb1bc5f7f0c0f7ca6eb5f52ee63/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.bae4339a.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-pY8B1Ll4mx4QQkGLEv2irEHRtNbOl4lL2fuQh/9isj5h8lKtb1phnxyuXJHVWg2CUlXS1ewOlDx4uVJ4QkSXIQ==","shasum":"958ce877033e5a002a22949efd97b44ad5077082","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.bae4339a.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDeBoCRA9TVsSAnZWagAAVigQAJxtRGMMoUG0KPWswwfH\nhfvE2pMn86ytYYW+ymBpLHLgEKJeqiJF3i2rcbgg7n8R+Hi5eCIr6WTKJ5Ao\nwVjDlplzISGc833LO8SG5h15/jW8tapwdoKLufUwy52ENgQW5j9N4P0zXFQt\nnDM9PHnP09+GbVRIkBqOlFy2+glEUNm9pAMg8Y6ZSokpR0Za3vCtcJovbPFk\nDuWoCMt3Gcrnf2V1oCw6mip4fgyj9r2EdExs+SFMKMMxn5A/qtDCT6w5sHM/\nxqzo31HaWP7N6hyswPP6YhkBHoULxxyTS6+VkWB4BrZy9dq50kQfENQ8k5Cc\n0gnq1/GWdAyesDjw7LT0PWm/v9poeU3oHCPXDooO4Uj2WhbVO4mu8VfG+GhU\nGJp2LffNuRX7qIfmF/0RLR3kQNhojV1U1FKeRVCBUPU+SrRVDYKqmf5J8JDH\ntPIq77X7rIJWHrZkMo5nLK3ztTbkZ+OJ7QLMXZSL390IcUBZC4GC/TjbrD/e\nw4E3qdZI8JlrhIzBWglaPYS8A3jloO2rQbl9SpKoMYPfdNZAXN2rnWxn6vF7\nk/SiQcNVcx03Za6lEOe0CXrVh9iv7npyLywyYM6oPryielsxbyYkiHY1yAe+\nlFyIRPiMFK+5M16c6oCHH+iAJfmIA8tmam2hGYco2tYRGfw1imfH/z/f/Sle\nwYmi\r\n=2Nmi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGoQGw71llbva5z6uYClLRZp3IqBjZQODBGAu6WKK0XwIhAKixnJhcsRgS5b4z0OfdWrekQXEkQDRPojFMlPf0Vw7L"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.bae4339a.0_1594744935623_0.6259253644045637"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.28eac13b.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.28eac13b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.28eac13b.0","@material/mwc-textfield":"0.18.0-canary.28eac13b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"26d5b26372c667630c62d9894c9825aec9e06f60","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/26d5b26372c667630c62d9894c9825aec9e06f60/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/26d5b26372c667630c62d9894c9825aec9e06f60/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/26d5b26372c667630c62d9894c9825aec9e06f60/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/26d5b26372c667630c62d9894c9825aec9e06f60/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/26d5b26372c667630c62d9894c9825aec9e06f60/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/26d5b26372c667630c62d9894c9825aec9e06f60/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.28eac13b.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-i7SC0S2u/3qStOx3D2FfTTggCHRPddwI1yTE+XOdtGlQ/enpQk/sEQ0DE7mZV8QIFc82bttOv+7S2HrDWGXc9A==","shasum":"f22def973f7562edba5cf2dca83cb75bd722bdb4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.28eac13b.0.tgz","fileCount":16,"unpackedSize":184648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDjBwCRA9TVsSAnZWagAA37wP/jAuE/cIrIEo0xXdV1rM\ncrm6/r1j4nNTd+l48TlnAuzi4Aep4kdQT4HhKlFbB9PSjjF5lzKfJq/zTqp9\nO0T1RC9X+4zBANfE0dQcTEAA+XHGNRVPCZ6d/2Cbe7SPLR3tvMRJHLdF8Zam\nhgr3ho70cVUBfRTBH7hJp5hNg2hg2pr0JBVsUbd+mpDNFYDMjddlAZ5cLN0B\nOs56hbzrR1v2nC76YlqCTW5f+gkh7NOqWEJrf9OfCCJ5PB0DY1Rcs+ShBGO5\nJ/qeXT2BOnhjDFn9JiCZPsIFBN+bEklKnAfz0SVvKS2/LFvFR2aRl+EWAFlk\ny9t09LE4sMNZigP2OV9o3H2RraNO8vC18GNdAWjjoL6EjROwh0C1x9ltByNn\nPrSl3cpwZi/Ztc2zXl5f0V8/bczCPFCVWycLNO1kWGIwL8UA0xA82gl75LV5\nFdpBEowqsEEv4UBlQjZLifsVsVJtIeq/9DBFkCza0qlj+/nBQcFgPRjLMgwW\nW9hfNKsrcwuhiW21sISWyT8HwfDxJ33dYSomcbXW6rOac+9mL1Qp7xemIEZn\nXGCTHjA2liNKT3yJbT7XkwO3LI4crpUSBf2/vX3xExuvrNOxrc9qd4ceE9AV\n8waFG+in1Yo8bz4I1BQJL2vOZGNPxu059+vs6HwkIK7hNleHGn+lARgsHQEF\nMePz\r\n=vQRp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL1prZd6W88S/WXYQdOMQSTeLPRPh/n8AhGUPcVq6Q6gIhANvEfLzfa1M5uU28a6x8f3xczOB5Xm+KkeM9C0T0Seha"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.28eac13b.0_1594765423829_0.6531001517386599"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.44966b65.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.44966b65.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.44966b65.0","@material/mwc-textfield":"0.18.0-canary.44966b65.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e431cd0a71967599b61ba4219d726819807947ae","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e431cd0a71967599b61ba4219d726819807947ae/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e431cd0a71967599b61ba4219d726819807947ae/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e431cd0a71967599b61ba4219d726819807947ae/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e431cd0a71967599b61ba4219d726819807947ae/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e431cd0a71967599b61ba4219d726819807947ae/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e431cd0a71967599b61ba4219d726819807947ae/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.44966b65.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-pVrqPlY6wQWpOk5SOJaoQOgUN7JUx6jGYpT15vS04EUwF8Je/rqo49OIQKQF4utpr4gxZamYWJgREtYd1MoKbw==","shasum":"630eea7971c256ed64433c54661126c88f983a72","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.44966b65.0.tgz","fileCount":16,"unpackedSize":185629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD0VZCRA9TVsSAnZWagAAV14P/1kV4O0KcIN/LLIkVK39\nfMMNcl3j/T0W9hrK/Lczk9GWtU2GqWn76AAqBxayMY2mTxv80SGkdg8uk1E6\ndNt1Z654Iii4SBf0RNHIR22Zh8MnBAjHVNfcqWC7MuqCgxiPtpxK16pTAP1P\nTsFxhbD7NT8/W7KV8zG0hBMTX+a9YRauIWEfjckDlGt3gPToM4sD403oEbVI\nM9P1ozkdICpHIYS63SoNMgQDvBZumQLl412JGkOnbetl0rnxAEY1eRC42mcZ\nzwyCkoqgTlwgiq+PcPgztroFEIxc4xohHEhUK+qwVkJIHz4VNpbHhpmCkaXS\nikuySt7rp6hkBK/ldSAnr0javIs/RUi9erZ0Nxbzc2sPIsekw07LpzJUi948\n9hZ8ANXQ86hkk1SjQouemIl0b92oTQSOnD7gx+p8O99fvVGMdHzO+8csZlJD\nAmLkQR6/+VqBfX2l9OeAg7ConU919QDaiiKobbEn1jCBZRHHUM5Q2cn1BKJb\nxTNC6Aqs9fEWGwNW3oLB9e/lQiExlF4nHOQLJuwPt6sdet6hJCzJ09gGNOU8\nHV4VDiDN22cGdmAnZNQCGjCCaZ48YpY3dy0EDvlrcjAvezNyLO14TXvVfHTn\nnqfY8I3zIXtbpaIG7bToTEM5ndcmen3NPAzBXBvFnCgPKq6ytyV1S74dbfxm\nSHtS\r\n=D67L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXdQIJB/8S5vpKDQ3CVCyVtAWrGtBVrd47FcMf2TAnuAIhAMusNCcrAS9cgpRcI6U04xxxb5r66iBBaQk269YSGauV"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.44966b65.0_1594836312846_0.020544587758887456"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.3ef0ef60.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.3ef0ef60.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.3ef0ef60.0","@material/mwc-textfield":"0.18.0-canary.3ef0ef60.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6fd176476c86425b826862155a44202aed930407","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6fd176476c86425b826862155a44202aed930407/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6fd176476c86425b826862155a44202aed930407/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6fd176476c86425b826862155a44202aed930407/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6fd176476c86425b826862155a44202aed930407/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6fd176476c86425b826862155a44202aed930407/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6fd176476c86425b826862155a44202aed930407/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.3ef0ef60.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-pbpGSgkagwMQb5JlCLCsINlhugQ0/Jya0BREh4QnzvBPvzSKcroprw4zSiwq/6PSxWSTeyx82lSTTwq/125L3g==","shasum":"25041ac2752395f40aa7fbf0313e389ab044f3cc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.3ef0ef60.0.tgz","fileCount":16,"unpackedSize":185629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEIZoCRA9TVsSAnZWagAA5qEP/0TNTUJFdHylWKpHrmv7\nA4rl3TSNdpi/uxVtbYijy+E6n7V144P9JozUo+iYN3vSaKwspcbHmfuihOBt\nkRetVJVS+SuEVijrjcJXHt0+lXLpWZxvzXvis8GdAF9q7LMcATYwyFIK9z2W\nUaPErUjxsFHqGQCCU+qdotrkYSUdFwWoYmSYh/uQCWwi1nlt3JvobMVLLUDx\nXgmXtVTzHXJJeM0b9LRYljLPp9saEjgyS0Jo3fb0HeyZdJ2b/YD62heC9Cg2\n20MMQBfGQRl+Dh58U0CAEeMsxECW7vMOvIwvFL+INSXQBLofFzwpYYf28laP\nc3CeMT5jSLEoLW5gUuE6orMrUjGjizPyT6b9DQz2zJFtLlf0lshVg1r08gs3\nYOr1KusJssksJqq5ZUyCNmgD6VDzvxxY7GPnjt8MLB3Kb0hW9oVtN0Na3O1r\ncl0VYkTW4ESvC/D1ognFJHl/HXyZOSxtrlv5VPEUL0YhQUoXdViDeLHwvKxz\njA8pRvLHUOf4kYR3i90KqrdYMXr07NFXkR8sWCXlyVEgJs9m19LWPvU1ntxU\nfPkZccMl5iCfVjzT6WYn/UXajs9kmazve3xxgMhctRuqAoIewz907UWsqHRz\n6goKAwxUEkcPn1+JxVi9H32EcsBb5fuFrR4dN7nJm+AZ1W0dNzZ61vpa0jm9\nYtks\r\n=oToJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCh/rCQNHlzluQUivIu+8uC4nXj/x4Pl1GY30fwY8BJawIhAKHI4hxqcWkNmPLhBGA+f5MGJ1l73zs9pubWKKmfg3OI"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.3ef0ef60.0_1594918503979_0.944684120339784"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.fcebf9e6.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.fcebf9e6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.fcebf9e6.0","@material/mwc-textfield":"0.18.0-canary.fcebf9e6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"27c24842ba1b663ca72b52321d89d72fc7ef34ff","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27c24842ba1b663ca72b52321d89d72fc7ef34ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27c24842ba1b663ca72b52321d89d72fc7ef34ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27c24842ba1b663ca72b52321d89d72fc7ef34ff/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27c24842ba1b663ca72b52321d89d72fc7ef34ff/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27c24842ba1b663ca72b52321d89d72fc7ef34ff/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/27c24842ba1b663ca72b52321d89d72fc7ef34ff/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.fcebf9e6.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-uy3b1NQ4D5hk13JXk5277twFrhgsnWBEaohPmBzx17aCPUN8jkkcmQVpANHZj6leNuBhurbMiTGUV6MLJ+U15g==","shasum":"958b8de20c77d33fe99fa0a9aacbca162df9b4df","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.fcebf9e6.0.tgz","fileCount":16,"unpackedSize":185629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFeZ9CRA9TVsSAnZWagAAnOIP/2u1lmIahE0Yim+t7w/7\n85Wj7tQNl0DchiLOadrS54zfEeObaHzX/y9dc9ghDHWKZNKYvF4U44g+P888\nnuTdd84RcXRo95X7Dp0y8Xtdnc5zp4xJlxGTn2KzVwL/u1TtuWJyl7XLXLIY\niaeMH/JN0/7nD6bJPHGtMqGfCKJnCgmA+rFJ+exPnLQXGSHjGAq8HKvkXens\nt1nKILBBK8xJYgDMtnchrW16dAKIJuuOuuTE450+nMnItnF9hBn1SSjkdspq\nbdKVWNlBb3f53bWZdygkqCwwXrhyekK9NlQg40hcGIKcIX7Jh1HWURnh9Diw\nO7ghuW2g/Q9CAsGiZ7LlsOwso7EeS+1ysrHtOgspKRCW+5f0gfKXFhyiC46Z\n/OwUC7wWM7LuTwij/autl/X3qa/pPbsvLAkXFkdM6UyCnK/y/Y67HNUcsVqr\ngSfBpn7fONeTvF9EnGqPHKhmhdnLTHJd0v5WzBH0cK2QIqCVWZGpC8K6Mic9\ndrKe81BXgKUlIkj0HHN7WUZa4oRgwogVfNqxkYM03jdvmAwuy5MU8+7Cr0PP\ngiDWGjG4fMwe/qPvB3wzlUDZMKFfYlLMnkBoDmJ3UtWLQblVIws3q54sc8mV\n4CYpgToq/4KsnSnN6W8DadtO9Sc+W1FnDPtXWHYlBuXMpTMoZcxK511Kt7S/\nPr85\r\n=xVsM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYwElcW0iKyI+PoUEX8CpXg7x+9+dIf++j7JPeI3gKPwIgBmoR1mIxclr0DyLjfweHm083hbb+t5Uaq2yGaX2zmwg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.fcebf9e6.0_1595270780912_0.40941674381114357"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.b6a772df.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.b6a772df.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.b6a772df.0","@material/mwc-textfield":"0.18.0-canary.b6a772df.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"aff69a9137a8578f83238c4b15f6ef6447db7c80","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aff69a9137a8578f83238c4b15f6ef6447db7c80/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aff69a9137a8578f83238c4b15f6ef6447db7c80/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aff69a9137a8578f83238c4b15f6ef6447db7c80/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aff69a9137a8578f83238c4b15f6ef6447db7c80/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aff69a9137a8578f83238c4b15f6ef6447db7c80/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aff69a9137a8578f83238c4b15f6ef6447db7c80/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.b6a772df.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-EbTe742yvvbM/l5RuB0XED2f6AZry+hWZnt0XUBukFZFAn55MY5FvlXlEjN7o2WOd9sLZXX9M8tSkNxt7dHBBw==","shasum":"a7438c834f76ec7e672755db029521b3a6ad7298","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.b6a772df.0.tgz","fileCount":16,"unpackedSize":185629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFh7ZCRA9TVsSAnZWagAApD4P/1Tcy2bROgUnONc8YOjA\nQod5lmLS5mFw3y6pPLTkoqRgZOgJQRgPBB8NmIL+UVhgpFcDRPbRGBu52+OQ\nMHvoOkrG4KGet6r23JiisG8h6v/twbSQJTk2K4K7mBVyUNrQ5QioNRaDrxyQ\nq+/hFTKApiaj9YdiI7/2s337y2hxheCpx6DW59sKv17HR07HTabZtoVe7grv\nnCBwNOwaIqRbGyiqxNRxhxm2HNP80ijD6k5F64B0lUBjl/DwNHkgn3p3oX7D\ndO/rpEu7fCHHmsIUcsip3nlceCbESoadOjDBzBgQxZexPO1sayTdVRMQz1iP\nlaeWfKW2CPBrHX1vLjrU9zKEBhoUZQEuEvsuEiTV8Dn/2hDTWrN2Ov6DFKtU\nPdH2lCXZSXQgTe9CfGOus5n44NQGfyt7pMjjdacWmSjz+9MUXsnXdDflZDc6\nR+NgaRR7aI0IAWkgtbd4qna+kDqwZ+uxxfohrGPQSno4MGKhQmPnEucBC1+f\nrjssu3YOBo5++9Hf5QLgh2MoOhLfEmwlS2cTe/brqzJ+uhJYmpiz/wWAX4iD\nxGZBF4Rpep2N6SmVTVMiqG93PrWWZhM9YMi924ZOrJP/Soq/ipPuAyiZJTim\nZIA0B1gUN3Y/SDuE/zBgy/fuOszF2q1X6D8YPjGFUj7YIYmxIFQxCVVs8Eo8\n7occ\r\n=+bFu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvyk0xgy6+YUA4MSRKXcDSvVi5aECCdNZ1NYZOIhi4ZwIgO1HU0zfYWKgimq0iMW645F5qy+Fx6043r1eE5hTQZo0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.b6a772df.0_1595285208730_0.20987658928117314"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.f6a6ca38.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.f6a6ca38.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.f6a6ca38.0","@material/mwc-textfield":"0.18.0-canary.f6a6ca38.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"44166a768d79b9da90f97e27d954aa263d27b4b5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44166a768d79b9da90f97e27d954aa263d27b4b5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44166a768d79b9da90f97e27d954aa263d27b4b5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44166a768d79b9da90f97e27d954aa263d27b4b5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44166a768d79b9da90f97e27d954aa263d27b4b5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44166a768d79b9da90f97e27d954aa263d27b4b5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44166a768d79b9da90f97e27d954aa263d27b4b5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.f6a6ca38.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-hvcANhsTeuyMJOZ5LeArPJ5fWiBxRpYQzMJNjUZeIdT1cYzrU2KamnGHXDvMflebTNO0Mw/cwhhVBNqznB5QSQ==","shasum":"3f36fe8b487bfa5192874d0ed76568c0591e823a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.f6a6ca38.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFxqlCRA9TVsSAnZWagAAv7EQAJ8NY4SYgMf6Btl+4gMT\nW6KQPIGDgvGxwl3ktkdreWX/hnMect/LK6NVbKOWopxZ67tgdVRILdVuNC/w\nfN2VNVSh3nZ1FBJylfY+xHJbppzYc2WYATN3cIlpzdOa3WWZCP7eqByRdBnN\n6DXRxGGcAOAGhsZUOjnfg16mlgmOYfUnhRyQGcFepXkANqDih5hx2y/Ypmtw\nzPEiuMFJUyqVs6tZiY5IktkW7IcPcRQWQAD2addJlb4N8H5FzgdpiBeUXOVJ\n77fF6RzI3WekR1aJ8Kmh5N8QEhJlYRNFZWxV0zUfCWegMmqZjSWgV3zkRav4\nxuqPb4fC3vmspwEYCzLc8KG0solSxYMtQzta0usRR7izmCDiAO5pa5B4DLty\njmuRlYJjCk4Zvljk2M4gr2PQ+83Sr4zKkUr7ST55jeja/6+GkR8xd/tUG/jU\nCqDDny+GPOIVNmppPkI9mD/ohF74L9P9GaP+KVFvrY0Muvrf3RrifkGmZXtM\nEXLIRo3PPlqofPgfodoaj/bjwimAZyIY1srRXXC4YYk3W9LXJhAfc6OBWpwE\nTvCXDNXYzhXwUaKO+e85QU0+qJFuGFvLyrCYetaax2363nH1BXhykYeUXpx+\nHeLZaQV2dfEbo046pD500kC+kDd5oDduNh25gx1+vkURtx8PbbIgG0La+bW1\nZW2H\r\n=d/5o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9m7Ypr2XiQ5EtSbcR/LA4EJsQOfVru9cNTFLrduL9FAIgNv4k7qDCUEyYOiYyyfh/1KxajjiLE5sRAHBN6uD46Eo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.f6a6ca38.0_1595349668939_0.8634675990667326"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.647dd6b7.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.647dd6b7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.647dd6b7.0","@material/mwc-textfield":"0.18.0-canary.647dd6b7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ebb4e6346746ba552191ef32f6686136b75b1a6b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebb4e6346746ba552191ef32f6686136b75b1a6b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebb4e6346746ba552191ef32f6686136b75b1a6b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebb4e6346746ba552191ef32f6686136b75b1a6b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebb4e6346746ba552191ef32f6686136b75b1a6b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebb4e6346746ba552191ef32f6686136b75b1a6b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebb4e6346746ba552191ef32f6686136b75b1a6b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.647dd6b7.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-SM/i58eehhn+jtaClEUbTUE+mOK77E5Kyy41Qo8qJfJGLUkEb+s0mCUAivsRMSHo66P/6+JgQMZefpux/otETQ==","shasum":"fdc42823aa3424cba73cc7e8702d459da98e1100","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.647dd6b7.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFzedCRA9TVsSAnZWagAAE+AP/AmuwZbkRDrQ0urPFSPK\nPdUBr9JLUkWj6Ajw/hdfhPtDcXV1VlotLcUoUSxce+idYU+g7YVa73El+raw\nJW5ssMoAZrK2UbU9Wh+jRjmotjTwh/w+EU8YardMzZPKzA5q88muauvSguAK\nDc5BqsOq3uNZIK6bwb0EfgwLFtcn5bhhVOWIuTuJjSux8rn77JzpdZoElpQX\nvFhoja0suf5+dlZprahW75YzvFYajsN1dob3MU5Rr1VF9xvbMz9fEuZcFQ8y\n1+u1Qq1T2mEY6R7FMEYe7zhcJZI9UyDzaER/r6lZMpWHe3UKHeYC+MQU92NS\nWnGmmN58PrqBKSjcXxt23CTfjjntlNXzD44iRtoGNBF2c11CSLoCCBN0oHmF\n52eumbi47SuV6CvhrMlV9hi8r/JpMQsvim7rCuoZqwH1ozDDs9KQQKa2gCtJ\n9Qq8hB4PoDzbyzjN2Enjy8mDnmYvqCGVw0vDxBqz0+D8per4N+Jfy76qSD+0\nLppEPm/q+iSQNZZcAUU09PIvMgM2Wda1Awh30v7aoRR3rGWLlO2zEF5+UkhD\nFVIlb+UtRGcUe3wA3zDEwfrnpGm+GaXpu29jwgFMlewQPzhQ8/w2CivmTkj8\nVdpcv5CkB/SynXUfmbSToIutT1GnsbirEk8lhMRBAHMWU2nmcqVZcAvKRMqN\nzQR6\r\n=UrI2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIElo4us/UKQB1NLE85Oii9vFtz/HDbkNQDtk1x7Hbn0qAiAaNDdtDk1UEQj9nvnRya6RbyDsr141r8TmoVDWrtPzJw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.647dd6b7.0_1595357078589_0.22282955301230922"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.3cb7406f.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.3cb7406f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.3cb7406f.0","@material/mwc-textfield":"0.18.0-canary.3cb7406f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"18d8050825886f251014bddc9658829794a0010c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18d8050825886f251014bddc9658829794a0010c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18d8050825886f251014bddc9658829794a0010c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18d8050825886f251014bddc9658829794a0010c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18d8050825886f251014bddc9658829794a0010c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18d8050825886f251014bddc9658829794a0010c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18d8050825886f251014bddc9658829794a0010c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.3cb7406f.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-mYIP+QyOrLp0AEuCMMVvsFU08TShohcksVfzOw3LE4rDeOwEkBpzPKHHvfwfwDczIXOUCkGzaXZgasf41nWj+Q==","shasum":"7ddf55c0bf4aa54d337f5f83cdb1826bdeb5d772","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.3cb7406f.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGIwtCRA9TVsSAnZWagAAFykQAIZPCVPYR/dnxOCh2w8K\nMWPOrDgeaPl1VgDDqe151g6EZrIJKrp8lJEmiPk1Al366a2CZPcfegFnUWuu\nDxs57TQEnpeSMM1HA+WlmYEqAErBlx/APaTi8yiX8A5JzNyK1mXNrzi6zW3r\nV3xkci4UVhpjJWy0Zd8/ULdlvFWcxb8k+pjcBTylMaAOnat6bNlMysDX70GX\nMNkUZiUO4d3lgQqjdWaoLlHBsBbi/zb1bAWc1o51rWpMp9J0/WFR0ZwLwGDE\nEqnsrLEPGyp11PAPpZFbWdIoD0OHM6wfWAZinwe0hLOi2Z607LIJgqcsIQs7\n1/nsxiKLbGKKUTPhK1+hidsLxUH/umRJdSvpwnCl47Z0mPSEvW8T25Xarwv+\nThrws0Xj3NOWftFALkaTlgHrvG7TqDgrBzFGCei3LIVDht9FcU2o1cRJTdgJ\neLS2j+XycopZfj4k12Vc+tfjiFuCNWCkn22loYnwca+M8Xc6kUnoNtr5ZZRd\n0HivGO2B8gA+lEbvTJkXyqp4YlCdElLdcTeRtRSscqztljs5UTAyvKNXY8ka\nF4bp76PqMhu/H3//GHXyXjbpOYjAjgaqQhj3oI7l63gUHpY6e2Sa6Wm2XfDR\nmr4iM+DNKvL0z+EuGF2nlplEqrAdaJfmj5WisKkTFnsSexxaFmMpgndv+9Fu\nZVHc\r\n=4kyc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFQbzSIsTSDiTMOzakFSC+hEjvu9py98ugstX9nNLengIhAM8yXlzWqlt1irIEs4PxKlP5/dbHTwrd38OTPCu5Rdtt"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.3cb7406f.0_1595444269345_0.706436152890995"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.5717a5a1.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.5717a5a1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.5717a5a1.0","@material/mwc-textfield":"0.18.0-canary.5717a5a1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"80cfd9e67c10918291b4799451796c633cec6f96","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80cfd9e67c10918291b4799451796c633cec6f96/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80cfd9e67c10918291b4799451796c633cec6f96/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80cfd9e67c10918291b4799451796c633cec6f96/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80cfd9e67c10918291b4799451796c633cec6f96/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80cfd9e67c10918291b4799451796c633cec6f96/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80cfd9e67c10918291b4799451796c633cec6f96/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.5717a5a1.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-CTp4/jPz5V4qUzJKXVkzZj8PKWXEzBR/Yi0CafzrPzBek/G+JuG05iWhF/wdKwoMAiCN0xQsg9ZJtNZMEPmB6A==","shasum":"7bfc40fe70a468819d4a153298ba96a15f6acbc6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.5717a5a1.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGLI7CRA9TVsSAnZWagAACe4P/jF1AKV2KZsxujku1UGI\nuHmSOn5LK25LleYo2FHpcL0Mh3ReAAHdY8icYNNSrA9UbluWgx0DHgI0j4qn\nYnXPaEGuaAao2B4HYzIaa7AdVU2t6MHtuDlmsyboR5hRbutXFEn+unm+tqL2\nT9y+sV6E5he4fKjgF4Qc3RgjEIGGUaGKSYqWqbGPzFJ7XnHReT7jteWKFewH\nfPMbXE5leMTSpqUXBXwMu7yNq9VW+DfZRJV1C14q9yuOrnY6ZRAzXIKVBbbn\ntCIWTXABiKMSYCoVhurl8ILcIDjh+xckawOJG1ntVrtVARnrP6IcOWwoH23t\n+yiRNfxABSltcISWXFy2EpAZrwTAtMwS2MVH+mHOS9S0oQHoFA9ICwEcHZ9C\nFk6UIjookFOSamPtaSL4AbANFrd1Wc2dOZGZ7lbgGN+6rzMHboOvcuR2RzS9\nMzYmOcEUi6lmxGxAewUYn16/6vRqUhHDhQJteVpwUnMpGPlI6AXOufs5tk3x\nqAs0RJUS0S3hDoWf4sdMT/i9vrVxQ3a+uhiL/ozFTrfq9aH8LYbBps42/7bC\npMCaXKEiOuBPZ4mpD/XxUjW7svFQ+N2OJIxbzuPr8EvtIF0x0YADVZxkPjC6\npDoZN1kjlYfObtwOMcnLknNxDW2nNsvNBGMZnI46CZJTXIWBq64+I1dLx5q2\n1tTt\r\n=o5Jx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnPDkzoF87lDF6Wt4NzHMFPwUbp9zpaO6/fYZlvcSeWAIgKfBuunauiWAXjUUjnKDW2DAX8PqVQfRw7sA73tPaU8o="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.5717a5a1.0_1595454011204_0.6447067260635513"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.d84cd4b2.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.d84cd4b2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.d84cd4b2.0","@material/mwc-textfield":"0.18.0-canary.d84cd4b2.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c90ecef90fa937fc0931100e4f1d3627211865dc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c90ecef90fa937fc0931100e4f1d3627211865dc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c90ecef90fa937fc0931100e4f1d3627211865dc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c90ecef90fa937fc0931100e4f1d3627211865dc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c90ecef90fa937fc0931100e4f1d3627211865dc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c90ecef90fa937fc0931100e4f1d3627211865dc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c90ecef90fa937fc0931100e4f1d3627211865dc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.d84cd4b2.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-c/V6EvysYM1VGxiWPozs6HHp+yoGftMIHMmxycn1LitNH+qGOKdjL0VurxoqzAV5gztp/3vZ/xtxuRyQhcBhyg==","shasum":"12e6a5cf3941095926f4ff2cce7f1facf4ff8b76","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.d84cd4b2.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGLK2CRA9TVsSAnZWagAAiA8P/AltqTgVIW1vyAadFdCs\ntxp3DNuhcF0cv2y1+k+T08WcT+wAsTpk8MTkgRTHAikRaaREzv5SnX4mbhr9\n9+iknEUbaAy2I0+Sf7n7IIUFjzH3spIC1igXlEgDhOmlytaFkru/t3GLKvrD\nv3Dv1zA8XXwzuEOoqr56mbt6OUIlXOhOXwjelgk1u/2vyHzIBSzvVIGYnyr2\nD+WigWcb/381/FYCU0TqkcnrtZg1I8sq+oZNE4TBamp0i4d5qK4AS44vX/bz\n/9iomv/wIf1PZceyvpVoDbdfzmJyPdDpKslkmQWk5z2yMsUcs2+lG2KKWTjV\n0w6xbb6XPUjIDp3GsMF0b6svtpvJLDoE4FOImzGuQbngUvhPkGGhho2EEUO6\nbe2rqRZEABgzEmhxN87WZEHWo8k+w0mhmL2lBWDaNNFLsHHtUgzyhyXLG8wm\nBeB3b7k2LFShZlJbm9VrP+tHlr6mWRTtpKHMhd60U9LOn82KHNpm8Gh3CVgL\nljefsVg4Dyqf+qRe9dj7XqaOqvpZN4yNMPOy7d7C4wpIm2OT8ov5uYLent82\nDG1Qoz+4TraZNM0/al+m8kQ6xPhx8uk6WsOuqzc2uwbs5haT/IZV9sgIN5ZN\nHMdUBcoCzwVtM47JpVCk6jZQLW986Rhq39/ik+VyAB7ejWr2/yR10BZ/ad0I\nufqA\r\n=BNTe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcFLxIdCrB8yx55lX7+HKPMdVwIV/79H6v6oLMudtCLAiAjwJLbsUIgfqitMTzhSl2YwxlHrVFtkuCfBs3ZPzfPYA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.d84cd4b2.0_1595454134309_0.3559548348297885"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.f279e7fc.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.f279e7fc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.f279e7fc.0","@material/mwc-textfield":"0.18.0-canary.f279e7fc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"73c3335df275cf5fb17f3b990df9c4b8184ce3ed","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/73c3335df275cf5fb17f3b990df9c4b8184ce3ed/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/73c3335df275cf5fb17f3b990df9c4b8184ce3ed/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/73c3335df275cf5fb17f3b990df9c4b8184ce3ed/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/73c3335df275cf5fb17f3b990df9c4b8184ce3ed/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/73c3335df275cf5fb17f3b990df9c4b8184ce3ed/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/73c3335df275cf5fb17f3b990df9c4b8184ce3ed/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.f279e7fc.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-WYulpZ4n/IDNV5FIeBUy/Jt2HWflJD0XwreVqT5WoL4J3nAi8UspKEd3yVoRlnIYYufXKr0PgnpjYarUmJzMYA==","shasum":"607a23a7acdcf14a7ff6e870a8e469e506f073ad","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.f279e7fc.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGLcjCRA9TVsSAnZWagAAzNQP/3zYhdVZIAnJWYDJ7AVf\nOhtrqEebA/W4vw/YanHWuR79y4noOnusHs13mwTByKhVMHCVXuUHiZjKNORB\nDM8NA6SUH0IfHmGwbI/B22OEtytFGcrlOR1LWkolR5CQe2EbS4hXm9I5f2iI\nApqtSJI/zTJ11vEhMj17mw00p8saelk1NDR5dzxTReRQkmIUALaw7o3sKwra\nrUKZPx18+xqsObqAIEx0goN3Lrefj8E4grluF/AcBIR7ErbWy+S4GNTLcfjz\n6vrb0JawUq2/d0QQ86kshMq707oaODqgWznGhQa1Ys+dInySShCP/Fn1LaaJ\n6VFCAy66aWiF/kPlDpwZeqRXhxNxz/Nmhfy/cWR1VLppa9SsYhIeOwyGTADZ\no7ri6MVxDeAA6ECxQo6iPt6LiexajkldLMn5FwPVURmbGaGFAaegdql9KHOA\nJhWtXHxT02CKgWFWN6huTdS3qBxrskH5MouS0OdsKJLhKujlMvbOpYiD+E9U\niyUtuZJvFeCCxaA+sBHfPG64ssd0vOPafxQTFUXkHJyl/5saIsWL8YycvYxC\nNeyNkHYcK3DYJyjG9FCilpzytSd2LduBhubRFRw0k/8Gy2chQKWjNkMTZn+Y\nB+LX+q0+7woihWPrhpsUZe8U5OroDSwBXgtxxc+U4JTr1Al1782+qfv3gkpA\nlvsZ\r\n=TGOM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICugtmAwQMAXguO6nyy+WrIepBcOXf/GcL88VLz5MQzMAiEAgQmSh6zYJTTiZN8GvW3T9lBsaF2yschs0eIC83CB8Uc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.f279e7fc.0_1595455266655_0.17237285328249796"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.f181e3bc.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.f181e3bc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.f181e3bc.0","@material/mwc-textfield":"0.18.0-canary.f181e3bc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"33201638ca11f3c34598273b4ab4ec40bb019951","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33201638ca11f3c34598273b4ab4ec40bb019951/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33201638ca11f3c34598273b4ab4ec40bb019951/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33201638ca11f3c34598273b4ab4ec40bb019951/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33201638ca11f3c34598273b4ab4ec40bb019951/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33201638ca11f3c34598273b4ab4ec40bb019951/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33201638ca11f3c34598273b4ab4ec40bb019951/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.f181e3bc.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-MqyO32DDLzWnI3dyUC4X8M/30S3ErrCXgbhCf4aYfHiPZuIGiPwepEposEqD8MoiRrSDXruIj9mwcWzVOPYjEg==","shasum":"81ef89620f013bb5f1b1f09bbc3bf3051a1c9b0c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.f181e3bc.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGLeUCRA9TVsSAnZWagAA6fYP/14kdmAxwwL8Mecm7KzR\nCB81V89ZvVN7Gncq77bIFchTuhZdQnIhPx75Fm7ZqAwNzIeGHb/vB3XXX9gc\ninHafPmhpYSh/V91JqEpHV5EkZeBt8wxwpw83OdKiD0WVLXxAxypwcPVarJY\n7eqnKc8LrkNWO2zkwrGbYC3DiQtSy3uGL+x9UJwcMdDm2qfngbV6HovIUsZF\n3iT+L2LHrvY1BRewEooXKnhZ84pM/4VghYT0DMoA/zP+j5uBtGCBJGaY0F6H\nUGMF46lXYyYwwtimYII8CIElnRWef0h5VDg4N5kB0ZVvmWiX+V8aSWMlGAjl\nRuBwqPeH504OAXLoNAJL4cDX0XR+VevQrbI0MkioNkfzxPmnxfUduNl7qIzI\naCdNSXP+XE/gf2dQbPy8fmZ+YOfnoQxxPS6AbrVvmU5EcKcUhRABJSj68s+6\no/0EmZVSPgjnrDu0NRKOC9qW0nCmFkx8JrQnGs6kYEmA0PbMXJbOlRHl4V55\ndvsY1Ce3Ai9Srf1iz1VTOKlz/8HpfIocrBu4dmySuKyVriqh//GSKQTdrIMw\ns5i59C06UO9JphDysSKnhibRV5nkuHSFQjUz9v/rMcaQAzAnXlq9xnDkG7pj\n9Lbq+e1xX3qODavIA9uwC0uPW7e7tO+ek11ZBDp3cyJijZvILXNpGax0td28\n8QaQ\r\n=Gd2/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvjwy8b0HFRw8kPCg5xewsy3wE7d8LHfRz21/FmrJLGgIhANSw5mQJXWHTLZr9ARh9y19DcqqZMXrUj9vJk6/+YW3b"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.f181e3bc.0_1595455379822_0.0486528402905444"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.346a622a.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.346a622a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.346a622a.0","@material/mwc-textfield":"0.18.0-canary.346a622a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"03c5331dce90f41a530d3c8569d87c9569257d13","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/03c5331dce90f41a530d3c8569d87c9569257d13/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/03c5331dce90f41a530d3c8569d87c9569257d13/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/03c5331dce90f41a530d3c8569d87c9569257d13/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/03c5331dce90f41a530d3c8569d87c9569257d13/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/03c5331dce90f41a530d3c8569d87c9569257d13/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/03c5331dce90f41a530d3c8569d87c9569257d13/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.346a622a.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-9heodO5wFsj1bQ5xsVOIVFtD1N9iIYWQnZXyd+gkqRn4iQtnCLU7RirqcWP6XZ62rd8e6TnhaaoU9y/iFbNfQQ==","shasum":"590097391e9b012684e448ae8109fa06e4fa031d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.346a622a.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGM5gCRA9TVsSAnZWagAANnQQAI6oNFw2YNFzzeTggAsg\nUOP+sAWnOebhFVdMGVtEBNSF8GOgwYxerVL1QvUemMO1MP04tWa6Tms9l+R7\nvGx0Ti8ZBG8Q90GEGn8BQ3hIMrkU1Y4uCRze04sshMUR4YBb4KPuzbfy0p7H\n+5b7Q5L5VE6eJJFTquL7bLQdnAeilkUg9No2iGrE1Xwc9J/HP8PPkFbbLgHv\n74/jh3qJO3sgrd/tgtyE6tMXx6YkriwYJEdAnSi430qU+m6zjFutIlsnx7wB\n2KOqpWu5C8uqhyc47TYngTYyierEx8FUXyJfxg3aYXl/MlYlYaJeYmrQZDus\ngqBheby86LMd7S3QI5JlCbpnjYgBzQP3AtCiiczsj1EOn/fLm+YAguo9m67s\nse52xBfY7jqIftmOocx4DLZMu8h0Rhho+0Qqrw4B4mY4qaykTK9SRrQhg2MJ\nt+aYqDlpqYPHTH2yEBzH9daQKAX3NUqGZbI8OkA18oaNoOWQ7ETCmiDq+53R\nULvMANOYt1bVYYptpLixEi9MdGTWlPy3b67kcCck8gFKCjF2+DgjtjxzAM9R\nQSUImAn0G0oEQt8hvllRmorsePUdSWcNP0DtkK7YhkD2HtQh+Z/r/ZeqMzoh\nx/RFWm43TpFJ2ZU21P+O2BFaYD776Q+VDPLThrAIy9aRM7FB8Ddne9p5srSy\nGxgh\r\n=z1HB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIByznAN2PyUyADXAM+7d7ID6CuiX0IJd26M6nWZKMrxtAiEAi4mHI/XaUul0EcUrq9vUJh92hXYaY/S+uw+kYqN/CT8="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.346a622a.0_1595461216538_0.9397273889956614"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.c9e8a848.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.c9e8a848.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.c9e8a848.0","@material/mwc-textfield":"0.18.0-canary.c9e8a848.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"bdd3a24691563386cbeffdb8824ffa26a3c03ba3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bdd3a24691563386cbeffdb8824ffa26a3c03ba3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bdd3a24691563386cbeffdb8824ffa26a3c03ba3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bdd3a24691563386cbeffdb8824ffa26a3c03ba3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bdd3a24691563386cbeffdb8824ffa26a3c03ba3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bdd3a24691563386cbeffdb8824ffa26a3c03ba3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bdd3a24691563386cbeffdb8824ffa26a3c03ba3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.c9e8a848.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-GWQwq1pnkAGkcwIPLZw2eHTw54/h1woaWdhoiGwKHok2bGXG+NotyZzgYO7Lf5s+oymStura2uw/3TE1WcTYNA==","shasum":"143916422ddd515f70d2e1027b42b8226673902b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.c9e8a848.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGOOTCRA9TVsSAnZWagAAduoQAKRNTINs31EbouoAXaAa\nKTAwb8SXoVl790ezWhp5UaUg+hTVga12IFk6U/ycEGQ1Jl5Bvk8C4HOlsWR/\nowxAebzwJrVgDc2arB8D9JA0HQnRIzsm4zB3mte/Wfa//HaNN2Q+MzAt5Gz8\nKc3lv03oBMNh/qWaqSBZPSq3aTiaxiIWMddQWusYNYoMjeHk9UgFJ8v6T4GA\npUEv0nQ3c2pedd4m8fR2hLp9Tk4VAiQqh1v7+DTKFZjprsBCQfUh20r5nzJ7\nngq28vtL2FvIeic9ZTpHWr9Jqwq7tRjSiRapDoW9T16WUV6RHMC1KGWS8VGn\novKAWF542IbdspD45gPGHfC3hQw8hBWbCLozV1WXjM1h6AjkDvJSK6SmxWiI\nrmXMZZHlqZQ1bMZXs9rafABpch3RCH/cQ1NE8xm3fRm2eXX6XFEe6TMDI/5E\nno9RpNHpmg02bG033/NqqvCtNa/ltLlo1lurjwkvDVKkk7bah6by6dNo64jU\npxnVys28SpeaNvCrfRujuA5JB8U3HnIh4tNLt5tYsE2c8iAbkgnKCXnrUZyd\nOuG4zhl5yJrBaHosMp7zW4/RwFYQHLzCj3wnn2ASSJukRiUx7MqkTYHo/71J\nzhVk0QmgFcve0zkZH4MMNqJSP9cbgwTnQu5vZ4vrW33/v1lo2eG/3ONjQNRA\nNcTv\r\n=oLxN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRNehgmHaNm92vFLOsEnJ9uoTALOjqT3nc5eImG05t5QIgah3LeYRf0lD1W4TBxTmb4vqFb+TPaY/YrZhFagLqlg8="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.c9e8a848.0_1595466642858_0.5611409964709027"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.718c385c.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.718c385c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.718c385c.0","@material/mwc-textfield":"0.18.0-canary.718c385c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dbfbcdf25eee8ad94b581e3e4da50e65b4ebce74/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.718c385c.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-/reyiv0Ly+u++ow5Pil1T18SXxf9WzkC/R+penw/TRG9u6SZ+U71TDkT1kaQ22mh5rTNVZe8h+WhLXmxbWO+zQ==","shasum":"cf82011bf2b6be45360798003d594d28e15765df","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.718c385c.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGe3YCRA9TVsSAnZWagAADBUP/RRO1VgFHPRYp4funYsm\nvs5cixMx6RbtXEuM+yiPKoaRMwPnQpXFjiyIDTP8d2wpQ5Ap4p+5sqf/nUZB\n2YjKM5y9kMEWvsBu5m+4wgygmQCv14kmVI+8bgq/D4EvnwReOqUKKA5dcWMm\nDhlwBJB1fr1A4PwYklTjP4n32PZWkBNxhWZCLHR5UpYBPTATIVavfWaMRoYV\ngAQQqmvc+QUjF+4AMvuDB8emmqVR8/VpzfIMGkXtNYRYTtD5Y7WUly1ZVxaP\nttKIbfatfkdqvY3zJOu5WyTB1A3LnTB50RGhbJqyzeBKrB2Olb7LXupNDbuF\n1XoGYpkV7iKeIOTHjKVqQIvMfU0Q5hBTPaClXbMG10+Igq7G7JIwy8T+JqR+\nNlbsEXrRmM/nT3ugvaqIc1/50prvIqGeNjOKEBTHxbbcJVXFrbZ5SI/Ds3gV\n9qAdTSgZPMofzezO3HhTfVM6/u8rhdN4K3K+jmNBOxXwlUoaX8L2ARBxVrtu\ndcbdsnlDVeh7CaQSWY2Wpr48um6f/qNOJkprIj8Cbw0ShtDLaQYmlQT4WUIp\nXNewZS3tmjR302AWG1nClkpaOi6M2mSPYe80dhg8kRT1qYveprMYyvmvHQlf\noNYOMKAhrUyndUQ03SGvYxMsVtXcqSxJX3hC0J4BCi8Uh75GPKGxIRpRiOE8\nqDaz\r\n=u1TZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH5l05fv8K1W8q075i1tu4djJQMDDuIH2HrJCEax1qWiAiEAx+FyjXDv8dhk28izOTXXU4Z3DQaiYsbQCBHeXaEc7tA="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.718c385c.0_1595534807768_0.49636386609781713"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.cd516a27.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.cd516a27.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.cd516a27.0","@material/mwc-textfield":"0.18.0-canary.cd516a27.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e3b4c123ab8be0eaab91697be67dab225c8ea378","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3b4c123ab8be0eaab91697be67dab225c8ea378/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3b4c123ab8be0eaab91697be67dab225c8ea378/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3b4c123ab8be0eaab91697be67dab225c8ea378/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3b4c123ab8be0eaab91697be67dab225c8ea378/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3b4c123ab8be0eaab91697be67dab225c8ea378/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3b4c123ab8be0eaab91697be67dab225c8ea378/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.cd516a27.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-3DJBAV47lkF8EcWzGDhNxgegnYJtYbAyYKS9c9SmeHK/a299O7O9nQ3HdBZdfHhFaHxsMox7tvBrgcFNwipcSw==","shasum":"2ac0505b8b450a68cf9316b97c6a75e703194b71","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.cd516a27.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGzJNCRA9TVsSAnZWagAARFcP/jk0c0ECeFleJTHv4ui0\n+6exQafL2Pj6kRLZzwkZCi9pQ/rVlkT8ewopOiVbDuc9A3ipmzk0oDnldFyX\nH07X13ilKM9kUNWXjasXzsncKyZPaLmxcor9XNZI2PT6SyRJEC/gZ8GEfoEs\nhJtJQMq74kSVmYbKVxQY51EZhekNOxObdSHbK5CD90MPEifQ+u07uujMneR2\n7YKhng8TolKJJY3jsxUG6Ev5f9DT1AS5uE/IXf7kfh4djhYbaEXjsAnzWiwx\nh/MmFqPrx58AgLfp4Fy6Wt2znAWCtr+HMA5JdiiIlQJEKdI4bewKZpYGRDBi\nmbOYNnQrTO6VFzFZidGpHgP8lswhXqM9vDTcNYup4hI4RVui30XmWNzCWD6l\nwyArk7vTgblT1g+ABMaccEunqeYCtqA4vFAYY21kKcR7LNlnpfHn3tzCfs3p\n/0aJ7CbyPwCHfDuZVYxGiTk+XjtZoWgHWOrOAaH6GwIftPf4NcPA65zXHMXP\nVsi6Tva/3TJsLd4txL+D+gqQ9MdEkbK87IXm12QWU02qCdi0MpfloMToVykO\nxBr/dV0SI5oxD3BW9xTw2useYkX176Wc7hmc1GNBLP570lQeILwJE5AN4vbk\nj5piBzO7rAODErEyfFpIyh2jlfDGsoVvIbWNDqgeZwc30c3iMlvPVoOVOY5V\nsYnl\r\n=l3XI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIAebfupwZzKNW2y5DmaTdpXv0xyB+ypkviQcBD4GRKwIhAMeRcRGxGDZ3Ue5yjH1+u38TLFyznyNZsTUInKkKSh3w"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.cd516a27.0_1595617868711_0.8021178728704712"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.1f082191.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.1f082191.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.1f082191.0","@material/mwc-textfield":"0.18.0-canary.1f082191.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ac40081dcdf0df5976402e0f1f63b1efef1f945c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac40081dcdf0df5976402e0f1f63b1efef1f945c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac40081dcdf0df5976402e0f1f63b1efef1f945c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac40081dcdf0df5976402e0f1f63b1efef1f945c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac40081dcdf0df5976402e0f1f63b1efef1f945c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac40081dcdf0df5976402e0f1f63b1efef1f945c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac40081dcdf0df5976402e0f1f63b1efef1f945c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.1f082191.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-8SKLgQ3z0M9kVKPmb6aPUY8QEHRqVb4jtvaIB6UQOS1B/j/gphaaJqpKL8tyxQSA71bUOrrPDDY2SmWaCTZnHA==","shasum":"1bb9a97d2b9e26c90db1a28c5dc76c59f7bad411","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.1f082191.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGzONCRA9TVsSAnZWagAAbSUQAIshVx00zSo6SE9GyDIC\nR4E00Y2QB95aV9TogKxFv7Qz9UQwlCMn1BwhjiVt3W57f/7IWEosuxs28QcI\niRJg9ktet4lEWLVrnlyMroiS3Rue/1YwHvCLUMk6cfW2SBnihEAEz74TWBIV\nHWZL2Ac12iaBP8Xh6tEWhajSJ1hoxX+fce3Es2BZvpdnMKBL5FHybYYXfeuO\n7GBV6HEEKxcxipdhAUVO2iq7ZzrBlc1a6DhGZVOwQpSYhflal8YSSzLgoqSL\n/qb7EbCBMBUXZlDDdJz953Dc5cjYqMMDtxJIbPao2fLRlkrzvN62adxFOKLi\nqD96J6myZfSaw/WiBuHGvaRkTU45VRgde9NRbkd8s1jXMca04I+zM6kuFtGy\nGXfrxoPhMONUxb677DfXnT65K9NNq5Mkt57I0kbVUww/B1c/aNGpdW/Y5AAB\nv/ih/BJ2dzs5m1h5aSW4ZVme6S4QEPpFWFE2H6nKZRUkn7StS131VOOMBqC7\ndbiiP5lLk/JfnUyHBaZPnlPh7ZuwBuJKa7IwmPHldy43GYIFxpl04WslCXD6\nt8t2ZtR/Cnl4Sg3TSXTX05Z8nyep7QJ5XkW2q2w4oqG8OI9PTjEPeLWLk8QN\nxmV5vV9hKZK0k/CMUJD03jscu8SuUbOORdwxr8Z0GRgpztfXPmyqkBCTPVHB\naGJx\r\n=J4nz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4Mssny89+TIBiuvcc0tCOO8uQH3+9Gc7yBOVZoQpd3QIhAPnorXfsvJNyqp7Yg4L5bLTS7tR6ZAPbI10G6AqULKtD"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.1f082191.0_1595618189237_0.8998068532791559"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.ea3e82dc.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.ea3e82dc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.ea3e82dc.0","@material/mwc-textfield":"0.18.0-canary.ea3e82dc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"acc963dd578ca338baf9c6d33a6a341a215c42a4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/acc963dd578ca338baf9c6d33a6a341a215c42a4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/acc963dd578ca338baf9c6d33a6a341a215c42a4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/acc963dd578ca338baf9c6d33a6a341a215c42a4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/acc963dd578ca338baf9c6d33a6a341a215c42a4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/acc963dd578ca338baf9c6d33a6a341a215c42a4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/acc963dd578ca338baf9c6d33a6a341a215c42a4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.ea3e82dc.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-zZCQg8LEJCO6hQAU6WV1KQZ3wUqZ9eXZ3VSaoekzoiyWG7IyH4HBGiMc5BSIsV9G7KXz7SUCLXhGmMAsICNsxw==","shasum":"69cdf5f894e64a1fd6cc36b20d70a754602f5f3c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.ea3e82dc.0.tgz","fileCount":16,"unpackedSize":185104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGzTCCRA9TVsSAnZWagAATA4QAJetEIAb6R7nazzLNPBn\ngdPi/0CvhYYg+fJgF8iu7oWMkJrIcEUYk590+KtguhLpPgsGrniNU8G+rJXG\nwOuawT0gms0cb2dpCB13KXz7BAbGRNALcS6OhPDgB/IIPQiwJzrvmDX8f7gg\nIHWc4TVwPl9b0VOPknGez8eQSMF9jhNK/tFqKG5+fwnv3U5KxgwX8VcElhJE\nHtTWzGsUjepSaBfaSPsuhoymglnOoC8EMYaoyP6lbvwkH7ccBliTCxUxOv0Y\n4Kvr8Wqa+w74DxFklTSBzr/L9bqkHnwFCH9QKR3h2EQ7MIiqco8PcdMl1Wn/\nfN9wiOzG2rEIuS3ZAJp5lnHZDOp87Q1Fb46bf/s1AVPiz2Hadaz/ewlb7u5I\nfOpbl+Di2L+VSx/qDT9MkIwOfBJ0/q+aoLTwgAha9JuTeL4bZlchFYZ9Eqvu\n7adOI+WNMy6rLXOUVgLzkbyJ6BkwMnKBq5CT9Xnif8zi+PV7AQ4IPApYI91Z\nGmle2MemC4iHKQtLDbn1F9DrSm18SrD3Lu1W8kF4gwXw69KArsiw3pVn+TpH\nif66eW9+KbMaoBsImWqAhQBT2ibkiHJVRrrRE/4KxihQpGyChopweLqel7mw\nOP+gQ7TGp6+JjDJ3PZA9lkYb9dWXCUuitbMiXmOshczzM7VKwTorBENxroS8\ndF/9\r\n=ZEqD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbF0Epi2w4y7WQuekR3ct0YfCmFqHkWdvSfyo14WbspAIhAPHYxYclEuN0EPHDBI6np2EHt/BCVacAMMY4ErouLw7u"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.ea3e82dc.0_1595618498459_0.40553681066177094"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.94987b64.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.94987b64.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.94987b64.0","@material/mwc-textfield":"0.18.0-canary.94987b64.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"53896e3bba08752d5bf8b9c64423a52c96fc448b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53896e3bba08752d5bf8b9c64423a52c96fc448b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53896e3bba08752d5bf8b9c64423a52c96fc448b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53896e3bba08752d5bf8b9c64423a52c96fc448b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53896e3bba08752d5bf8b9c64423a52c96fc448b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53896e3bba08752d5bf8b9c64423a52c96fc448b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53896e3bba08752d5bf8b9c64423a52c96fc448b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.94987b64.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-1IEOFaxyVaRzbN755+mDW6Sftn1jJ6xR5ttC8MZzg4FF+Ocw3I6iuqA9TTL2N1SoNEgQnyGjGajWfcWhuWyF8w==","shasum":"8abfbb51571e253b4ffc53200a667932c47a415f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.94987b64.0.tgz","fileCount":16,"unpackedSize":185317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfG0QKCRA9TVsSAnZWagAAE74P/3oXnorVMPoMQVvb/N1J\nT7s5duruEler9bMMPPZevlz2QZ3zPC/p5d42aqmh18qzeGzQ+mHkuGcszOS3\nLhyMO5gsPM6ziippH2U6LhJs/NW7q8dkR8L1w97Y+tV0HLPF+oDzS7YN+2aK\ngr7+pIqQ/W+mw4B+7noWY/EKy2jMkPQL+xhkf03VwcvdtwQIvaaa5xTlyufD\njl7yZHvfcTOucgnFCb5qQf1VVdtOtNKv7yKjgf0xiMmPTyEWViVAjwWor2E0\n+XYYOiwR5EIEnYVdcwE/AvZeaEmGhcCh0oqOtZk5T8teWmg8NTIAu5xM1l8b\n3qu2of9fD2/WmCguUA0OYSWHldnfJ8UAWH3ZeXk5qbpKjeRNuBetQIYyrvt9\nkq4CEJhm+D+YrnfTkMtJKEmr+nKZDM/wn8qV8dvbkmk/7n6ihEugjFaukhvO\nqTOx+UhhFyETgB+8k7esXkeJd6AAFEtYaNI2TRpAzFAYNLQwmGfpIjDkz3ZM\nZl4ePiQK1fSMfhLEIR6izI3a5Qe8X/aswgWKeyNNtsqnnyOtiuECgOulxWy0\nF6sOIHTihtxcAQZCFSHbWhs+VAhavnleo95Gk0+iS+brfXZaxqLjvIhq1MMv\nZoEzPFPNrTdMeXWZQzPlMTBMfKFa57EBJhVPGMWPv4BmG9gQ2CGSxoqCKCva\niPoB\r\n=P4iK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAjtOO2kBlfU18CmbV4Mg0VHsJRTdqNGKobqOKms8bkQIgezzVRkNscaponCZMlKt/nPT2/0S6qo26whqj9nAZXS4="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.94987b64.0_1595622409954_0.004739279783033901"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.ff49b7e2.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.ff49b7e2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.ff49b7e2.0","@material/mwc-textfield":"0.18.0-canary.ff49b7e2.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"dfb6845469ead87e451744df01007d8532a7a5ad","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dfb6845469ead87e451744df01007d8532a7a5ad/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dfb6845469ead87e451744df01007d8532a7a5ad/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dfb6845469ead87e451744df01007d8532a7a5ad/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dfb6845469ead87e451744df01007d8532a7a5ad/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dfb6845469ead87e451744df01007d8532a7a5ad/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dfb6845469ead87e451744df01007d8532a7a5ad/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.ff49b7e2.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-ATP8DVDEESKy5NByZhLe49LcO5cazbwPwVLfbYdQIS/dqPYV1/G8oExcndwE/3vO40P5tcHchOKZPunHc9m7cw==","shasum":"9339e009d222a09258b0630cbd5845c7559dbd27","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.ff49b7e2.0.tgz","fileCount":16,"unpackedSize":185317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHyVlCRA9TVsSAnZWagAABUkP/RldvEG4tBR4Mt86+tQV\nJ73Fa0LqHV4QfiNJkGhBytS5AiGYrIg1tUkdc5Rk3W7EWR12UJB7mCLOxVjd\nur4xMbbG7JajHnwDG4M34Nv0je/xsnQSPS3QDdv1w+qFejhTSSk3pFtz8gsV\n5hzBmLwVIDCCi3qFMYCsHiI83I7pZJ8D3F1he+ZmYfWUTzWKmxe4e2oeaIU0\nIvb28TV80+maRM8TrWV3rNXJfPY6B18AARaFKkhPQYHm7faZehC2/7Rhck23\nMbPFE5GAO2Q5aYD/Kx6wu3lWK1Zkl0sN8bkCqOG6PpkegtT0GUN31dH+QZWs\nvJFRMAE6XNe4Pi18UQOfI8v/8Qy7sBYwuYhiRLQ38TTl+qxRZJarT1cRfx1L\niJXVIIyywcysWI5Fdp1O2Ti/rrNQ91ESNrUo3Ougu45LH+sI3LHbLG/cQtIX\nGmaBv3f4bNgsjxGWDsPjjnv9W86/JUOZCotr3IrRcJSluXqgA/LCXuw6rEqG\nPiDQ4WHHxmeAn1OvDe2Ef2pEBdcrksovIsLrystffsySq+joZZRXtrnFBgmD\nqMABcDTyqBp0vAhxcSTANOQAtroGtpcbq1a9j5iREjGriRh6dKuAFNHAVYUq\nOvXDheyYDbsVVhzLQ+YHsddvpf/m/pjrUQnJHJgw1YxH4gt6KQ5yx/T/bKGp\ncnJ7\r\n=eNRN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNyv0uQMpTw35hgTpMvbp9rdPIVunkkMTfgeNUoGpkFwIgR9P5/svMzeSt/jsjdRKH2YyDk6hf+SyH2WJc9XkJEug="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.ff49b7e2.0_1595876708544_0.2608629802942821"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.3d334ccc.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.3d334ccc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.3d334ccc.0","@material/mwc-textfield":"0.18.0-canary.3d334ccc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"620788b72968e56f9d028ba5ef2ee7d1b4a91488","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/620788b72968e56f9d028ba5ef2ee7d1b4a91488/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/620788b72968e56f9d028ba5ef2ee7d1b4a91488/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/620788b72968e56f9d028ba5ef2ee7d1b4a91488/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/620788b72968e56f9d028ba5ef2ee7d1b4a91488/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/620788b72968e56f9d028ba5ef2ee7d1b4a91488/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/620788b72968e56f9d028ba5ef2ee7d1b4a91488/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.3d334ccc.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-vpvJXw3XqIyB3nYYY+cQgi3JIDWAfs61+d4o1GI2rWk67JF7xJpKWda5oC7wQbxrVFWmOhJ3s+yzlgNU8jS4Zg==","shasum":"e9f29c43535a34efd9bdd068e9bac60fec3a261f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.3d334ccc.0.tgz","fileCount":16,"unpackedSize":185317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIE8lCRA9TVsSAnZWagAAyHsP/1oX94YZlkF9y3eesa2A\njKXBDHGKVVojtfuqy8blgtyWSjGlPBHFR62gf7eA7IBBcZz3JfGeB7MLS4xT\n0Io3ZbmU2USc2uRLEjlqVVy6u4XQW9ODndyMSl8WQWTQY3vcnb/c7dMwSikR\niyI859hbbXSrqt7DyQcmxRK8gjn1GZOYkyRtgl/NfumB00DUTSK0rkTwvfCd\ngs8K9/Tkogrq6aBS9jblJqGOcyCv8nKPN3NTb8ZjMsyvh2ig5RWArlNFhCAz\nH2H8dkoAL49GBQa/dmr320m0e3z1AsjNkzLp8YxPYUy4iwOAZK11tGOn6oz4\npgZRN2y18c1nIlfcMQGHdGdQGi2Sf0/yHMcfSLud8iYGMJaF/EnTGIBlo4MA\nk9DVjEfOY/nRFKdv9hE3lE6ih2oBIv6f4+oX777ooujn1COv6lJUUVw11GxR\nwL5E84STF+MspJJv7zixpi9ePsm4pgGTdC1XVHz9gFqYFOJKi39W/lUR0yQX\nTV5S3Mw1tKgitg6fK1hxpZ3CCibrBxWcVrHhIXKzOqyDcn+fUundf0S4AC+Z\ngXJtTABGpUzXx9IPgrlk6JCGchM98YqaUblrLprOKlVGlcUHL1mM10L3pQBo\nSNE05CU7a7nvzTpE7Yfuc8wmAMElUZwv6f0DOzMOvzy4BuXbl6svyoNsrp9t\nIRqD\r\n=PZqQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkumXr6K/eLOm6WVQaRb0ubPdfk6OWETlpAFnA6zXxlQIhAIdZwF2/Nndf81FekUHTuM7kYBEyK2WxCV6QyeY6xhPv"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.3d334ccc.0_1595952933017_0.5629871166508147"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.82ac569e.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.82ac569e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.82ac569e.0","@material/mwc-textfield":"0.18.0-canary.82ac569e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0082732bc61fddf6b3c8f7d114839f1937e7d1e3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0082732bc61fddf6b3c8f7d114839f1937e7d1e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0082732bc61fddf6b3c8f7d114839f1937e7d1e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0082732bc61fddf6b3c8f7d114839f1937e7d1e3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0082732bc61fddf6b3c8f7d114839f1937e7d1e3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0082732bc61fddf6b3c8f7d114839f1937e7d1e3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0082732bc61fddf6b3c8f7d114839f1937e7d1e3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.82ac569e.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-Rqagpianhsi0xCQkhvzJgN1LtY763hRHNAW6OzwaiQiu+iWvoJ8c1+I6rgtxOG9ww4hBuG4CG1D1GgW6Q47vWw==","shasum":"4a94faeb24ac1fd8e20518bd288ebedc748a67b0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.82ac569e.0.tgz","fileCount":16,"unpackedSize":185407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIHGkCRA9TVsSAnZWagAAXZkQAI/6z8IycN6XXi5+FoYP\nt/ne9wH/mkQiF9VK0q/ZwaLVu1v930r0BjhJa9u3FbxFCLmRppN2WZCrVq51\nUmVqfIELrmS3dXPM+kzUkHZaHScMfkWaBysovv4k3fus0sWw1wJLOXnddMEJ\njMZ5g0SaD7chRqBqqKRi/oAR08iS0mBDFa9FSe4yV/EzDZW1Qdceo/cPeYgT\nAYcu0l1CelAM3Ce4zo+2UagMHNykI442uiWRpE0+rDaz7+pk6K/hCqA32kU/\nVKZZvEnZtEZ2YTiMnhU6ZaGsCtDA2SROcHYQcvmaGVF7bykSQ94GhxQzk1ew\n7mAvj/Zk0v3TwkqGBHcTHv9lZTB08bDBd02bl4UvALuIN/prPh3OcDC9ZT20\nDcVhOrYIE7uDpai0GySwtI+q6lkbkIRESuni4oX+cPbh63gUfUlMvxI8qcsh\nZxefQEFyVZVP5mojpDjM10d9SpsMamrMlulM4BV1Lj3O8NH4ahiOPDiZpOg8\nxWnw5cP/uDlxqcRJ0x5aUrlO4giBAO8B8dN9787MtJZ0L4uikdyfihFpr0tN\nYzzzv+hnCXJSnFfxgcIKigWZap/TETWul8NdhA9DFB7sm+C3/KNU6U1hdtDL\n83K/OOBCezOuUNBcV/KmIT85+pu/7WcA0znZrVd9890OGfIzaG6ppQwKfNYd\nasFo\r\n=wU2O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDoq0sonNDFOEa8uFFWWExmCsqxFOX5fbtqyjpMHGzGjAiApXliLBtphwZgOeIdmdMi8oMDHp/+8V4InH759G0WxYw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.82ac569e.0_1595961763739_0.22277861127931975"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.99df7397.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.99df7397.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.99df7397.0","@material/mwc-textfield":"0.18.0-canary.99df7397.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e236d384d23fb84c6f0db97495a598e8b374ef26","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e236d384d23fb84c6f0db97495a598e8b374ef26/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e236d384d23fb84c6f0db97495a598e8b374ef26/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e236d384d23fb84c6f0db97495a598e8b374ef26/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e236d384d23fb84c6f0db97495a598e8b374ef26/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e236d384d23fb84c6f0db97495a598e8b374ef26/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e236d384d23fb84c6f0db97495a598e8b374ef26/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.99df7397.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-rYN3pdx3fi9q7w8MDCdIiqlaYuMLpoDilyUpf4O1eNmAbpnQBT2LA5QbTOOZH909vmL4FgNcXp0IJQJ57uV5Hw==","shasum":"cebfb4d5bdbfa1844b2f81b63ca8c5d9f87a0a79","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.99df7397.0.tgz","fileCount":16,"unpackedSize":185407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIOG2CRA9TVsSAnZWagAA9gAQAJtFlBoD6BDPxybWz9HI\nR19Um35ZMQ5aP65ArJn0uGD0offokBmRQbz1BYEpoPAgi6VqMtowN+elGQ2X\nwVj6rL54SuqJqxygBo8rlMWI/HBXaaryGzxYwBLA6uf+IekFk8pXWrvvYMxG\nxYIpNQCFXuxBp5S9xlmZo8NeHSUDAx3A9QlTdYiD89/w0qOq7o2goZ2F40mH\nBdKKSNN/IYMqKktAq0IIk5a9VYKyw3D9Y5fWpqT5ITdargKGbtK3TD9JHz/L\navzstLkFFITPsr9t26brKIkRcBeeitfQPD4P09EfquuRtIQQKiG8Rjg2wmXB\nETTkXnqPXc7bdF/9Jn61LlKMu6XKk0N44a/UkxcneK8JmrGGXCxsi/0jB6A9\nFkRDi6LKqFqIUVvLlBhkfWuZJXRDKdSRyNqd1Zcaw/3AE5BzDyfi04cOXLeS\nqfN7K9XYvXN+3diOgcQXIxQSn8BLxIhjYLoP0zqNplpQSoyMGBAIol8MyAZm\nGrH8u8tMogHNe8O0VVfiBXaeCOFM3F9T89rYmpW6MM5JLAsEzOXHzge3lzUh\n6GuuOM+LCjTbyUFWAnHKfMTFzXQd+8Qay6J8ADjpXtnY3AOQRdE8AyttYmKD\n4SnNrLyg+pJc/sihvEac7YamYCC7FSgch2UFTeA07bQi8DFMpTtHYExt8x//\nMTjv\r\n=OObo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEL4uGcev3aEejKAahpk0wjEAYUxp3tr3rhC98uW74K2AiAEfL+WI5GPbsuakRvtaOCjp0mHDcRZPZIBjEfntcKk/A=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.99df7397.0_1595990453586_0.11037262575920015"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.45493e05.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.45493e05.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.45493e05.0","@material/mwc-textfield":"0.18.0-canary.45493e05.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8423dd01198986c553ae23227667bc8148bb4276","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8423dd01198986c553ae23227667bc8148bb4276/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8423dd01198986c553ae23227667bc8148bb4276/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8423dd01198986c553ae23227667bc8148bb4276/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8423dd01198986c553ae23227667bc8148bb4276/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8423dd01198986c553ae23227667bc8148bb4276/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8423dd01198986c553ae23227667bc8148bb4276/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.45493e05.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-IYWA01cBSp1SbHQLFIPZ869kzuQvCB35TjPwB/FLFUFGO5+YJX0UBHqqsCEBkYIiR9e/1Wv7c/yR65CkkMdq8w==","shasum":"094ab331a61751fbc07eb08e2182dadba6d34868","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.45493e05.0.tgz","fileCount":16,"unpackedSize":185407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIa8ICRA9TVsSAnZWagAAfcIQAJM6h62w4AWBl65ybO2n\n7ckD14xc3zRzk7lMm1wSiP5BTbVBq4kcaGZ3XcEXbkzPc550OWKNEVbDh+Qr\nqG83+Q0wGM6ZhMyeazyChq31r8I1PcXiGnbcF1DPocNACuz3/vZHN74tgjHi\nRy39i4CwS747vxWm+i5Aa/FNkasbJgXe2UmcOkwiq/L5IuQyJ33Nxe/cq8b0\npCDjH8xoww49ne3zmOCPImXkojOld1iH4pUvVZ/eF2AcYBgdaCFZF/L6iJWI\ni5o4c4bFwoNuhQs1EtaLn3zq8p+C/IEyTFiWSLB1n54VemZN1MNZsDfcY5Dh\npSITeKwP1gifPXiyQNLHp39Cz1Q2cubdqoxl7WV5qEfYc5SfQxrOmbNLWX+R\nO4tpdTjkeUTFOgfkanlHeo1+JxYFdwB1YWuCzmdDmnWIOSRMZ4tTec1SsQy6\npl9I5kX0uH/HYSfzSKQ/qCBI0w8bZ+iO6KeH1p+MXZJSXM1vaMXHsqoCFutN\nsD667I7NM0HB5HBmuhDozc5/Z0yNvrOgkUlAsa9ud66YUo+goQjfmUd4JPUJ\n6+F9i/4epobGVr4ZCTuQH7iUdvgxA0CqaMV1hW0ZgXZwTjEeLgnCACT35mFr\nHIb/O+o8eGkLUO3ip8jgNaZH8WO0ayFlt0n7r4M/Vyk3nZj36yjw4yiDVNvM\nTK+p\r\n=BzcT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFiDw3WBqjsRWMKPlNaNWuPcAeIW0q0pCf+PXTAk4qWgIgAk5IyJnV3oXnIeFBdrwOYVbhMbFOyYVZa77o0wu+W4o="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.45493e05.0_1596043016238_0.26700949527805173"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.f2ab0a95.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.f2ab0a95.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.f2ab0a95.0","@material/mwc-textfield":"0.18.0-canary.f2ab0a95.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1009e1c7d365921dcbc3071cabaa20c5e21e65e8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1009e1c7d365921dcbc3071cabaa20c5e21e65e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1009e1c7d365921dcbc3071cabaa20c5e21e65e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1009e1c7d365921dcbc3071cabaa20c5e21e65e8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1009e1c7d365921dcbc3071cabaa20c5e21e65e8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1009e1c7d365921dcbc3071cabaa20c5e21e65e8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1009e1c7d365921dcbc3071cabaa20c5e21e65e8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.f2ab0a95.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-JadOqJ3HO9aoNdFDaAp5iT4ugwS7hwuFJeFg7hAVxgHtokYwA1HsXCMOdpugkbAlDU/18uSIfK91dFu4jXGPHg==","shasum":"75172ceb9a7c835159229bee53c9e5e0c5df716b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.f2ab0a95.0.tgz","fileCount":16,"unpackedSize":185407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIbAtCRA9TVsSAnZWagAABsQP/22Xa/k/9UIfyG88gs5I\nEq2GthIP15vUgY1Oi61suUidtjVjt9W0xTWfiOa/2HI0aPvIa8KXgIzmZn+4\ncfhjfEs38FtQTmENI7qgnPzNy5FR7KyMX6fyMLHQMDfh9NWefx/79oZ6at0O\n7b4ixCDqKiRXNFr30Slp9pA45gneSRm17jg5iAqKl+12I4REliqp+pyxonXp\niAm8Hw3t5NWF46h+PJaTCAmwsNBbIENsSKpo81VskGXEmcMkYF/JrA1Eapex\n1QCR+TtZjSEjsEKPfg9v4SlmkDMRxDWPZkO97/1JIQHmzTflksIQSEDfVeJm\niXIz+YLkWDjKCq/GGs7OLCfDGMUiJiMLsqNtdp8RXZl8gGvMoC/i9P7W7V/m\nLkdp04SNxe2OUhRntHnWFb25JdT16HKTX3Qpiy6vlBY4XV7/HO9uMeV/rd7K\neU7RSK3IVTsrHWLv4SRuoJaSYihgro0rP1bdl6EHuPRl6tdTq7ydqlnGuInm\ntcZmOqf5xX4hpXDBO2krJ6G8PRnKXUCPNlYgU1cYj0smW4YfuK9k4K3fe5Pk\nkt4gmSIv2+9eZStwHaUKC8CfqBL5/D1bdwwfy+bCWkYGtdxcPiAQ3WmeD6Mk\nU8tubzaz6riY5Scg1bGx3meFu4EGJ5bR8+eZMeF7qbUWjEnzxHJhGbAY8sqi\nevPs\r\n=9fq7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBCRvELN1sr/8hwT5opSu13Hrldkkbje/QJNIieKkmN9AiBmnxeszgsJGONxAqfUipDhfs7o2Xdz297JG7qC8Vrm5w=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.f2ab0a95.0_1596043308699_0.9389598704558064"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.45f9eddc.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.45f9eddc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.45f9eddc.0","@material/mwc-textfield":"0.18.0-canary.45f9eddc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1cb46e993882c87c3cced22481410b4922c1e1cc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1cb46e993882c87c3cced22481410b4922c1e1cc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1cb46e993882c87c3cced22481410b4922c1e1cc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1cb46e993882c87c3cced22481410b4922c1e1cc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1cb46e993882c87c3cced22481410b4922c1e1cc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1cb46e993882c87c3cced22481410b4922c1e1cc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1cb46e993882c87c3cced22481410b4922c1e1cc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.45f9eddc.0","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-gLI6mTbdvZRQy8h1OkMgJRL2aVyTB68H5ttQO+CJWJu9AbglcEyv/LMyYoY1n2ICaR50RPcBMbHAR5pwxfKSyg==","shasum":"588a05175ea3a9dd8fd2765c51c9e51e24572582","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.45f9eddc.0.tgz","fileCount":16,"unpackedSize":185407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIhpuCRA9TVsSAnZWagAAMlsQAKLJqDyKO0W8cqswNMaA\nCgtljENIAVSwrqaLxAybSYvHtGhl7uMdaxZSUmPNyeqrUXipAtdcLrLyn7nB\npiHmWkNHFiPMpoEX0nxVF2HzxGGN9XMvBQhn5zQ+RDo95RwV9CgYmU9Vw5g4\nlshrJ85ofokbUN4ndcszfXCwP6LHUljhBZEQ0qkfIRvp7XrRz/uARFs9MwV0\n6dQjRPIm1cyRmSIBvDlpvCnq01L9zzkr84OPyvB85o36xB89u7A2uWpPFFMg\nxtGEjTA4At7jaSZDzrthyNFTPulrZ4Fh1TrSy5juH0oiFRJWbZKnb1Ssr0F8\nUQP/SL5B9rPlSz8deWWHYp37gMNdBYJmiAujG5u4+ADXVorv/fQqr70wae1X\nIL6IzEM6UnRbQS0c+VawxxQwYMh5GLjezDHCLO55SRdWUmHrafFxFnGxz4EO\nh8SDZ6NNLvG6hr0MFQaKEI4r9yuF2n8EWkTX/PVbXK2kDbBRolaaiOXQjSxC\nK2UHp6LKsrnXR9Vh9dlPS7JdQYp7qooYiW81ivyz3a7qobipGJhg7SO/TsGt\nRt69HhvrIebu/nEGiK5HMWaBwdy23K8YDKVLEVJKHAuDvLrq2rO/so44iZOv\ndv3Jpidsolxji5l54Wy0BEkTYTuu58UIzsQscD+CWqIUmTS31M4kWcZpzWG2\nCqL3\r\n=qFmI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7GcfNUmjG9VlGYaktizPN7gGpRFvx++5Oe6QqHUsfPgIgLOStLYLq7ccX/HZSUvpOEXLeaUcKR1NaR9+idpvmkHw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.45f9eddc.0_1596070509871_0.18398110253529865"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.b64663ea.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.b64663ea.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.b64663ea.0","@material/mwc-textfield":"0.18.0-canary.b64663ea.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"18456f1bd35a7bed64d6ca9d3d408d9d62d59c90","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18456f1bd35a7bed64d6ca9d3d408d9d62d59c90/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18456f1bd35a7bed64d6ca9d3d408d9d62d59c90/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18456f1bd35a7bed64d6ca9d3d408d9d62d59c90/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18456f1bd35a7bed64d6ca9d3d408d9d62d59c90/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18456f1bd35a7bed64d6ca9d3d408d9d62d59c90/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18456f1bd35a7bed64d6ca9d3d408d9d62d59c90/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.b64663ea.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-uoVdRGLU4+jR9Ii1CaGIuslc7wnRykK5K1aXEHY0ueRtUwrePyU0wzzzLvLLBjABSK3wYaA6GfW7CzXsCR2ueQ==","shasum":"1f072ac37c6fa7922dc49cda1ef57b76fa7c7369","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.b64663ea.0.tgz","fileCount":16,"unpackedSize":186764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIwbMCRA9TVsSAnZWagAAFagP/AkOesh86/5WtEg4sNSI\ncHGjjGtziX71OM0yx9akC9h2aIHWztywM4X01ibt+X//YLEuXl/NVMLX4UnQ\nDVnozn5i98jTKxaxPwclLxXK9kqNqgtbiNOMPzBjJ+dlWLu1toDWvil70iQQ\n/Zm2BKvRWXbTqZo1KM2MEZcP4XAnbgp9uMYQ91seLUofZW1gKeaHyze/lyUV\nBDKmgrg9Uj8KfbjfBmQyB9SNNYJTv+U+LUEfTGEWvN4P1fRW9tQAU0Jfe7yO\nqnaRblxoUm8I3gFWKz2RlRmlV5F9Ypm2f4FoH/uXStd04TpBEi2V/uaLh/zL\nRgqvFGosJLmbFOg5/R3LhuLY+yxYTRDfG7leiPVrzacBVUZ61RT1742eFgLJ\niufmUlG+n+PS8nqMddFLoNOJZ6pR/wm7WD8W6XkRR+mdk0QBKhuz16RZ9IQd\nmxhkag83nLV9+NXSbYcNpF/9t4EGOhj7hOAGmyvtcHuaJ5C3jRDNX/hw/Kdv\n+PKOZBgs1uIG7LJWddZrx0Svjq2WWFy0vYJ/1fWjmeemcu8q/LiPRU1g+ujZ\nD2ajb/Ql12xnRv4I9ZuzVaSwEtGYK4llpdaTEkX/5B8nz7sBOY39lU/WHTvo\n57T0Cgc9IXk3HpJ2Bo5eGZy/TaYtiMgTm2sjsU6ABgDhk/+3tz3Dl1GnLZ2e\nHdoU\r\n=xgly\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHM6WlfyuVI5k/HlhVZETj8mf7lhFTISBsnTZ4YRpMomAiBgmrzaLjGwRnI4kE6AAke44+cizL+yJ8wfTVKwB3Dn1A=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.b64663ea.0_1596131019310_0.908776184818272"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.9a1a4d2d.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.9a1a4d2d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.9a1a4d2d.0","@material/mwc-textfield":"0.18.0-canary.9a1a4d2d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f3382a4c5be4b9d21268b2d1b0831f8d8343d2c6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.9a1a4d2d.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-xrzxr4buxX1ynD1KssYs27bZTRY1EdpB3BKPNU3lzrGGb3aHiaAapM1QFkoluGpcEYeXENZbOsMjo/ce0fmHfw==","shasum":"7557f258bd5059db82ac42c6477a37094f2e18a3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.9a1a4d2d.0.tgz","fileCount":16,"unpackedSize":186764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIzXkCRA9TVsSAnZWagAAY+8P/ij4TMOEh6CztPPTFN9E\nJ3NZWTVhlUeotwES/TylnJTsZvr8tr0rDE1etsvUP8URtbyo2udCn9u8Sqn9\nrbBJeWxaUvuum+09V8wvFiJWksBgi4knGlsR4l87D9i6Y0Aunx9ixmMx1kTT\noa42uQINHyKgNlk9Ih3f0eHZzkw5iAvF/5vievAFljyn9sRBl7uusXfwRE4K\nm2kzrwEApW+e6PGPh1h5qAcB9yzx1RGoR6zgI0zbUmogw034m6G+LcIYtbQS\n0q+QY5BNNEmt8lXaHUrBlrG1iwAAisfuIWaoFwa0x/kqifkosV1u3ese6NMZ\nStbU/irdEZ4cMVaqUiz9TdScEQ1AVmIsku6xqGRU6oiEpDhY5z7p+qoNYhj7\nYiLKBCeuqHvPEjxTIWvVZD0lEUIw1Ep6SE5ImUR2I5rGhhGyXdIipaLMlVFA\naEvzpymnYXu4vT7zA7/1sRFTk/o5Ta+AFQJxQ9SIQTLpnvJIWSBM4WmlJxwf\nA41KLFihUjzRt+TT3IiP57s7ymQAXBoW+5yyCskOVM0vcsVEpRL7KMcDKKzX\nAz/7DxKq8SenXtEwYIZEtnJQ0U49xsXSbauQVvpjhCfcfS3WcaEcDWnUFGuJ\ndr/h3LfSkCj6/d2QSxPiji9yfVXkTI4sS1XSVX6DslONMWPpbZzdfHCB9Gka\nNpY4\r\n=MViE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD774KkbyF9MWiZQge7ao9vEZNes4AzzUrKd8ERkPwDfAIgYIuK6E0r4ZUDxS8usSJeeuuVjSrr++Grb6tPI8SJbcM="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.9a1a4d2d.0_1596143076360_0.35173422523917597"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.887c2848.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.887c2848.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.887c2848.0","@material/mwc-textfield":"0.18.0-canary.887c2848.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2da757768e8d58aa4885027c78c58f8515382305","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da757768e8d58aa4885027c78c58f8515382305/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da757768e8d58aa4885027c78c58f8515382305/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da757768e8d58aa4885027c78c58f8515382305/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da757768e8d58aa4885027c78c58f8515382305/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da757768e8d58aa4885027c78c58f8515382305/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2da757768e8d58aa4885027c78c58f8515382305/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.887c2848.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-r6zpluhXZlBLHsVivoEHc1pgoFv1d4Vc/ywSHLIRK0aJHFc/xfEr/I5jE8lAwWhpiJN70zOY2QpEA+IsPsSYaw==","shasum":"79d31c4c45842ae4264059b27991048a4e1ca1bd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.887c2848.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI0RECRA9TVsSAnZWagAAoOwP/AiTn3FCRORH+60uFfq/\n5n5XF+wcr8GlBLlk9vWZ0N5rT/x2sxrwjqnXhhRzz6bsM7ROoMbijnMhha1c\nrhIGIsw4N+pAdasCQLBSf6DZN0udWpMzYHgprygkfmBrj1WTUfwVEWS2Xn1i\nhy/udFpNjXOiMwKAW50xVVSmA3unLqnUYSO8rH4QnHCh8nZsmnzPE3WsC5Cs\nZUJNE4BiLzmL0kBwGtAWh6XE0LMOvTpyNfZr9jhg8U/hR5D0eFNSq2TzCmWe\ngI4Ub/K9P/RKIfzrrV81b4LMgbBVSTLGM25ILeyhTiUD2SOI1o2oIHunL1Ss\nZ6fmbXwZR02K9XrGYuG4L7KvaTeoWpa4mM6mJMvHqXWpyBKGlnt5gyLp6d+C\nx5AtZVRliqo0mNUk94M/FLV74TwfgmxFU8YzeU8jjYFwDbnirN2sAhbUTvzH\n0xfykE2EUgaCTlX92NB5U0QO5ChdqXKA1o5cpYYCgycu0/aex/e6ncVbyKQt\nxhjiZjBlhCXGu6ENP4LyOGu+G7uzef41M0xOfM+tEfU/PODQlTy6rjjEpGm2\nCJrfUEQ98HA3fIax+2oqs8FUMBc4yKaC1rd8xakDiZ9tzg0XROUiLwkeUOfq\nMEWdPJy06gDB8M7rJ+oOwQS1dwm+QIvSRtCoreD3dWtakmYPX34hBhjVM5lR\n/wS8\r\n=Gw0A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD03BsabD+QEgRkGBj6SVS1i3Fy1eMe2E5mR6OJsBYZ+wIhAMh8Hx719KvVlGUnIOAaUcH321KKdcDtlMA/QQKLhJAm"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.887c2848.0_1596146756441_0.5379463335747736"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.354eb695.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.354eb695.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.354eb695.0","@material/mwc-textfield":"0.18.0-canary.354eb695.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"75cc944c1c31dc88606fa2007d002743354e601f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/75cc944c1c31dc88606fa2007d002743354e601f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/75cc944c1c31dc88606fa2007d002743354e601f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/75cc944c1c31dc88606fa2007d002743354e601f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/75cc944c1c31dc88606fa2007d002743354e601f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/75cc944c1c31dc88606fa2007d002743354e601f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/75cc944c1c31dc88606fa2007d002743354e601f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.354eb695.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-j1VgyMc8sKw7Lj9698+1FGjMI1Ej5xWLBX4yQw5Xl7Cd4WejkEcPzgDskEoMubhXJXwMUaFc446crlt/7oKzJg==","shasum":"79d175309087a3c3ba772c31ee8aafb42c85b77a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.354eb695.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI16VCRA9TVsSAnZWagAAZDAP/j+bE02798GwlgbaQadY\nTfhSXRnrgK5dizikqisKfRO8jcfqz9AcFvlLNCbqChzizOpFp+sNHrhk06R1\nmTxcGUimeS6pgt+X9Dnix7X4Ypf3yyE/LeoqXTwb3gc3cYd9H9p72Xm7PZHf\nbUocGXC2edm3OOmWv+Lqqv45xj9mbDFnI4Sb+ScMGlsE0mevJBM3xZH7mipp\nGLsWVnOff8KWEfSDLySROX/p5fO/JuIlzXLYDHKiRe/asG1zzjNRuwMn5Vdc\nssyIR80RgjF3WEKgojdvgKfcPSLxvgXYoY0xReAQPSRssjaDvqXQf975tEk2\necLUHErAjumPE6yLEmGVQvjHDku5CHzzYEsMbfyZDRYr5rLm8IDf5RqaZKIn\nYmq/FrdX55pB0x87U4+zLRcKh2reTA/69nRQV0t658MZJsznIdk8Dswr4MiF\ngcqbkgKhKBM1ZgUXvL98NOg94k+nrQxebVtWOVZFq/QOXp3g3IL+B9nklhYO\nBcZxR0TVRveoTf0z0hNTqe89oBKOk2o25eTf3A9/92QughGD4ZBRNbmZn9ii\nRqyVEMkbnDbho7/vi1AVkXXePVvC4i+m5Ah2T7ygOZ2zMEb2QyhR81ftxDtf\nub6iQjcJXTYMoimN0QsW38YB8nMPupL87g2V1ZAUZpJhWoVSUaO+XWozL7nY\nTVR+\r\n=PeGM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt/LeA035x1PBm5iedYUgdpWuM/FJmOLGhQ599hCeKzQIhAJ3H6fWBWuru4I06zcyw765/qT/296GV/trYEwyL4X7E"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.354eb695.0_1596153493058_0.4959841534393279"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.7beb236c.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.7beb236c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.7beb236c.0","@material/mwc-textfield":"0.18.0-canary.7beb236c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9cb1508b49b8ccba6072341f23bae1ac67078621","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9cb1508b49b8ccba6072341f23bae1ac67078621/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9cb1508b49b8ccba6072341f23bae1ac67078621/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9cb1508b49b8ccba6072341f23bae1ac67078621/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9cb1508b49b8ccba6072341f23bae1ac67078621/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9cb1508b49b8ccba6072341f23bae1ac67078621/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9cb1508b49b8ccba6072341f23bae1ac67078621/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.7beb236c.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-Ou6AuTFA76QPPtFm74LeqiWSgrbhO5x3zl7xkjvcz8upO1Bm6s9iPJAK42Wzs1wzgJ9HM1eZ+Kclczpd+2GKDQ==","shasum":"d2e51759ab285a10bc17280f18166b7dee49b701","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.7beb236c.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJFejCRA9TVsSAnZWagAAkJcQAIZmRQJy8mBK/KrwG4dU\nD3mXwdM5BtkIbcf5RAUPoQtAbkupuBBK4QLEE9emrnBU58E0alPhDaQvAAvs\neApjRpM3Gg9B1NnFoWXopGWxqqv3AdHgYMBIlZnDbhzgfMIav6ew65IZ3zHe\n6PLZ46QB/H1BOJDOqoT5ZYw4eNzs9C7l0Qcd5Mam2kDOkdwzmzMxiz99EOLi\nEw/eBTccjyZZz5dKXM5pnpHTOx37KeIfSUz8C29OpcP/sHhCfBi8eefvPKr0\nXdbVVaspUTxNlTTDbgEwP1N+IubCKtXqg8JSnuCLH5vmg/3DUo+WHCJe2i25\nfWGSdet9ofgvIMHTUKGV+keinb7/OwMLRkEF2MEKSkGGkGZ0yyn/4QpVERdH\n7M1+hz2HM+AF3whIC+x9YVrzR+yz0owHS2N/uVblqQXgDJQG+cSU0F9ewrLo\njHBS+2lf4UtOU78t8M1TaOuBDAfShl6GDF3PcBly1ZYBqnPBlswqI7pkImSb\nBwetIVaZirpLuFp2NaAuxNCCQGI2ZCm6jPbItpcpUzTAx6d4DbhhpWAK4eM0\nfNT1igHiMEIVX9h6qGYx9TiOA7EI0I7FPCrXwKyS/OvaibGQjxRQgEATr1vv\nDeTIa4UHNpUEhu4bdyuYKkRRQQEdDFkS2qbyRL4vyMJcX6XgNb876ceQZjJj\nzYyy\r\n=O29u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1QqVFPJ9joh0MGedkwbuthTlRSMX54jT/3rxBdh4cEgIhALIFur5C21hRE9N10Tkc66j1k6mh9Gx1BWBPzgwxSJQM"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.7beb236c.0_1596217251066_0.632849561486712"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.c44acc0c.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.c44acc0c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.c44acc0c.0","@material/mwc-textfield":"0.18.0-canary.c44acc0c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2491ff018c9a71195a5e873fa60b912085ec84d3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2491ff018c9a71195a5e873fa60b912085ec84d3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2491ff018c9a71195a5e873fa60b912085ec84d3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2491ff018c9a71195a5e873fa60b912085ec84d3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2491ff018c9a71195a5e873fa60b912085ec84d3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2491ff018c9a71195a5e873fa60b912085ec84d3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2491ff018c9a71195a5e873fa60b912085ec84d3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.c44acc0c.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-Md/6IRZacnqKxitwz31+Hn0a33e/r4MF6C74o157eYG3kg/7QO77Z7kX9OK/+lDlX8x+2OhEpLIb/NSpZxtS5Q==","shasum":"d6de6f5c2cf661555278fe18e2c6358ede39c8b6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.c44acc0c.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJIkBCRA9TVsSAnZWagAATuYP/0Yog7Ob4wJtP7VICCot\nbWK+DyDISmIJeFctq8RQCPclYoXH8rsfdV76OAsMSPiL2nCtJ2oFTT/ZcK1d\nqPmG1niZqx8yCyq4054tsQ2N4Br2eQejPuZ2E0/4UPDsJDMT32sHHROv2vk3\ngduAXb6wPzeiGSvTBdhOCqm3/bh8FAq2qDN9JEUZs3fwb3dSTLJODVLnC7Jr\npF3YjKclarEzxY8Cmw0V2BUba+D/CSmAfsUfTug+wBWug6tDB20nTNz2eIRb\nTL/3Mq/RWmxUJiJ6/JUV5eBYtCEEI9CMtlhiCbzr529Mq8ktgIpePlshROuA\nSqOsaYnYjIjDNolH41KdCK75wDWtdCJ0M6gVRiNgiY/m26zeTPiWP6nIj+hJ\nwMCJ9FEgrDiJxBqork6dIZXTtI1Q6WSIw56eiQf84LHiHOjAQNBFtJERWsW+\n5C3mfMpsFCDhGQc3Zz2RViAKPTKNEmMK4zhMRXEPdJ5q5olVOs/V3xJaTdq7\n5JLtXm4er7j/K7iJQJG6gFdkDPc/Twik2EEDShjo/YUTU1uLL+7U4VJj3c7f\nsCxo2TfZZCLdCvT0OQeU/kHK1YumvK17DSC5Z9np6PxT4OZpIksd1pWRf7PZ\nC5EG1NWiA19iCbjqRX1GZPhA2cKxsvFbX3Td6tAmbglH+P6M93Q+i9YRu+eI\nWRdO\r\n=BmQL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhjz1mSQJdAJKOxvRj7IOb2vyNIgC5Smz062cWWYQS0AiEA3MKxrgyS8YCWjwYSCnbRtI/wHCg+jfE7CL/8wTR4kik="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.c44acc0c.0_1596229888617_0.20813620187673743"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.779853ff.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.779853ff.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.779853ff.0","@material/mwc-textfield":"0.18.0-canary.779853ff.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e06c13898d0c9fdc7cd494c68586a55eddd2d483","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e06c13898d0c9fdc7cd494c68586a55eddd2d483/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e06c13898d0c9fdc7cd494c68586a55eddd2d483/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e06c13898d0c9fdc7cd494c68586a55eddd2d483/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e06c13898d0c9fdc7cd494c68586a55eddd2d483/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e06c13898d0c9fdc7cd494c68586a55eddd2d483/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e06c13898d0c9fdc7cd494c68586a55eddd2d483/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.779853ff.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-I7r0wnHjlHOaK4dh50L83sPNVQ5Fno6fj5cKwSQHsJLXcCfVkWlGdyIz9a7Jk5ZHC5Vx7WhzpU8q3wk//nUG6A==","shasum":"905a561154b1756b15d2ca57b360c787428ef41e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.779853ff.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKEgjCRA9TVsSAnZWagAAfQEP+wU9S/f+GhghjDnnfu3q\n8P88JYX2Q2ZpXjaQ2eWOBwaz7wflJD8AAHi8cSamsgsi+IDhMz9fjY8aOKDt\nCVjeA1iUAcYDLc8zzxMUR0BfLnj1+XpimEa2nIE5poX64bgJeWTInf4zHh49\nuHflt2o1ssz7VWzC6vs/bYR3QUtlaevxsFUFcTacfC2SNt3mquc0dZWJ4vXg\n2sPcpKmiz6wo6xF4gEWzA5b72NOhs1W/dStMqbgjJJ3lZ6suz5LJSESu4tuG\nVLAk6VVk/ilAjnXRCqmODTshmpc/VmwjmhgiSJsngQkC7MEC0/oUD9AVOiig\nGNT0gcDr7KJszFdf8zeOWqqJJWOd6fQP8Ny4N9XO09/2kIR6AikoiRQ5Ttjs\n44LJUkONzTACScYiU9XvrIcq3Jd3M8957SU5CFwOmH8V45k4gL782lRkDrA4\n54sgCW5gK/0TF0oKxJML2OXHuh+4N61d7rCO4PtLuruSGdBt3JuGzhITk+Af\nLS2BbttUZMtRViPVL184sJMyIK+4rz/DHPix2nY/uYej9BSVkgg1bqIoiUbM\njRgrI+t66vZhjK+R7YlYwh0TL6E7aF3ld/WdtCwCozFgxIyufHiGBsXrY735\n4GOnJqGlFxvh1Z78/whp0tj29bm7MYPGgDiYAgPl7PAfaHSj32B8j1SgxQKt\nQ3Ag\r\n=JQ2u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZ3ijsncc7FfwbS/ArFiR0QIW8WQnXraDZTfrfrX70kAIgbzbimCj2akjop1F9L+Ezw6TxXKFQpSecv8NkRVzWy/s="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.779853ff.0_1596475426688_0.24815390435682638"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.8aaf270b.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.8aaf270b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.8aaf270b.0","@material/mwc-textfield":"0.18.0-canary.8aaf270b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e119651cfd9ab60def67a36255b4ea0ca1022d37","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e119651cfd9ab60def67a36255b4ea0ca1022d37/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e119651cfd9ab60def67a36255b4ea0ca1022d37/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e119651cfd9ab60def67a36255b4ea0ca1022d37/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e119651cfd9ab60def67a36255b4ea0ca1022d37/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e119651cfd9ab60def67a36255b4ea0ca1022d37/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e119651cfd9ab60def67a36255b4ea0ca1022d37/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.8aaf270b.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-ZOCrP6dn1X+V/9P1DGSnXwjmNoxLsW9Fpv6QeS4oKR2jP4DwqAehG4QVui8nIQWNK2yfog9/PGXPV6aQfNeqWA==","shasum":"1acb55d6668baaad85e58fce659a9b563158c6cd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.8aaf270b.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKFpDCRA9TVsSAnZWagAAgsgQAJiieLSuHI7a4WKyuaaI\ntzrFf9suc4nJf3dqDAnaN75KjxoBL8VSzGvHZEfzzjn9MDfN248J0VFLBR2a\n514PQYb4kwuDJ0fIKEDDv60lLnGan9FP3xzrM6fCHINltc1J1FaC/cSSo01p\n4Axa9lUq/avwa9WOoZTbO7jfCs1urtXFy3Iaf5Km2NemBcl64ZvuvOc0fyJC\nIx6C8S5k4eNYjuO1otwqRFGshPR6lMUYaZcJ6JLwtds4U3BM8U6UBL8a2KRm\nzLzbh82O9xxbB4YoSqb9wF4jbj4X2xUHNq5w42KJx8mZXTr4oc+N4SCVOPj0\nzugeGcH8UytbazyvX7fA4wZgIQOBgqGjMMyjXrh0S+UStwSI2XD0HNyxEe2B\nw/lUZW4pPNU2z5SSmfkoGjtmlnMMpz2a3pOIuo0LA+P4xZ5oQ5FEXvH01pQw\nIZmFCFoJebLwKphP3dUWdWWKC8RMEoGPC3hfhgHqEq9Fw/OvNJIpHc0KWli7\nAsztHFbOcoed8wnKRszFrAuBkSZMtU5X66Ti8V1vTiOwX38J3UfgBKEwlxHx\nheFDsRH2+Y3+m8u/xgr+zDaMgyYnTMhSpN51+WDV+TAtU9kIhlBEpgmL7AHP\nvrNhZeTgtw3JM6qR+c2D0MgbS/9dkP2kHOI9/UtErM8ldivAoaRUakUI7sWc\nFloM\r\n=Bxkp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpsT2IbzP/LBcMxDyYqOlyH+IJWvW08JQzf9xJb0I7KgIgJ3/oP3s9uTR4ccDzVSIeKleb0TGwPOmshtZxYzoFeJo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.8aaf270b.0_1596480067383_0.5508074140482027"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.5cde9f12.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.5cde9f12.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.5cde9f12.0","@material/mwc-textfield":"0.18.0-canary.5cde9f12.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"12da43d72184f78a2245a6686a1ebff3e7bb03e7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12da43d72184f78a2245a6686a1ebff3e7bb03e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12da43d72184f78a2245a6686a1ebff3e7bb03e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12da43d72184f78a2245a6686a1ebff3e7bb03e7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12da43d72184f78a2245a6686a1ebff3e7bb03e7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12da43d72184f78a2245a6686a1ebff3e7bb03e7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12da43d72184f78a2245a6686a1ebff3e7bb03e7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.5cde9f12.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-mbXVFdh5u/w3KsA+u9R1c7Jg3TipCVe9Y5+kygIuQdyC1zV0BGq7b/H1nxUiw/XE0mNaxMwY1K0i8UQvh/6JbQ==","shasum":"618d53140b77bfec8566f8a6acbb4e188d324ce5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.5cde9f12.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKF8ICRA9TVsSAnZWagAAAmoP/RL68Nu1dcpIUDldcVz5\njtPR5nn8/zQLOz9moIcaJAblvuaAY9RClwUbp/n2UEl+AQ7LhErQa8tKI4se\nA35TeWKZRLReQLwIKlbFd28GP5lOi497Hlt+v7bVFX4xY8h3DyrSwlt8XKAi\novBg2+p1pU1eu+VXvw/6krQ93v6opVNTVGcQQFYvbG1y4a9pXtusJQbGJWPX\nOLuA1sentaTDCTJHrueOZv6gnyJjKQxC6e+G5vggW4/Exu57f8GL3FG6zvVx\nsOUHNPiGkL6UYqH2XnzKtsIOsVVDuuT7r+xQHRO/QmF2m8n0uaT+9BrOFUrD\noEk2TBsfccM+3s1WOiMGjPlL6c91V/QZ3tpysyy+kS4KHQgRkfDAOiJLDXd/\nqIT58glkqz+EGgct2indMMbBh66cJDqAKE1tgSjqjKXJ9w936AwKE7ZaFh1/\nTd/2B4VmnSj/PPqC2a5wJK1VPbgFMYAwBQmyen8Tw2w+P+xvM4y7it4ppqW4\nSfW823Maf0tpW/LlO4ya7iNxXVvrg6BmFqWF87i2FQ/jKf30kAJXu6KOGeY3\nIWfjGyTofzMqLNy2h6AShnagRjFa2X657kHseqeJTLn2+oO+W6se7D0VeIpc\nBamFVsk3v8wWVPYapcdU2fuMqxCIs0Q7HyOTqIB8ubnKln1wv+g8CRnSLDmP\nJJKl\r\n=zvEe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9FR1MHpcRU/KIpQlEggXrGZjzwxhOoaz0WImjuSzY4AiEA7Qeib/Sz6PEvjr7ASP6RQ00Rs+tlm45z9eBweBikwNc="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.5cde9f12.0_1596481288486_0.6375342438330867"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.1607ec53.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.1607ec53.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.1607ec53.0","@material/mwc-textfield":"0.18.0-canary.1607ec53.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"0ed0cf9b8288929f621c044aaed573575e7f23ae","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ed0cf9b8288929f621c044aaed573575e7f23ae/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ed0cf9b8288929f621c044aaed573575e7f23ae/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ed0cf9b8288929f621c044aaed573575e7f23ae/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ed0cf9b8288929f621c044aaed573575e7f23ae/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ed0cf9b8288929f621c044aaed573575e7f23ae/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ed0cf9b8288929f621c044aaed573575e7f23ae/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.1607ec53.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-tXdFELGDVM0DHfg1isRqCYMeQ9C+9mfmn5QEO3jHuGNwj4JDY7DW6LqkQffMuCAan6yLcCRUbHp9TYLmABqmUg==","shasum":"07a8e397e36a8464bc0bc478a16bc5e051c0c9be","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.1607ec53.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKGm2CRA9TVsSAnZWagAAD5wP/1p5sA0c1S2oxq88ju84\nwytQnbVghgKq2TsEzIAcTwepjtQn11s09bsm1BqMfUyD/dyObJVzvclwz20C\nkhD1VeMMxK9RvPo9I9ey+JYmw2yGidQNB4COU/WT+sRe8CgsWHmeDryiFut0\nhw9lLFgU0SURYSDI9LnhnDlviLYnZs0Pptv4wR3VHLbF4FFujVhej7N297H/\ndDPFWu5Y6lCRc1TUkyOd84+12Fz5f3Sp6SmDv7JZ8AFUzgPReDtZvBVa9xjQ\nkfCfZWgYnEnub1fQHuDP7JxGn9yk/5MPK5TfWElAKo8cU56RBEoHuqd0TI4d\nyhKH9ZGVSX9hWjTZiJklWuJji2A56CmEWA0oNJxJyeEFk9jZ+JlpKk+rb0gt\nPw8g4aF0IZaYnb6rnCNp0wT5tiGq21iad4/TDUhEr6ZLu83CVK2Uyz1KWorE\nmGT1Ode1Hfm7XUZn6pnqAE0MBIxWTQB1UYj7dr303VbSJTXcoIP1JPWTxAa6\nqAqoQNYq49GUGOjOSRO09xZkReejE/ORakkYWD5zW/EqUrvm1W6W6R8WEpZF\nVOVJ862mXTF5PmdT3tZFUT6TLSXfqJr6+4wW/4VNr/0aXr2DRnz3FhqSxlka\nBDg75abBbFaLk7q3WBV9s6g53zZ8aF0GSl+ozwSeNSjQOk1FG53BLo04fOzQ\nZD9V\r\n=JrY2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChQh5TqOgOfBz+Y4FGpIMnJXqqgwTkMSczeYN01MkFIgIhAMfZrtE62BHWErW+DyAGGGKYePnJ+UEfkn4wFqONdDF/"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.1607ec53.0_1596484021948_0.973234358878261"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.678b30e3.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.678b30e3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.678b30e3.0","@material/mwc-textfield":"0.18.0-canary.678b30e3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"53d3656f4039bb116e0f771ca0dffc41b500bb59","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53d3656f4039bb116e0f771ca0dffc41b500bb59/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53d3656f4039bb116e0f771ca0dffc41b500bb59/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53d3656f4039bb116e0f771ca0dffc41b500bb59/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53d3656f4039bb116e0f771ca0dffc41b500bb59/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53d3656f4039bb116e0f771ca0dffc41b500bb59/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/53d3656f4039bb116e0f771ca0dffc41b500bb59/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.678b30e3.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-6ewCTq6Pr05XwffK8BgKOpk5ZekDApdJjVicHX2vCVYnIMx4pUGcaJ5i8EzKJkALn2iuA2v70oAp66atNhL7vg==","shasum":"e2d684dac41fd95bfad48343b034b02dd5c4fce4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.678b30e3.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKGqgCRA9TVsSAnZWagAAzh8P/AsVA2VBhYDBMfOL2t6j\n/LMj4M67XBYAOUFdHsEo7sCmPK0qzJwjG7MgYbVq/Ba3rM82aH8WIDprsJnj\nwJ/CLvWZQpVlmjB9WdANb5A3Wt3IPwc71rmPVw9IjWFRMyem1e4JQsF86pIT\n24lUnfyxC10RLgYwh+QXERsnoN2ME4BUlXS3DBmsmyOqsUjcqMPJUPrdqrgH\nZfzxGJEXCJEGZd/yftHAPiwpvDcnlkb4wHwmdF3Xmz8IPMiXkwPaoBvegMLe\nZopTlKRBbRdxHq9n7IVoheJFuiCHo8QQR5og70aAypz5O9oCX+1M6bhud9tt\nnLCP+xo6gvpaZvtKwiawaso0TQ1Hc0gsC3IXUm3Q8oO+PfHUEt1F7Y/sekNc\n8CNgQdhns8QCzSwJPFBgMB448S5DlS5ripgYZW9WTI7EC5v5QrtvlNOI9ztY\nC8vH4fEyAQPBQOFxNNQ2msz9ddhKdXHkTlGKaCcf17neUqzLFbYj7ltND9BY\nYyhGLHwl88fuN/B4AZ4ov96vwWLFGTCa5TH/62a3wgBKrA89FaMcwgyqCluz\nCT/VHs0qRiyKFiwzuGytDhZYhFV8ZsYkBj3iDl+SU3MmWT4HgX6fWdKj5GbA\nvRpBP9YKyqldsFUY1ErOiZgL6hylQTK6Z8/NMcghDSwPXJwXUbf3G66S5P2W\n8wy8\r\n=6pa7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXhBAWT0cfRJtRBmgAAMYx87ruWj3dbFtuIKp05YnTxQIhALW1L72dBxe654wt6c7387ObQ8bVfMtn3XdK1sK/D39q"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.678b30e3.0_1596484256035_0.530304555140753"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0-canary.21c55569.0":{"name":"@material/mwc-textarea","version":"0.18.0-canary.21c55569.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.18.0-canary.21c55569.0","@material/mwc-textfield":"0.18.0-canary.21c55569.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"65f46b7dbda996fd5cc43abfdb42943515aaca08","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f46b7dbda996fd5cc43abfdb42943515aaca08/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f46b7dbda996fd5cc43abfdb42943515aaca08/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f46b7dbda996fd5cc43abfdb42943515aaca08/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f46b7dbda996fd5cc43abfdb42943515aaca08/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f46b7dbda996fd5cc43abfdb42943515aaca08/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f46b7dbda996fd5cc43abfdb42943515aaca08/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0-canary.21c55569.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-8OqQbXQUJX1+O+UK4n1IHqka7KDmXnoInlzgM78hngscaCnIo0EVsas3m1fV9/RBYk1xmzJQqHt/YCMojYu7Dw==","shasum":"d6f26e2b96156f4169d981a11abec152456ada7b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0-canary.21c55569.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKGwLCRA9TVsSAnZWagAAVp0P/3qWUwqWN6nUgF47yH2A\nRAFJYkuEYOp4SE/RlFfmKHdfbIBeO7eWQ0DCVclwqMXhGqQwWTLG1hTh8kTZ\nECJ39XR2GWfBxIRDCxOBQtir7kKqpMgHIdKxlHQH7oBUbogJ/hZwPrJEECBI\nncrOhbJrvGndD06Zkrw9TRxx0cFvkzfEf/ZTDzNXmp1sMYckxcUhRwAAOcTX\neDvCJ2g+iu1Z0L3ApFPsqZmgwm+ZcV7gW9C760hUJl/2DUSktcdyLinqCvBY\nq/xvN5DPp0P73AomgTgu/Hp2EcHf/YTFp5qbQ7vpnvdV2U7JOSZuf2C7S/vr\nXBt0b2vLU+7vhghXYsCPKLW7RUlbXgIDyRvgpBo0YFVP//WSogk7ZKXj9H2o\nR5VGz0PU/UFp9NqSHQpic0Y/7bKm9Z3yhholE7CqAZf6UwhqAO1DDs9pB6Ff\n5BUFyuZoKwYs7Pc+GCVsxGNoYWr2+Pwxe8QtrGso9ZK/8U+Dbnz6HvZlmTp4\ntOSWRkkm7T0V9fxDu7TQJ5OUhWBtD4A0wKKVJOEAxv8iuxCXocBm1WLjAUzp\nPco/4vW5kKZqfOxSf3JGLRlLFD+yDRLo5gYHbWt3+G/sNgMrEvtu5rghvqUn\nXQU2pOUq0ppv/GLI3TcuJE4Wcbw3WGkCG0XQAJidWo21sLTqBFfbum9v/OHy\nGvDr\r\n=6brk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQmwthSIJkwlIaRUvhghwvbdSOxpUk9zgCLs5COk3lMAiEAoyUR51jJZgFyCSCwjyu3+EJGtV0BeXzgbK4UgZu0/Yw="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0-canary.21c55569.0_1596484619196_0.3320296228097146"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.907d4d7d.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.907d4d7d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.907d4d7d.0","@material/mwc-textfield":"0.19.0-canary.907d4d7d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9bc2fce8a40ef8eff9b7444030f3e2a62cc1d8f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.907d4d7d.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-zlVAM/muXeuUhGF6JT122R+T8Fa+/tXeUcFwgKM+XSmEPwTDK3MC2mnIVquJ7Q0gkJDhrHe3Cv96fzg33syg1A==","shasum":"0afe44c6aab48325333da7eda77a402ee6f0f41c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.907d4d7d.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKIAoCRA9TVsSAnZWagAAaqAP/0EK9pSRumqAltIGmUnk\nrSRBj4NwP5H11khNCFwVveKCPs3yvEfxiQfAz+rETT7QgBwwOPoIh92bUEq7\nO7jexzXBSxRX6sbN35YmqEON6yLIfvEhjwxES5wAHLwvWy62nrptJYSyPYOk\nPK64uQm0gG6IlnU74v5P0tvc7Gq2Z6ZIg/kmjf7zGYr5UzpkOYRWWVBrrrH6\nEAL9H1zh7bRv3DM7In0IX+UD9Dq/mYMWZs6NaNMtMK2Ux5d4RsBEW/TPOMz9\nJIagCwca5f1WY9CSeqQPiFQL0XdT6SHqwQYjA+80GEMJmt2xBFCY/tUTsHT3\ntouY2sXTidxzMy+/xzR0b8pQkHPonGcUsFl27Z0OOaVTBGhwNeA+8BtMESLO\nndD6RTAMDbx0+B/Qb3nKrDTxrU732qIxrHD57nXj7PgENb619VQ+999DCFzP\nYokGDknmiw5bJeKLXU6J2uplaawi0WQHKPpXR6E2qjtoG5zGzTbItpNFdt+Z\n01sgcO/eWiP0bEbw4uUWD7742Ea7T9+qxjNYx/iVL+YgnqGkvrNfxyjht9j+\nmoQXnYYSA1lhD+CcX2Yo8sufPUpUJwcHtPmtqeH1EJkHjcQyNlms27Y9BXDO\n0dZOSEVT7Ypv+YzJ06EH8u1uOotH9HbNvSKYfdAnf0TQUr9TDq9drJQkvloY\n2gSN\r\n=Uc3a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHS5BSWreYC0HsCxRm5cG2ERxXDddDwPUhKUtIHTiS/OAiA8HiTsHXET5Uc9egasUnn0VPzsGt0TG3EcMnFF9nqjMg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.907d4d7d.0_1596489768352_0.007694725909290101"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.18.0":{"name":"@material/mwc-textarea","version":"0.18.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.18.0","@material/mwc-textfield":"^0.18.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"907d4d7d7235b3a3256595bce22f0d7db165adab","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.18.0","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-6KceHfcxbUExy+IhUY6nS8OmbrlrFOFenwyYhIsufEyLHkwARE2jYtG50HVTXFTO+B0EaJ7FZG5aZVz4y6CUjg==","shasum":"31d917fb438af06291366e3c743d3aa65579fbfd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.18.0.tgz","fileCount":16,"unpackedSize":186883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKICUCRA9TVsSAnZWagAAYSMP/1sDxSL7dI2qMnsUnrVf\nUTiKaegymhycSNFGisTU84ic4eGFtLt2tWCYoPHd1WTPMQkeqy8qZGXCNZcr\nrgbNxW3NDxS9He+VY+Cnbg8co/Et4VEin/i0db6eakYxGQ3Nm8bYjPEJCwpm\n0UPim+V0yJJATHW3VCAaKdCZpQtAwa5mPjJZAzoa0B4K9/vxcweSUn2EpHi8\nraROgXYG+bD+w2aUMBWyPNoJmAsP/XgFc284FW7aTb9TKCQNOuGQAPppeRzv\nAQlWg442eCW5ysabfPMoXbaeeE60hj05rUsFtaPOy4apL7/dXelQfJV87Kec\n7jz7qswLmCXg/1jZA1t6dl5Wss9T6ohKoO8k3jFyOJm2NHNWHbLj8dCmPl2o\n1Z+Lr4edOHnKBmt/S7V55Hh5RExmSmaoIs89s6J8+k6I7kRwbF7y/t34KQW6\n69+kfE/oNUEtIYbk/piO3vtXbR/fO6RBp2DV09jXdoKWh3bmLfl55d+m8uur\nv7qwQe3DVrxei1dOhJZd78ggw+wZ469nBbeOe6smrSM+yRisKw0VX7OoiHTj\nrZbhdjk5F8fCBE00XHntx0aKMwefq6KxrhaT5ta6Qz8OFZ08oJiFNx8IuA3b\nKhH6NV22bYcL85Urao/ZUfyE9/AMrmJ3xP8K7Pa/ifoQUl111WUrCcHYPbaP\nVBiH\r\n=6OkE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLTvBierkQol4owRk4vS5zifpXcnlkOzVjEnfLRag7JQIgeNioVBF4gY85dsKmq+anKWHt1g9pYDIrFZ5PQQ1TrEA="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.18.0_1596489875714_0.15252103965473585"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.f7958e4a.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.f7958e4a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.f7958e4a.0","@material/mwc-textfield":"0.19.0-canary.f7958e4a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"814d7f99f2c2016c7d56a7297cec2ee04c29bbcc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/814d7f99f2c2016c7d56a7297cec2ee04c29bbcc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/814d7f99f2c2016c7d56a7297cec2ee04c29bbcc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/814d7f99f2c2016c7d56a7297cec2ee04c29bbcc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/814d7f99f2c2016c7d56a7297cec2ee04c29bbcc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/814d7f99f2c2016c7d56a7297cec2ee04c29bbcc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/814d7f99f2c2016c7d56a7297cec2ee04c29bbcc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.f7958e4a.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-0QjLO7aJ0Kr6ovTxDJ5bnGaGLVOz0OFM0BBSu2CE5j8h4DV1Xg4TgpL3/XUn2optFPfw9x5VQvqFRiTszgdv6g==","shasum":"2cc41eefb694d1d9e5f38c29eef78b58f4d3581b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.f7958e4a.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKMLPCRA9TVsSAnZWagAAhx0P/jHLldSAlvC9sOFYj9Nu\nFinOoqS5xWjRLXztj+E5P1HoEjnstmag6uH5b0N6prJn/J3yc9TSmlWPX1qN\nwAsN/BJd0CHsyunvg1Oa4g72ZCLzBhQSdv6GCIEo8nY1xE5DjBLPvuP75Oia\n4cfKKk99HGBfGemHuJt7uwQ5w++1x7XNgZ/ZxlUuk/Ev9yqHqK9dE7wb9+94\nlh83DjOkgKxXG4QfJiMbF6WpH7otIyGE7OSMy3yOJJRcmU8EE5OTKZnTWPGm\nfQYVhCT7OCBb7/4LMp9jrrGLAV4+wQtC4Cbf2Yfw9Mt2gD0UA9n1887lFhNY\nYnxVmmmcCtzWnBQTRmI0JWw3KCImnizq/uuK2iLeq0qyVBCOqbSjkFcT6ojk\nWoKnmztuYFyKK+IyTwHatJG2p/HUZdi8HxA0uhfP/kYqt89KaBciV7KwJMVd\nMqp69FW1uSe1NercbJSS3KKEFaNdevCG6394HXQA0sdaxXbJwrm8Z9q2bZE4\nPo+pqcLiTQj9RztSu9fW5A9Ka9z9p6QXqCycMok1IoDtXs/lzR9wrY1j9Y19\no0g7QQBbPGrO4fsMUbVTofGchhgYM8O8vsfGftbp5Fv1eDGgJ0Sv6LthcUKA\n5KBrix+4y1B1CaiQw8vhEjo1m5wgdx2zNNofasH3Q5X/+iMAlPnwQjcV3x3a\nV0nO\r\n=P0fA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz6h/pkgNjUJYtRQvgElIRpTpkDA6ggXhfNPf3g+3QuQIgYDFOgiOJXNL2DCk46LvrXQywk1gQSGXXP6dv6N45dgA="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.f7958e4a.0_1596506830758_0.34607857603293346"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.f8ceaf79.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.f8ceaf79.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.f8ceaf79.0","@material/mwc-textfield":"0.19.0-canary.f8ceaf79.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a1435334692098639ad087e00c61c1190812b959","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a1435334692098639ad087e00c61c1190812b959/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a1435334692098639ad087e00c61c1190812b959/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a1435334692098639ad087e00c61c1190812b959/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a1435334692098639ad087e00c61c1190812b959/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a1435334692098639ad087e00c61c1190812b959/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a1435334692098639ad087e00c61c1190812b959/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.f8ceaf79.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-KbNT1I7UoZYgnID22bsbw3PvCoZEi2CuRD9A5KYlsjT0I8cdpEv9P2Nb3miwuYn4BRuEd//qxDPOwsl9Uk4ThA==","shasum":"c8c05a3c7a9c796ab156003250f74af0334bfc35","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.f8ceaf79.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKbSECRA9TVsSAnZWagAANVAQAInSsUUPpI089sUWFmnz\n5mYBPdy4/21ZNjOXMRXP7XO1IWB88QXhVTqA27rrsfxz/D6OKcXGRpVbGbPs\n/IqlITddz5G37s5tF94XFLXtfPKWUjcn49C1XuhhMVzKWYRJdBgAUoMLnHGX\nFXusOcQmS/BzCSrbNZj0aIql7cv5hLuQ4lpoO7/npS5JK63ygywAPFJ0M6Lz\nhAB1ZAHJAJZ9Y/UqvXvAxrrn0bbXnxcdZuoH5ysVYFduGCTAit8eKhJjIo1t\n6MX4j0jtkX59hba6y0KIT361BxjdBWwFlOjV4kgHcjGs+1htVu9tsYHpUDiG\n4Mo5zmRjo25whAOAo3r9CpzLOlY8ZE1Ngn5CKcK89n2+P/PCM17DFhL8xDp4\nN0GImrioWqxyxi9JSzeKCiV+OwO8gh/rqtwBS0DgOYWzBsjWgIM/kCFARkqx\nVGm9/nekXrgRCX3cbVUDtRiwXRs8ItbZebwzyIoJlOLduLIARAbq81KcCJ/1\neKN4ErEjjL6xPe7jYK7e1kVbv7GRN1rFI7qzjx1wQJMLlPp+atO8qaed20hu\nA+OTuzFGPuoCEjzTiiAubmPI6ZPwysepiwdtPnQmZXFXVxu0KtIEmnEbZE41\nVpGRa+S8xhqrRhZdCwFGXaiMwoI53601569gZZP5MX1E1tR0pTM3L4fN+NmZ\n9TFB\r\n=qi7t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBxXguNUbQFa0z6NOmg2Oc2PbNK+MlWrro2ZTpdeWGyAIgGlJXKyRB+UB8k28rJIgE0jBli53ih3vKCUm/iHcM7qU="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.f8ceaf79.0_1596568708209_0.9618179422736679"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.6b9e385a.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.6b9e385a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.6b9e385a.0","@material/mwc-textfield":"0.19.0-canary.6b9e385a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d264df08ac61122a6e48c33485335fe7444fbd09","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d264df08ac61122a6e48c33485335fe7444fbd09/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d264df08ac61122a6e48c33485335fe7444fbd09/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d264df08ac61122a6e48c33485335fe7444fbd09/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d264df08ac61122a6e48c33485335fe7444fbd09/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d264df08ac61122a6e48c33485335fe7444fbd09/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d264df08ac61122a6e48c33485335fe7444fbd09/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.6b9e385a.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-xFgigNOtdymXDbrNGDJT6LUJNBMA4NpEnUfscNbUwx7pf1imxlA3moClsLmlBuZh4pIaDLCgQAj3aMfgigrCsg==","shasum":"b32c30c832a394b9f0356040175cae45e754be94","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.6b9e385a.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKdNkCRA9TVsSAnZWagAAPakP/2exNDDJlHdSpHr7zUX9\nwCIDKGUJYygPBVsTBiT4fXlLoCKE97Xqmu9WK63IPvth3C6Ii6xslKSsDTYw\nnL2A76stMLjep9HuOb4XG8aPU5InC9WzB1g2tJEXYZAqLl9IRl/KBaSJj+WS\n1uPALqOOIvionKwAexE5c2DSHinPObhgIWCKTrHtwKKzOmBU0hZtl5oSAbwv\nLrMpIBnG7aGuC/lJYMz1urKjgwgSgVrOh/LwjUZDcI2r75FAkB3MJzAm6hBv\nM/M20UEB+kyhR8E59If41e7maKMTcLOON27m6iEXo+yk0NJiB/h87nxiRa6U\nlP79EwlUih+enUVAVZS05uwSViZ68YUvA5ZogVgSTzmKb45UhBEd0WXzkvRh\n4nYYU5Qi1VaQguOfMz1n+VWbjgnfcKFzuXIN3tfyXPSD3dcr4kDQJ5fVeq/v\nuIA4U6KUnV1UbRqfhBpBI3xsrSAX5ojGujy3iCwiZAEOvRaVJbcvK1eKriiU\nR0uhZNz4IDV/tfedxQ7ESUqJbLcS7JnpNwyrc8rGWXui39mLCvvaF8N/zYmL\nrVuO2VeUcoVmiKXqfocbfyrC6CihRLt+jk052g8Q/2r2j+rYCSeIMi8ijo5H\nQ4JZ4mm4ZBN+ZTztK00/B/Dw+jxNOB/lmj8F4PF7NqVWto0FOofVZnkjewj0\nt0R3\r\n=3DHD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDy6AE2NPW5L+L27zxKhAW69HEfaC2bSX21/kFyC6CyRAiEA89u61wvBCW7btXnzy6DY1lrzT5LDUhaWEXpOJIJC6Js="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.6b9e385a.0_1596576612617_0.681394223990091"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9a7e6d2a.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9a7e6d2a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9a7e6d2a.0","@material/mwc-textfield":"0.19.0-canary.9a7e6d2a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"162d034ba4d899bea7e421640d7cab04f0130e9e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/162d034ba4d899bea7e421640d7cab04f0130e9e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/162d034ba4d899bea7e421640d7cab04f0130e9e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/162d034ba4d899bea7e421640d7cab04f0130e9e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/162d034ba4d899bea7e421640d7cab04f0130e9e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/162d034ba4d899bea7e421640d7cab04f0130e9e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/162d034ba4d899bea7e421640d7cab04f0130e9e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9a7e6d2a.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-mxNvWSfPrJIXM/wlm8jETa747v2FiXZU/L9TDJUe8ZaYxKRlURU31ykvkHb+oqctcNi6ONL23KYVLS8yUxUOWA==","shasum":"445f909eb5ceb0770670c57c641446d123845840","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9a7e6d2a.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKiuKCRA9TVsSAnZWagAAvVMP/2cmjY2WthC1oWkZSvTd\nlM5JYOc1FFJi0LmsKcpig0VMuuuhBx0MEtYQFBDB8nMonpzGISBxPgC3UiYo\nxlZyAWIEac09HkBbeIgh7LRfh9PPy6P28JGWOrF3ccJDdx/d0MpNzh42r0bv\npzFu7u0eGpYC7Oj/3JhkDOf0mJ2nSjerbE85YeE3dewyg13MGtdYTQIWI37T\nc6XbojVAUwd2G6n21/PUVEXOvQZ4HGowpe/zWzY0tjGaJvXYj1E3w3BTbCpI\n+pQZo+XEPDZbFPYIwcEMKpyrz9RJu3MGDLEp2rjs36N4x0WIHIFmDaT1dalQ\no6KHXl5YhO7+ly4HJDXfoQyW30Hy7LY2VDjbcF8Y3wtqmNaMHEOHpzdCSElg\n56e45FEsaFz2rs0F9QBX0mw+5zX5kMBO9YCkHWAsKB+fs4T/tX82IbNvRCUJ\nEPpBWjFsmpfR46rDOWFunlQ2x/fjRVGd4yZe/+pf6wkNkhvum2ebcSbtd+vO\njoztjvODbZjEsjhCiOih7gCGuUA4q4S5Cxrf6NSl0W/0pfq9JDlNsTVlSa/b\nPCmcFzvj/wfbD4h1NUxUZ/0v/1XrcKkXYrbqDPdeYsOkT0EfHKY3BfkrWoMy\nPjRgi2h/BaoWVH6GRIiAFHQA+zrMefXbyIucP+3CUL/YWlawHL8A5y+iKI44\nY4dr\r\n=byB1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHNU1+sXavizAdrvy1adh6INYMkANS3PbkUrtHFiLW3OAiEA/q4QPl7YDRc6UvEM2GtIoXHajZMyl3fmVvpU3DrcRuE="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9a7e6d2a.0_1596599177776_0.3305893366987833"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.188f3f1c.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.188f3f1c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.188f3f1c.0","@material/mwc-textfield":"0.19.0-canary.188f3f1c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"200ab3c3186265d2084631aa4f47600057a574eb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/200ab3c3186265d2084631aa4f47600057a574eb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/200ab3c3186265d2084631aa4f47600057a574eb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/200ab3c3186265d2084631aa4f47600057a574eb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/200ab3c3186265d2084631aa4f47600057a574eb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/200ab3c3186265d2084631aa4f47600057a574eb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/200ab3c3186265d2084631aa4f47600057a574eb/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.188f3f1c.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-4Yy5tb7q5+Kfo/WBLNZMFpjev+m4ASDLstO1snAZET43Z6PWZJhJBVd9KbisWQXMxedapdGaMat1yu1OGbkOyg==","shasum":"8a646ea5d4806b86be054c5195da667daa7e10ee","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.188f3f1c.0.tgz","fileCount":16,"unpackedSize":186935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKvbZCRA9TVsSAnZWagAA6FYP/AsnjjRCkUjMkdwjGRSc\nESKZt6ojfk7evGGDDthqz2hUdZoGLrDz4B41p/ODXUyosKSfUpLRKHKg+iyM\nnqxTZyvM/9UUMJKr5leSekxTMVAok8ghIYdm1/2R90ENKa5AeMpF2GtPWypH\noZjYXGY78A5qweDysdPaT9dIzBiFN4MyEWdxWSWj4WpMm/1P/CtmXKCsEmOR\n5uEKqtJJenosgUSIXMiljdoUIne6OKJGdw/kMgUUy+TzQUjIGocAsLd/I5fw\nSHNzzO1TqCAzod8wgaBKpgbIKyMm4Q2H//fVDTGLw1iHL+eDOKWolRgJHzei\nUuDXRoz0zhAlBQW6QRs8uUqR0g0jypaz1/uvYt8HqwgOKbk2S2W3mWVbB+q8\nMAEXrGul/nh++idkYmr3YxcCr8Dtt4SqIR+vp2uG4A/eTeLlFZVJyYYpvhtX\nPTLc0eseEFd7asbscM4JHILxlZkkCD6jr2cD1/1lq6vWLdIY5RhunV8u7o20\nQyMS2prEER2NqNYpACMJsqoTEs5Ogwx3r0Ku6QZ5cYC1MA1f0L8+mY1347KJ\nao5wi48Q/m9SDxivNpcbs4Hx4RFoochRunoDFIOprjY70nrf0lXoa8ZSjPVE\nJIYi50AOmZBQaocdCmuysYZKRwZuJdMpK7CZcBfRUoDwxkZIeQpg0e+x+E5K\n7JQk\r\n=7Cmo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5MIUWLUCif6Uu0dNfS4r7KTGV9OFdtsVZl8l4IbuifQIgcr1LDN2pCQlH+br8ZaUaIsNCpyD6ALPMHOcc1lxqdas="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.188f3f1c.0_1596651225061_0.20969455335271814"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.b6106add.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.b6106add.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.b6106add.0","@material/mwc-textfield":"0.19.0-canary.b6106add.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9726e6593d779066f5b7158af254537ee9c9174c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9726e6593d779066f5b7158af254537ee9c9174c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9726e6593d779066f5b7158af254537ee9c9174c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9726e6593d779066f5b7158af254537ee9c9174c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9726e6593d779066f5b7158af254537ee9c9174c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9726e6593d779066f5b7158af254537ee9c9174c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9726e6593d779066f5b7158af254537ee9c9174c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.b6106add.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-pNam8C/ys0LmhdoxbZFwSRhf1P1tiYkIx1YyHa65/Hmnl8IH+6LnIhwBgWzesgREMkuIDCuFTOCXB3Y30bEOKw==","shasum":"9e1232e5daee0271c8da11e89f21f826a8ed9a49","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.b6106add.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKxtmCRA9TVsSAnZWagAAy6QP/A6+gW0ZvafT/M3812BC\nr7uhLapTEWhwCCw3k2jK1k0UHo2xhRwyvvcD5ssRR2H7DfhO+7+YGyRoFFbR\nDABKtivCJf+YcSuOh7WPt/ZmO6GwmCryKlLiQXy7wTsLpBtt7SrhrRb49wsv\nT9Q6I2ZJvImudUhLlgTm87KId8cEe9BsSO5O8yg3Wy6JlrNDckdxw2zuSMnm\niFWysEnABGgtNCpWy5gY66AbHwcRmZ94oSp/UN7gyLMuWw2aqAMVMlvB23Vs\nPj+/GJEIFNl/tOeo1cuPkY3VGlz1DA4d+PUVWjf6Zb4Kpo7OnPGiGNNIZ312\nrPWYoAo0s9LR9UEuqoQ1GZSPtYyn1PY7dTCY1FQZ96YFBI9xn/BrRTrJPLcs\nb9oX4hFwa/uG4IIopeOH0M0aPhwlAY4W7T2JQiOgT8F6RoYHqOne/YGZO1Pt\nxV4JiAB8jgCH1Fr2MWKnCgs8FxkYx/ZnnHIdEf1xneqgA9/doM0BmMK4P5v0\nEswtuPK7OZ4Xo/0nIF3fdAbyVNZMn3vDqaZXDhJSCydXzUx7Q/V27EIiiLFX\nLqncCRGJZU0czQxmtTHAzO/UXCtuMf0dHrUz9o7JyN6ra5IUDuEyW7aha9o9\nEbquotSxnHHo5IXbny4weg1BIVfkbmmS1n9u5AwWzuu58qMMxsvZc9kuM4xW\nhWYi\r\n=XbLt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVlJvb+LpENxtpuXRTg+y5rIzuUZ0QjyGJtQxKFv9BQAiBYX3P7Nm6BHCYLt4+cWcuXuydNp0BckP+i3biMA8IgNg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.b6106add.0_1596660582112_0.04500483744706085"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.ebb4c667.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.ebb4c667.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.ebb4c667.0","@material/mwc-textfield":"0.19.0-canary.ebb4c667.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6911337bd0577b48c85e4d3502ed5111b12a7b4d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6911337bd0577b48c85e4d3502ed5111b12a7b4d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6911337bd0577b48c85e4d3502ed5111b12a7b4d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6911337bd0577b48c85e4d3502ed5111b12a7b4d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6911337bd0577b48c85e4d3502ed5111b12a7b4d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6911337bd0577b48c85e4d3502ed5111b12a7b4d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6911337bd0577b48c85e4d3502ed5111b12a7b4d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.ebb4c667.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-WYlLXqTmRMf9ygWgbLllg1N8Pl6hu1y3zkvzIqbuN64RsvQCiX6UR6I7J9Hx7rZPMCPsOE2YYI904uarGvlpgg==","shasum":"1d72acd6120d9ed9fc4608f794838a7c5602b1fa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.ebb4c667.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfK0x6CRA9TVsSAnZWagAAi8MQAI8iCNjywOWGKaRoQsOt\nn3zkpEOFo6DfmyhayMcDvnUMFMsWNglEuIsGVN+TXrhlSarQ+Lj11rxpvhCg\ni2YxGoQSaetKrdghwLhRlvvzl85QOEoKl2xhObF+OV8MtsCbVEYNUj8jE3we\n/kumLqH1kzI3PPqb6osVErQYCzP37eeyXDdMr78cBCPwHoxNCxVBuh8MN1lP\nGRZLAg0s6cs54kfh+aMzkvaLxFyS/DpRVxzRX6kcblyZGWhjHTZ3J2yWf5Td\nnt8tqvmMcJmpmMf5+moUwyWUxCdrYNR9eadcYSpobweVroawv2E+4IyXpf9Q\n/hBhtJ9t8jOw+seWfJonA1p2NCrIhfLS81+6XxWJOwqOYHpZHT9VxFO9SHTE\nUPu3FLnPkob1OWXggWU4HCoxc+OeoYvD2j+uRc6VlmsmFgy7XL6wqm7isAWw\nlY7liP4Zr3v3wC4sV7d3nmW/sjGZ2P2XRlFQhQMI959vwNIDjhpnDSd4lsCs\nIKt5TDwHCw9p0cQzJZuDxRe9myCe1ZNzTxOI4URlIp3zhP3kdFFVpmXrdO14\nd/Q7WZ2KZhXhbKqSDB4CUzImaVAGGJwijUu/Z9x9yC+hTgLNZdxapucl+FBZ\nUZ4fnrtA1dO/Jr5kkkvmA6lv13Gop255SnVwnlXTwdHqqb5UM231d/2L7r31\nJFhu\r\n=cQGh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGlGAcpZ98d0QJ8c0RoD1vIuZaSX8Bs0zenSpHLBpYqQIhAJVRDXK3eLXuwg4M9qFn8rUUQzZWjBWJNFyk/soa2Nvz"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.ebb4c667.0_1596673145632_0.9623727366685932"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.aa44289e.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.aa44289e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.aa44289e.0","@material/mwc-textfield":"0.19.0-canary.aa44289e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d74632e3e1fce6fddaefd045c8f0b6f026b4e4c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.aa44289e.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-N3b8+miOESApv20uwe56p0dgbqI8Yy22UTynelU+kEIB7i1GwtGXMsWoSU9U7nQ2G+S++QT4prnEoqkTYX8QVw==","shasum":"c263199c7140a5905b07e35c39476295e256eb37","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.aa44289e.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLEugCRA9TVsSAnZWagAAVDoQAJ+vPyc08frlWULvVpWM\nTHB6whaqltk6doPIgxTdUtX1dzN2BH0mrj0WSoSjuqgCoFeXCnKsG5aRgKY9\ntW3gY7Qlr78qpTJrXC3Os7mChmPutEtcO4ACGzuqat4WJUcJ04z3HqpRwcWA\nllSxzYKmcwJfADm4yli2P7B2ExBttTUfX9ADB5ByeZZeIUABfZeXW55yhPuq\n6yHzcQI4rEFal7UoelI2PaI0uQCuz5HkFdc/5dlU5Msy9IAAlH3hNUSpZ2AK\nvrOb0Achb6DQGYPxhi395f8Bu9NY6LuLGGV7MgACmZY7TtCj/xaYt67EgZ3y\nSjx0InWjOUawhKBygc0n634yPtcC5lynd6fC7Tz5f2trE3ilVSYeNpo1wiy5\nQqNPkF4EayQIiTvCVh79xHfFY9tiXCCPPju0i0cvQqQo1kaz3WzUHMJ7dr8R\nRpdbDVFeOwgcrsjMKBxKACquhSgCyMIsByCJFAv1UGJ9wxRt/RsRgPLuy4DF\nd8Paact9KEcf5+O+Qb3ZXX/NHjfXhU7pIkke29K7qTGtxbPHzRSa7bT09Rrt\nS4SoddrJO1LZ96HsXRctLQPzm96JAqP9lrute1J8BazlF/XM7D5CXTB6pE2X\n4pBAtXBTytk759K/43dIUlQSEnckliLF2YpowdCSvCvs1HL8z/lueXdpDurk\n84uv\r\n=HNbO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvlIaeycsxXVaW2wtir3C3btIXH9hfoINII0ND9J6pFwIgey8opp3jmoBJ3Q65aNDPIJs5yQTCOKn1UsivW6Kf2Ec="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.aa44289e.0_1596738463919_0.5434263102316432"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.e6b0816b.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.e6b0816b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.e6b0816b.0","@material/mwc-textfield":"0.19.0-canary.e6b0816b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b80bf3f3363af2f1b704d5fe2fe2852cd416b902","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b80bf3f3363af2f1b704d5fe2fe2852cd416b902/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b80bf3f3363af2f1b704d5fe2fe2852cd416b902/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b80bf3f3363af2f1b704d5fe2fe2852cd416b902/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b80bf3f3363af2f1b704d5fe2fe2852cd416b902/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b80bf3f3363af2f1b704d5fe2fe2852cd416b902/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b80bf3f3363af2f1b704d5fe2fe2852cd416b902/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.e6b0816b.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-+BiNuly0Z7rTdmTmjRea0EjesMQJPsHd7FtBdERpkLm9rDkq6fkNtfrKAV0Y5ARTy0HuTUkSuWdh4Z9H6OQtwA==","shasum":"1e694e998a450f06cbf0dee01784283249e99557","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.e6b0816b.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLaD3CRA9TVsSAnZWagAAZ9MP+wVaKEnv37JWO/43tUg2\nr/z406qwyROG75NVq5f8ycm+/lAv4EO6nnk8LaeBmRoEx1XHjB3mLSKtrA7W\ni0UEhgNPuiP3VDYTzsw1JUChN8Xym9RSKhtvN7UECeWrVMIFX2Il3xkHafQe\nM9vLolzRWV8rR8ZXiF286oy0EiPZiLVkDFsH+nBMoInb2+0PcjmGm8rqiUlZ\nbsma1QnEPq3KMOEU5yHYN7BCd9kq520noat7GttKxBqOD9pyFX4xgmzzgMrG\ntVZ6SZXeyD3ZJQoK3RkhY5eLpg13NAevOq23QuhWwgr4NXSrBDIvMiEEhhmk\nbBskZloqjc5cJeKYFC7vG+G5DrYaL0XOK7gf6tLKd7ShYUe0H8i4jYhasj5D\n2/KDvCaw6KCQ4jUW49bF1CMUyhTbJaIvOYsqEEBv4wPp4iD+9WP6+l5XOPfT\nxQd6+Hay73d0jay+qaEHMa+tW+EZifcotYwWAQsvsEuZQVwNuazhYpqLHaGE\nMR0mnvmeIzLmAKl82Yk2kVtVXQ0iDl1LC0L0E+mX1lR0BVRK6IlUZRFuoAoX\nIbSjFEc1eewrkVFAkqc6QewxMHnoiij/oQAweftEjMtCQnb8vb+29+gL6t3c\npigg7ff5wGdQY2jDhPLy3LCSQgLH+wck2oc1F9Aww9aPagLddPmqm1QYOZcy\n2rkx\r\n=k5nE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYJyJzO5OQP6kr35gwPlWfZFSMDa7sJ+MZ3BQ1Z/4gHAiA4pmeCN2rv0JVal/CxQbUbekMNk0ufJehc7iHCpTRngg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.e6b0816b.0_1596825847502_0.5631443265248961"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.96d15938.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.96d15938.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.96d15938.0","@material/mwc-textfield":"0.19.0-canary.96d15938.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6e91207d87648ea038ff3d435537ba7b2014ec19","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e91207d87648ea038ff3d435537ba7b2014ec19/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e91207d87648ea038ff3d435537ba7b2014ec19/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e91207d87648ea038ff3d435537ba7b2014ec19/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e91207d87648ea038ff3d435537ba7b2014ec19/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e91207d87648ea038ff3d435537ba7b2014ec19/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e91207d87648ea038ff3d435537ba7b2014ec19/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.96d15938.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-RW/VfzdPNL0iS2PhLYAr4RDlKTijBsauS4I4FOHgfbEuyxFYLGLF2U76uMmdgA3w7+PjkLp2L1Dgm9y2IHY85Q==","shasum":"fefd358c1917cdd1f495ca43359d30aa2e0e4af9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.96d15938.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLbmcCRA9TVsSAnZWagAAEKoP/iuRMN3SqGd3hhj43GjD\n33SJgjhrH6YkHXNrDFNNxh1KROGwArkuIK5qaxIf+oXAZDB+Lk7KeTyy4eTW\n738ATRL8XkSmziDrVgOSKcqF+giim+Kv2yKVe1aNpQHtoY1IBxSf/lG/g56+\nF9/VPs79EoThptvZtkuckcRtneEjj1Cdb1Z48lGaeMpy0BZmAuIA887rCNi6\n5co9sQS6OQfniFqZ1RpO5dVDAN8fMHDBHKOwH0X7Pm10nZwNBjaw+r/KVqma\nJg6o+TtQ1Q0QLyyO11Jw+EpncGsNcMbcF2l91w63B2f+h0iY3wqjPQaSUeSy\nEHuLaLuSgUb9tjCA59czbMk17y1Qt9NKbkf5PX8+uCgfzOWDqNTJnya1H/am\nzCRBOGO0GPkwGus/iSCZNUQvG/iRV9zOn75EMviADBhNK8xHxlvj8xN8KL8h\nExRNVWfujctKTH26xyv2cB1GPvmzpvudI68bNUfGubXzeLrM4z2G/bIJuRnn\nLZDc2UqSqqTHj2QD9l7/XzcKP81APk/k6xNqLT3HI7VHDXvQO+0cFrKXbDZw\nMWl/ZNl/RFRmFM07qGNx6cyCqwEG4f+Lx2x+VpJHxbd1PFnm1zBsG56mk55T\n86+tRbNRMcvQYaus6hjgBKMWymuGWkQKUfbCvWaJtoto57c0rnwcZF4/Dgzb\nNP2R\r\n=xD2I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP+npPFhxB39XXqVLp9H5NYEDFJHenEsEkSch3OEJ80AIhALwJT5Ml3K9ufv6RA7hpgEiWC7WKn8JIjrAuvbwN+wW0"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.96d15938.0_1596832155858_0.790054297794228"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9d991c8c.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9d991c8c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9d991c8c.0","@material/mwc-textfield":"0.19.0-canary.9d991c8c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b96115b555701f0a2fb8299279aa9dfd1bf6b4b6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b96115b555701f0a2fb8299279aa9dfd1bf6b4b6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b96115b555701f0a2fb8299279aa9dfd1bf6b4b6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b96115b555701f0a2fb8299279aa9dfd1bf6b4b6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b96115b555701f0a2fb8299279aa9dfd1bf6b4b6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b96115b555701f0a2fb8299279aa9dfd1bf6b4b6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b96115b555701f0a2fb8299279aa9dfd1bf6b4b6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9d991c8c.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-ppErWmjZR7JexM6vywvKLIOps5qorgBL/AQqMsSchq0z0LfHIMmSl5X2PDJxdU/Knm1l1bOVVlKAdD5AANUAzw==","shasum":"a7e7785ad52b4b4245f0ffd43110cd2bfff65552","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9d991c8c.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLdDvCRA9TVsSAnZWagAAppwP/1P7RvHu0FyHnlK3/dkf\nITWHY5Gavj+2Q+mLn/A9PgrQstHoh6bT/jIWHt9lZELHElV+T5HtLu1O/JJM\n5dEAuSKE/5Ii1RV8jCxNdVoCsSo58XzqCkczuH8JlRv5/yCDplzFhoS+jmDO\nBZlrnauyCJqahRAeMSMl10rLlZaEWwV6UKhE1UjDl8Wr67E+vpu8xvGNsvqS\nGorf1u4GFnWqKNlbyzYbR66NZJeBO4WNAVQIMRSeneks+iP/0Vc/aVxnBcVv\ny7yREWkDJ1HGFeY446/q5HKn9Dt5HnhjhdrtKGKbId7wqq8IvEYAMmnqmQ46\nbhStbS68UZEn+Hwd65aNfN5tFgm2Pk6VZpcri5dF7bqfix1RAo42M5JHS3Mf\n9EpExuN7eQWEehwgxUg9fbgTqd7zrMkiGEz5Yxu7kd3UvVmt3B03Y/KoWWRm\nol1iPLcgJCEBoHTVm30y6FpV7eLpPEqg4hgVnWP5ELDqWFimZIcxpp0cy6D2\nUTOCMZiQNbUoZlfprR5sNT7oruVPqQYYKGSuDyyKHtQIdrAfWnu40+udGTWV\nyQz6UwaLJUI0kZ6KyuYh8YhmjvZCdHnbHm8jzf7MPeU4MDpIlTsDPDp6LOfH\nkzmq3tysZ/B0Wg6hRBBWOU2mzQ5+/A9F05nKk065SsD5lXc+s0YpzTxg6mo7\nqMCj\r\n=wpBQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFK3h4UXSNeZv3wdnbjJxumSCD5Jtk2UKFAHP09Xc+SCAiEAlEns0oIbH6DQylEy98cmuvcV8N//9fwbe5vzVHq6xHU="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9d991c8c.0_1596838127357_0.06457215862035603"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.13bfbd72.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.13bfbd72.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.13bfbd72.0","@material/mwc-textfield":"0.19.0-canary.13bfbd72.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"801272b0ef15e1f90e0ba47c6a8d185052f8c48f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/801272b0ef15e1f90e0ba47c6a8d185052f8c48f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/801272b0ef15e1f90e0ba47c6a8d185052f8c48f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/801272b0ef15e1f90e0ba47c6a8d185052f8c48f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/801272b0ef15e1f90e0ba47c6a8d185052f8c48f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/801272b0ef15e1f90e0ba47c6a8d185052f8c48f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/801272b0ef15e1f90e0ba47c6a8d185052f8c48f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.13bfbd72.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-tmCp1vR0uJ9kbwKiS6lyrmcAxh3eBK/SfDILs7qElunCwSqO9zGk3OKlfhdckj4bLrhj/p7Ra7v09+Nj4UufoA==","shasum":"d7f0b4efa8ee841be5b24c32a0b9028064f4d870","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.13bfbd72.0.tgz","fileCount":16,"unpackedSize":47717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMZ+vCRA9TVsSAnZWagAAntAQAI6puVOLNhroh0Tf8U6V\ns7dd7w4ctsNwoBgjnIZAT1q45BDsRnILC+BG9wRL1M0EkZsyzSuhZgT1DFxW\nde2z9cwj6gXoUAN+QszwV2aEta7YqK3z6MTb9zNXeS7/mP76E2Mqm60Qe506\n9y+hA1DIZ5dFH5fNNSlLguT6S8ylQxSuts7YcXFGq1WS0RfNASJlZD/jYtvR\nJJxhl8OgruKFS/Ph3USBiD7dSYjdtI2MTooq358qayVPxmbxyOOCz+RPWntD\nFLGayIKflnLlOY+OPifvonIYMMZ0GwGBmZPc9WUE0l3NtBH31Y+4ytg0PeWL\nCkh4jUwMmsbHG4wf8E4L1YrdZxH8YrRR7xq6JdIope6+Vb9OrtfIbILu3wTi\nGMPYgVoyjCLg3RblegZKf79C+kT1lt6EbWyuSzvM8XbpKOD214v+OnnhwF3C\nUjEeVn3f3beuWo945uhncRw+hv0eABAPHhNYa0RN4N8pAi1w7kTe7p5HXqdG\n/YuVeCy/EPayrIjEAxL9Pof2p2Q3dN5p/2TzAJ47S+ZnlJ1c8NYDnf7Vt6Ni\nKOQjRRW1kEE0JccyycIz89CxIRPbmZ0M+uGEvYuUkAozAuyaoHqHeGE3KNrq\nrtopSHv7dZ/GZHg2forXIs+KOlQU5/UWKDWshJybrXE/sjWCb8Ot/ZOAsvlm\nHNPi\r\n=99q6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEIrG64z2jbAKxyAiarCLSays0nf8rCkdr08i08/Knj1AiEAtb6m2lyhURaoalXidswg8PoEb5JFLJu5vDfUhJA0fiY="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.13bfbd72.0_1597087663182_0.43536957071520743"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.30b1b258.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.30b1b258.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.30b1b258.0","@material/mwc-textfield":"0.19.0-canary.30b1b258.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e34fbf2f01b3504b83592cfdb8b30914bad24498","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e34fbf2f01b3504b83592cfdb8b30914bad24498/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e34fbf2f01b3504b83592cfdb8b30914bad24498/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e34fbf2f01b3504b83592cfdb8b30914bad24498/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e34fbf2f01b3504b83592cfdb8b30914bad24498/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e34fbf2f01b3504b83592cfdb8b30914bad24498/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e34fbf2f01b3504b83592cfdb8b30914bad24498/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.30b1b258.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-Pz9ccSI6vJQ+SdSR5HI0Tpz+VLRIeLgkJl9bZdwouc1v5FicdYGfVXBhAQR1qUP7F6Iqqe6ouLH8bAQr6X56sA==","shasum":"c73f2b1e8203170f26cf7c5352f66d8eee792afb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.30b1b258.0.tgz","fileCount":16,"unpackedSize":48054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMaj2CRA9TVsSAnZWagAAqQsP/jepvkcnB6tT7Ye8eNmU\nYmt8Fr4YSdYO50yExMyVGk2cAxAFEuwm/1KZ9B9Ia9VuOC8RGaKLJDxztPwl\nTHxFxv93jPSCBGe0ZwBUgJbG6WGzGBJH1cwG75LZkm2mdRC9mENH2nAjijU2\n/KdWHZymiREBf0FStKsYmMcVA+QLmjuZSkFvidoKA0Y7yom9H7UK8cTcOfYF\nDNR0KZMuf0AV4CH1ZixrKPHvCp5/woXGdqGGQ9nw5/RVCJLDARkGgSruHXrv\nEd5SytVqPJd2X1XKPgVPtnuQ0+PNkMhgWjP1XGEgyV7Izd8ZP7Sfg2YLz8Z/\np4BUsjFNxcupmI5GieKRNi8uPHr8RhEPX4UJ31tFMo1XypzcvrYmI/dTWWrC\nxaxC0OOZ7goDpjdMHtvj15i9HDhoZj2suxlFTPqEj4ZvyHo3b9ZPAl7byEsN\nQ76Dvemgqd0t/LgZsGbTAQ8AluQzzVbBEjvZ/43bTtcOk2aGKCemCaGUp0l5\n9y2dPd3bR3EzRbasDMbnMNJueIk9hBpwPfIWgQf8sM21NpEG/4aV2OVJvFYH\nLEseW24AXbNWmnR0nM12n22dML3Djk0LC2qj7KOwQiHfCGQdKa3WL4axHkRe\nxoOMoG7CS8GM2Q4iak7wPNYK/j+sLq1u+lQk+LevVpkqQkz7TdjRLLYvtB1Y\nHXYE\r\n=AVtm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkwXIUAIeCVKOtlqxKfBtSIDjxn/CUpXT6ryLd93GQZAIhANYuJe6zqKtUgDBOXKRrc1s3CUGdzX2vIASlY1h0AHOC"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.30b1b258.0_1597090038214_0.469012159510956"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.1583e263.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.1583e263.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.1583e263.0","@material/mwc-textfield":"0.19.0-canary.1583e263.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e9ee447b02f2731c33f126f2c3d32bc3f2808125","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e9ee447b02f2731c33f126f2c3d32bc3f2808125/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e9ee447b02f2731c33f126f2c3d32bc3f2808125/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e9ee447b02f2731c33f126f2c3d32bc3f2808125/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e9ee447b02f2731c33f126f2c3d32bc3f2808125/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e9ee447b02f2731c33f126f2c3d32bc3f2808125/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e9ee447b02f2731c33f126f2c3d32bc3f2808125/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.1583e263.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-oEQFdIK0cYCTUXMvmNVsHCMNY0p2yUAk+FjOchuj34mGnHwy1Rm0Axw40IzOpmPosXoIJMiuWEx4OhFyeOy/ag==","shasum":"cf2b623bab5216d4e01b4cb8be5d5b9b7f479eac","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.1583e263.0.tgz","fileCount":16,"unpackedSize":48054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMyWLCRA9TVsSAnZWagAAVsYQAIbz5Pf34smXiGZ6DEXy\nkLjMHI/ZiJcXdJR/Ap08DZSHRwWcVk1U4VwTgAPKn2apSIQJ2tT1XgHkreGm\nwuY0BvjDBCmjCGvQwyQQUrgs8/RvHIT+CxrNRFlvixnmH7KuqGY1j/s+7tXq\nWl8wjw53Fj+TS+26QowBNP94IR9nRn1fGZy0bizRO0JCgnIfkowBGt29XjLr\nt/0VeNaqGEqrOlaykxfEGKo4d3xHvaUWno9rpiv4M1tkehSHNZGh0r1tcwMS\nJAP58wQ3ELVqsm6LTx1XPHv3hHLCRMCSo+QJRMEAXMZBPrPWoZflVKyqynqi\npgkqaUyFpP1nSGKWbfNNxj/HqyC+gakcZeH+ireAwTCS0l9xw7FdJtQlkLJX\n4RlAmzVGypkLkwo6/at2XKxujyeN1cFb8EN9JFqmqJ1BRS70w4uf/fCDLBdn\ni5yos2Y9cFPM209c99RAJgGd9c4B92Ll6TwlfboSAchVVRcFew0s0l2RFF9c\ngNZoRnfWZGX1Ra/2/Bu73hd4Qi6ZOvLKkMMcSkCvQqZDP797KuxfUGLdrWKP\njDT2qFtNEwmBk0u4k6sPXQXsTDpqo9uzRzyDU+l4whYUge0206ek9B/KzhvQ\nTFyH01G+p3StvHlbOIfEIaSszUXMl4GldcHFJywOOAxasLLxu/95ez8J4rka\n+T4I\r\n=Nwn8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICP/XfVD7efJh8MtYm0wnrPnsPYq/YDly6KS9w6nwQHbAiEAw5+Q+p93uNqpPHvblqnjtxjgyp9Ue6/7wBKeAki4p1U="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.1583e263.0_1597187466673_0.6130378069405578"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.fefb1a93.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.fefb1a93.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.fefb1a93.0","@material/mwc-textfield":"0.19.0-canary.fefb1a93.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"328a8921a50cd0f162f89703f12a9e58406fd111","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/328a8921a50cd0f162f89703f12a9e58406fd111/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/328a8921a50cd0f162f89703f12a9e58406fd111/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/328a8921a50cd0f162f89703f12a9e58406fd111/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/328a8921a50cd0f162f89703f12a9e58406fd111/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/328a8921a50cd0f162f89703f12a9e58406fd111/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/328a8921a50cd0f162f89703f12a9e58406fd111/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.fefb1a93.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-haqdHzB5Sfm7TsvDrbsWA0buvbxyRNgVLlxh5F2386khv/yjnvXhlnRrnqkYFZMCGlT6Rzv891DcZ/dKvG75gQ==","shasum":"9c9c5f2f0bf538d0d5e1fb52d4ad4a4a1b1a3f4e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.fefb1a93.0.tgz","fileCount":16,"unpackedSize":48054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMzb8CRA9TVsSAnZWagAA4foQAI+Yb0Z+Yo8KB08P03BN\ncaDJLBKUntEPd8vN7/aW4JEIU5QLhX5t/uflDfDRc4HMpacy4ilJFEp4i9Xm\nz8+k3EnGg9Gyq+LfWpP5chutijOta8CMgfgJKkudCtfQot0bUtafUznjY6qJ\n611FQ+sHahq0V4q4wJfwxR363Da+1OFQ4qxkqOaPYaZnSN0wM4v46rjeGc0z\neZujjseuDzEKADyZydssLZ9xQPQS7M5BMC965f0UZa8afe+gIofGoeNnW4E4\nBUnoRgnJELecBMxj40sRbrKS505ffv9aGOpeTgzIDfq5+HpnwCzjTbs3DDSw\nZrlTIVe+Mbi2s4rMjFGXlq2f7fa5NDvvUOjnOjnerKOlRtD0J+HYmo3WYaT7\ncgf7rIAA/9bVY2BBkwPXrD52TtE0czmIP/Ak/O7WlClEmfwWKu8bWB9UY+4/\nP3IpVPKHcaWSoPxefAM92OhzcNq28HWanIgzQG9mkxhs1F0esLafAxz4bWZJ\nXOvrMs89fLhi+28rMLFhF9KGKV91RHFosWTWz01jfh3YgDC5JzKtKIF/A3PE\nUBD2w70dvCp9gzNbd0K+Zh4108giTxupzRa/2kDS1NX6JJ7SOCum0gTPXRvi\n0tDRWK9bUGu01jiOv3JavNRrA9XQZ/QKGSFm9dCFNaLGIhxe1TZnM9uuqosj\nyLpU\r\n=1hfr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDX5xprEldcpla0pekA1e7UcAe9vN9h7o2HKWyGV3oqsQIgdvExEdS7LcwXiydsl0DGgIYrm8Mo0DtR0XPqP0QGYq4="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.fefb1a93.0_1597191932356_0.2763654456010525"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.1ac5b9d4.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.1ac5b9d4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.1ac5b9d4.0","@material/mwc-textfield":"0.19.0-canary.1ac5b9d4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"33bc5db0b752b7e0d3710150fbb0449121619692","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33bc5db0b752b7e0d3710150fbb0449121619692/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33bc5db0b752b7e0d3710150fbb0449121619692/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33bc5db0b752b7e0d3710150fbb0449121619692/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33bc5db0b752b7e0d3710150fbb0449121619692/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33bc5db0b752b7e0d3710150fbb0449121619692/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33bc5db0b752b7e0d3710150fbb0449121619692/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.1ac5b9d4.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-nnL5jtysrBR+VSLud8nR2he4swURrqvG1+gUA5Q2zifhBmjedY4TGD2rFHNvpPbXYTng15NeBAb2dlIyVpTrnw==","shasum":"a7adc02f79cd1881c3624547d08e72fd8acbb30e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.1ac5b9d4.0.tgz","fileCount":16,"unpackedSize":48054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNDSiCRA9TVsSAnZWagAABkMQAKB7durKf8yvUoNUvkWp\n4hWT7iplpqbfgGulFwstV+Kf0fuLHOXmCeRXg1zD1goaYlV1YlH32XuZ941x\nNlaXEUA0P3sWRyhkjaNGPnSazHpNMPMAF+mxX20dANoyN3q1QtB/K9GXO91k\nc+Gjp/2SghTuLkfKXoFAfxBZL/rYWV8QtCWtpDQlQA//PpAf7Xo9sXXj6ncW\nLAlvXcm+jSCV7eFwJ5fmukfXJF5znMf2FGf7PFjnNgXnVIRah3ToHWXb25UL\nfcbnYebAnkb3Ja8q/HVPPAhFIa+G1YNspJJUrZI3gIvUOBF6077h3a6xHVml\nJb4El3i63702rlnyDp6LJYQZUbqjH14uA5LFjC+Z9fbg+DB9+WoJR7HtM8B+\nqNWRB4SVjOwqsJyfYZ4qRjQmcYV67lW7EdTF/54BzTDKGKhiNbVLfu+lE69l\no7e7xUih6uYHGu8eRroUJ/eXBipxQQbl+L8DYl6sTft9ykl2yxZI/sUDnoh2\nGcncLrXX1JSGD3UFRjepCRkS8AXGT9VcGGN/SE1iW/DaFh5oHiyz2Bi60Bua\nDI0r0EhsOmsrTPMlPb+zqbUWsazwwv2OzymH95MSMISXj86P3Mzn0toyNaSm\nxby3IKSMdrD+5OnReDTv0uwbVm4Y2zRM0QEJ/0L0TQ0CCbmQIQllYsg/2Iec\nW/Nw\r\n=IADN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBm0+q7RXCW7IBn7+AX+BTlRZ/SQcHlMBBD7mju/GcR0AiEAk4phZ+jNg8ItE4y7TzNepcObuW/R+ExSgIez/5hsGP0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.1ac5b9d4.0_1597256865632_0.18321087184838247"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.f17f5052.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.f17f5052.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.f17f5052.0","@material/mwc-textfield":"0.19.0-canary.f17f5052.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"837a87ef49533f905c92ab0aa9faee12e51ea3da","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/837a87ef49533f905c92ab0aa9faee12e51ea3da/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/837a87ef49533f905c92ab0aa9faee12e51ea3da/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/837a87ef49533f905c92ab0aa9faee12e51ea3da/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/837a87ef49533f905c92ab0aa9faee12e51ea3da/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/837a87ef49533f905c92ab0aa9faee12e51ea3da/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/837a87ef49533f905c92ab0aa9faee12e51ea3da/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.f17f5052.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-L8EfWLAl+XKYd0eIObPzuuJ7f28IOOk9IPpfNbh+prbj6txkUhEZGTVJZU4sYU21SaGCm1xFab/tQbz/OMqRzQ==","shasum":"8f73b89fbea8070b5a0c25a36e623fdf1f191ea8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.f17f5052.0.tgz","fileCount":16,"unpackedSize":48054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNXUKCRA9TVsSAnZWagAAfeAP/R7mu0NFNiqwHEoBlEEJ\nPpD3fa4ZLSPHBfB/oe3/N6Mc2lGN+Rqukd7IpjXtQK8xpIofhcWjpptP5crm\nSPLRZADMxZW2V5YKdKQoFjWModJkgpzfPF8gGEDiCVHnhKeK+ysI2Li9/vSl\n7p7y4owdNrCPtLaE0fuAJmNKJNMb82PA+v3QkO76r9DXAQ6a0yviy4lTaq5O\nrhqkolVxvPivKW2SjncHPMG7qVSdxqKksx3fhA6W8IrPztMl6GElNVAaUfI5\ngUcoBJg2IgxbTVXKOorZdYfWh9s8/qzjMfVm53KNyMsZtiBySJ55lpeZhZbQ\nwzxW99w/tndgOAV3Ep+qp5oaPfKpB98x6VESj0IDnVMpwUFHwiw9KsKSI1xV\nAeCVXh/1zI9Dljf94AFqfFFNsW7xTh/SyiLTVLejcwRAZeGniGamK7OHd6sp\nodWKyILJEArutV6UPOZLMinLcU9h+pNkaOTS39b7ZaKkoO/LJcD0uCFFQxhe\nCOk87L0aoBbwCfYNQBHGKzpn2leMo9MVyyzH8qX9xN3D+OZRxtnytkoR75ff\n+mlL3OuFAfjWp8woQn47eNS0eg9cd+uNRe27DpIc15HP9NdjR/Ekl0NhbBYz\n5rpNWMvd88nJ8ubJ7yiVg8fQAUQCE89k2jMlnF/Y0LPjZdkJZkIqAVOFi/2s\nzk7L\r\n=O5SK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8dVombJySfFE7UwulSnN6A3ouPF+u2Q72pMDUQGmjpQIgYxOObwaslWBG1Rs3J7e+6xdDLUaBM7NHNXPwF7DL0lI="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.f17f5052.0_1597338889606_0.3469323212032851"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.80b5d20d.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.80b5d20d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.80b5d20d.0","@material/mwc-textfield":"0.19.0-canary.80b5d20d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2183b66216f3cc82a57427b3aa805795f18e0925","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2183b66216f3cc82a57427b3aa805795f18e0925/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2183b66216f3cc82a57427b3aa805795f18e0925/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2183b66216f3cc82a57427b3aa805795f18e0925/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2183b66216f3cc82a57427b3aa805795f18e0925/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2183b66216f3cc82a57427b3aa805795f18e0925/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2183b66216f3cc82a57427b3aa805795f18e0925/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.80b5d20d.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-jwxpp0qM/4/zySfZp1a7agyvqKxf///1ztes/FaYuSHdzotJDtqyS44B3RsCDxcne/eebkQUwMCzSgmMEMIraw==","shasum":"a0867eaefc8de4be1d89a6663e33f5280db2862b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.80b5d20d.0.tgz","fileCount":16,"unpackedSize":48054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNYPCCRA9TVsSAnZWagAAmhUP/11hR/GgUSpdTgPoziat\nlC4QAczYiuVRlThuTW+HuibK4bB91O4tt7J2sJPJ47TCeoQtGFMKaSx2w1nw\nZVbubPd8HaCNUPPR4LdPAChvJffZnJ1bD3lT6OC2+kmJL3VxC9wSlv/ZoPKc\nsq9T+GOilg1gBRrdhpsXzQ61rmw4e4aLEZ/2wizQR+WvvZ9dRcZhCncU6ueH\nuVhiY4BmMo2+aVuaYFNXXnrcJ1jsJ/7JwdIiLue1JNGOQX5UmzDKgV94yPwD\nBKdI3MZ+wgIFUaldJTu1B7YzVrb/tFErYxhKAU+ZNQ59i7Y1dG0dxXrl4kv+\nSMKVJYSKjj28dGR+cUJ/JtYVIkkTxA3nFqdWHUpuAvvXLxipbPY8Y4qnI/RQ\nVcOWKKgwvSHUEsOil2S66KMhdakTSDSxnRxUl1P+HT8bZqG9wXHGY5yMt9dN\njkQf9yOqxgkPHR6Q0i9CtzB0EDmZ+kwo6PwmZEecLa/MElV8sr8DvFbOWeri\ng5fnhcdLO7S7vQpRX232fvYbbzvGJc6inuA6DFKcw8SmtvVO/VM5xmbav3Mt\n7DVyt+AheFpevgXx6mj7+RxmD9EDo3FzbiLVpgzdAFmmTL+CSBQ5SS/6hTE+\ncwCo5estO4vJbVx06DjdiECq86sdLlL35sFbaCr2+6Gjw8igaPcPpPG/8DaS\n0qen\r\n=JT/L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHUdR7TrEb6y0WgkwOAacrlUQ6aJ+hKLFKI74l+3tfzDAiAtY4gH+5A1oZidH+ADt+HkEYi3zL4287YZ6zpsmM4YRw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.80b5d20d.0_1597342658289_0.9981240261319515"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.758635ed.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.758635ed.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.758635ed.0","@material/mwc-textfield":"0.19.0-canary.758635ed.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"dca431ba367368af1f858369557a0bc5db6783e2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dca431ba367368af1f858369557a0bc5db6783e2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dca431ba367368af1f858369557a0bc5db6783e2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dca431ba367368af1f858369557a0bc5db6783e2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dca431ba367368af1f858369557a0bc5db6783e2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dca431ba367368af1f858369557a0bc5db6783e2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dca431ba367368af1f858369557a0bc5db6783e2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.758635ed.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-ozraui1/tIoHYeicrszNZ9Pug5Zq+2sUv8wVHyw7kCITUzg5Z9yx0QU6WUmTM1szMgznXA7FFbfsa77WSinNYw==","shasum":"0f5da8f98db299c1ce44c632322b368e6fc00eab","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.758635ed.0.tgz","fileCount":16,"unpackedSize":48015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNscTCRA9TVsSAnZWagAA6PUQAIp5FMDA/3jQGYwsnkmV\n/NBbusaquVcCx4qcCT9WHDRezH8KjqHe/C8Y4w628y6094+m/waNZhUjDmKz\ns9JnvWNSWD0PpTX6+t62MCxjuZX37q+aRzcBq43fGjrhbckYquJEuGDm/vmF\npH43M7BhiitEufjR+yVONCQF5H4qorHVcH+OikxGl3aPuKFx8JO1wa7+315v\nxoohZncSk/Upf3C80zHry6FCbLvW1OBmRLVZ5HHaUx4MQBlntyfcLhHDIfhp\nRZA171JdYq2ehNP45v/k8TlWvN84/lZ6u//r0oPEHalGgMqKpbJPTzUQCCBR\nw0UjTnp+CHPn7/+9qaG+gbdPIbXrzFL12koKIar6LuCObvUL5p0oaGI1zna0\nWbaQbReK6qp5X1dAnhGuGVu6mdbo9LjTzGWkkF8ShwjFTA7kyECwXYECsYLH\ncRq2/6s1A6ESwl+ZHcPvGmVBcQz7gJOop+16mbuvzhcNuVdAELTl0u6vt0ts\nGMcxXKe10BmUeSfDkuaH3F8jzar5kRMcMG7DaRpXgcglJDXIcZtXOMgdPfi0\n6t6CjFYfJp2Enfp6uy8/sIJXitXQSi3RJs1OYpnX7D9eHQLgsGgf3jZbFWJj\nuvpP3K+EDWWzxvs5tV2IYjRp56PcHuDS6D14aJtzco5Reqcmu2AqxVpOi8Jp\nTXg9\r\n=m1Eb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcOsH7qv8uZMoOBLrrDbewbUa6aw5tskStFTle7C5hzAIhALF4WsV5hLsKo2X0pbqp1i0H774/KZOWfQ2MZ5KYj/eb"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.758635ed.0_1597425427375_0.3656999941379695"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.18d6b808.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.18d6b808.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.18d6b808.0","@material/mwc-textfield":"0.19.0-canary.18d6b808.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"7eb789f1eb17355bf97652cfec031e407c9e2fc4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7eb789f1eb17355bf97652cfec031e407c9e2fc4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7eb789f1eb17355bf97652cfec031e407c9e2fc4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7eb789f1eb17355bf97652cfec031e407c9e2fc4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7eb789f1eb17355bf97652cfec031e407c9e2fc4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7eb789f1eb17355bf97652cfec031e407c9e2fc4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7eb789f1eb17355bf97652cfec031e407c9e2fc4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.18d6b808.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-yxPpxypmeaQ/y75wFTDv96pa0RE9SgfPDlK75mHS/jgeZ1Sxu5tU2k6qLQnVulXO+D96fwsjdpwMxPURW30Uzg==","shasum":"806f14829d63264dedacb081833bcfdb1346de46","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.18d6b808.0.tgz","fileCount":16,"unpackedSize":48015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNxlqCRA9TVsSAnZWagAAXKIP/RUGhunQ3HD3VthU3yFk\nCT642oZYA2qboT4B2jZubf4cjkqLvt9vGTFj13Jm4supMdXE68c4gUiR8T4C\nZF85VWxj4cqzwSML7oBONn3BZoP3v6kB1+thafu/BpCPfyu0LaSd/0X61Xe/\n7PjKLxJuE0SQJVKfayaK8PBE+FS0SK1kI0DliBn+ajvfqGLHuMK6Ic4OUYwu\nHjmx+0swlMH5pQPVkMChp5gS5axHofiZKI83BGvAp1uslZP7oDSfRGhtO2BJ\nbjHBYnnQN2y9lJ7nSzrvnbXP6qbTHxroZ9Pe00nf6IKoLHlNjfjDJ6qU0nJv\nP1X1Mxw6oh+Cgg6oLzD+DRF74gp1EIhZRKCC1SCpVHYpoU35/Rv75Q1den2s\n33laVC/4lhXPo3rRpDX3ut6of5Qc8iHqWcBjuw+5zQ3EhfO014xUAv3hvF79\n0m10mOs2sfA44UMKom8t9en0c10hx9Tj0jeyIUEfzJBZV8PvSEVmkGaO3CXL\nwdKB/GlzXfaMNvdHQPlnNJwjm/vGKVVT9fu5hKKMh64oBNdRNuyitIFe8TQv\nx4+RVGlmViS34gR5radbropH+GSaSzleO8wX+H9nFz1X/V0zFz/BaoAnKLp0\nv1Wy1g0Mg9cchwoGcMLnpXPaVGzLZ6HU6a2ad9YQc1O0b8SP3y9gBFea23dK\n1j6v\r\n=KOkA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFjCl8asiDQc5ASr3UiFzMCkh3rhLR2vCbjYhZt/6yqAiB3do0j8Hc5yEveb6vi9FnqWKi/9a8BqRIXuzv2plYYQg=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.18d6b808.0_1597446505971_0.9490828224991643"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.5f8ffbd1.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.5f8ffbd1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.5f8ffbd1.0","@material/mwc-textfield":"0.19.0-canary.5f8ffbd1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c230db638d0171f7a47ff1f312ecc123b9bea4e3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c230db638d0171f7a47ff1f312ecc123b9bea4e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c230db638d0171f7a47ff1f312ecc123b9bea4e3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c230db638d0171f7a47ff1f312ecc123b9bea4e3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c230db638d0171f7a47ff1f312ecc123b9bea4e3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c230db638d0171f7a47ff1f312ecc123b9bea4e3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c230db638d0171f7a47ff1f312ecc123b9bea4e3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.5f8ffbd1.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-OQSadndLWFkBHwxbES3uoL7o6nE8ZswsWpslKiRaTGnvktyVdw7D0K8T0ZmJq8YWvVkWw3OMfgpwaTaTDQaHeA==","shasum":"777a2e9da468d8bb7eac3f06d1347429ce7cc457","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.5f8ffbd1.0.tgz","fileCount":16,"unpackedSize":48015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOwGfCRA9TVsSAnZWagAAYe0P+gILjq+UeXJdvH32Z2Kp\n7y00kElp1Zz9qHshjNiEBrERsGBeLrkUsFqvhukwjoqTv8VZ2F5Cvhh7rQ96\nAvnmacTpvW3UycF9KOXJb8KLjLAwISYKFHjlWfvqUohxQYQwkr0jXoqAbB4u\nAXqkxEYO+wWV0MiaD6xY1xAcuxmWuBtr2xRIOEZvY69jRXwt88VQkDi4BzkN\nQicfUC7rwzvWx9L6d2IPAugn8sYniouIAWAdnDFntSiEuPFVn9dtojajs6dE\nQtPU7bj/fMkXyuuXplUs+I/khTp9436WvVfcHTUxJywduErwOSTQ6BIFVKMi\n0Zw8EzKp0wvJ75R2FYKjYA1eWPVA0EYnowvGLrgS5t9aIwFxlBNBrtqgtewj\nPgkJY6l+tLCXSrmDI69t2yz008X2l0OWFDb9jWi59jfUQ1dT2MEUnoC99taC\npOY1tvoMey+AH+KqBE4pkvKUkoBDfVAwj1u87taCu5HSOtc9qTbdTZ5BG2g7\noFJr7oBv3d3c5LABCn0RePP32QPMsnmb3diiDfdHEXZEcl2RVL+KS0VQ1Tj6\nRfWsaEhq+JU5521Z9bplINsBbegw7b9Eu+7J1Qko3s+qROrPinmtY/5Rrijl\nZ9sJ676IMELExy+Ytq59TMBHipa20eoTjTQ5D4B9wyHg8py65tbVtwdpEAm4\n+ywx\r\n=/dtM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxKweYplvIJ25VJYj++nacxCXO8tmBXeUvsLxP3JE82gIhAIWzqsdovxDb6ItSYM9QcxwIWBg87Z+enjL6q9UiXtQP"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.5f8ffbd1.0_1597702558677_0.28844236047765426"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.8604d59e.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.8604d59e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.8604d59e.0","@material/mwc-textfield":"0.19.0-canary.8604d59e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6b87d240089846147032623e302121a478088f7e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b87d240089846147032623e302121a478088f7e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b87d240089846147032623e302121a478088f7e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b87d240089846147032623e302121a478088f7e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b87d240089846147032623e302121a478088f7e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b87d240089846147032623e302121a478088f7e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b87d240089846147032623e302121a478088f7e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.8604d59e.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-sIsYJOPfPcaA9QHsq2Xg+6tcwsMsBxBmKVprYb9EtZgfVk/rMxuWUo77ReU6igH+S8m735NZLfWS8hej3vzR8w==","shasum":"ae12d28d47a641181ffc1bcdf7daa2cfc1612110","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.8604d59e.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOyjCCRA9TVsSAnZWagAAK0AP/RD5G+2395EySyN5zRQ5\nqXwhM71kuM4uswf7tCt/mLXAfxje8NwktJiOtQ7gVCeqHa1vTYTo55EfX5Pb\nU6yhB8xPaytO55iAnFyDDDSOmjvr1oA5aF2b7iL7FzXW907AYkelUFOxb4T5\n6qTiJ2+g78+J4VGaBVIMAJPY+J+WW8qbaYa94D+qdjs0GB1yWb4XFwNXs4W9\nvv+0xa3J7KQqq9U99ZBM7jyoDg80vPUmkF5wQY5LtrJnEmt6HmSWGE+H+GPX\nniXAbvwmC23P0y6WBJQ+feg1l5GOYnazh6zBuyWSZ2msV9pMem2Y9nvtEjqd\n33k72/jlXTCl5Je4xjf9ecV5xnuqhxQll234C3B9/NuhEqHTlgeKUxJJWWSo\nqGvbpYZAfAC6i5yDvKXQUQb7u+CNtoOHz57w7ikPLbC5Phlenb85fdpUMf+g\nqYkRtjiJpc0ikkXcBk4sogbt2jgXPR9tY3Essxke38Dr60D9rWf4WWDXg8Js\nC7iQEFhdNjpvaX1OMG2A3xZ/ctddFkzJf5cRTyVKJXWxfvhrhLr5hnm73IZl\n2K2Yj5cPWwgBu3WDv62i1qtcb4hDGc4zqcwsxSqGvuWR97ljmm6ECiD4RHz0\np1TYOT+/x+ji4P8xLf+jD29Hz5AqPCpYVKnb1oyrI9GdLBsujtG2rk36EWjU\nSufZ\r\n=4r1n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiGEboJlSEme/tgcGdsHiI99ZNau4KySy0fseEbTuTfAIgFtnolwzDjNapg57geg6N4Ne4sQfVDRXoKCoARdLg5Rk="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.8604d59e.0_1597712578260_0.8488884358282887"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.1d7d5e34.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.1d7d5e34.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.1d7d5e34.0","@material/mwc-textfield":"0.19.0-canary.1d7d5e34.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e5b1904570278e726a75457dd1d8c9a30c98669d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5b1904570278e726a75457dd1d8c9a30c98669d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5b1904570278e726a75457dd1d8c9a30c98669d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5b1904570278e726a75457dd1d8c9a30c98669d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5b1904570278e726a75457dd1d8c9a30c98669d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5b1904570278e726a75457dd1d8c9a30c98669d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5b1904570278e726a75457dd1d8c9a30c98669d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.1d7d5e34.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-JBdFWVTlwlaWRmfpPdNMFmzwIVEAZGjsRNS2PzAyaPDxoS+pyPt3AgHYJea0RP+vLxNzv1gm2lhXQoeP+5xEJA==","shasum":"b37257cab62df3b035b3cae6f9afdbb96b3931ad","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.1d7d5e34.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOypBCRA9TVsSAnZWagAAj1QP/iS+oV8S0PhtsZTxJmtT\nQxW8rh/9RJReD5irfcRJSR5Qv661BrUKJUbJLvygrAhJh1/l0o6XFmghO4tw\ntZk4gE582FSXR7ktVJt0RNxwC46PAgmGoloDfUYgzQvnHmX0/sOKu1nnu5tZ\nYGRktjVAIcLUrLVbt8yc2uSBnQraiCya5mRR4zUGzWdeDbZQbx0eV0A5WPYq\n2e+DgGINIfyHf5+uXozaj1AskH57DYHCvXjanWfHLKMoJrf8PmXIYoGwtYi0\nwfzshkP+nzS2XJCXhPHTgN0CGQ7hTxOBVXJ7dzsDvXw2Xy0VCPCN+OO16jKj\nRX8Sy8Sx4R87hX1bczExmb2l5Bvg8zlJNMsd22SRY2wdFiEju9/BQG5KWOrH\ng6OzFXiLurs7WTj9GqBH5G3BlfapfpWiBT2Evbi9WPU6OIpt4Y57Z5Ts8n82\ntAhmz/rqgIh+hHgqaL1UL26QoFW9qKCPW6jEZUh+is8ttWPU2Otw8LiX+WbV\nh3Hj6XgFWeI3oXrJE20BnWrIfEouFtpCpZ8wuh2J9PeU4YqorpCGgNNbreHP\nJAsy5nye8cPvfE8sSaJq5tBsOiUyKQ0C9Ibqj4EJ3slGqTXkr/QVe06izzrB\nFmgd/BIVH4AH7RvwPX8PYyJo0FMesBOA5lRVvrJs8VhqEsYAgZYLBkwOitz6\niDXQ\r\n=2C2c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcA7JfJO+b+3eAB1zcH6sbOjWAxv2fm9OoOjrbbDJaDAiB3VnxycutNiRKH3pIaU7FXDIX6tYItG1BBBCD8BPSCbA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.1d7d5e34.0_1597712961172_0.5823092492733575"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9cc95c07.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9cc95c07.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9cc95c07.0","@material/mwc-textfield":"0.19.0-canary.9cc95c07.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"48f9adf6b09d7b2532669f3bb466d2dbc3970990","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/48f9adf6b09d7b2532669f3bb466d2dbc3970990/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/48f9adf6b09d7b2532669f3bb466d2dbc3970990/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/48f9adf6b09d7b2532669f3bb466d2dbc3970990/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/48f9adf6b09d7b2532669f3bb466d2dbc3970990/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/48f9adf6b09d7b2532669f3bb466d2dbc3970990/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/48f9adf6b09d7b2532669f3bb466d2dbc3970990/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9cc95c07.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-6Mx0hbdu3G2Dbl2a9cdghIAh9iOxoUjdGq4CA9UNqpmcvNIuF/kv1tLzM4BOjd2JkQm0LO1D+3f/Z74a4hEhtg==","shasum":"fa389c28a010a2248d28bfbce468c08a6743da24","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9cc95c07.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOywLCRA9TVsSAnZWagAAD54P/23obqJqi5znEh3sXsg2\naDLPAyhEy+sV/vd0wPWXuAxsL+JMg9GnL2nYGf0qMX0g2b7Z1bMf6fOMha6Z\nxNFZyUL0n59CcdxHnUREM/FIGveJa5L1+Wsw0CdILwdyV7P0XwLbd8lU5jE3\ne2Iz18Z4Oce+mZRxNe7qFkvG58UwTHYpZxaF79yYC31IV/MIY3HSFSWPNRa7\n9TX4TwcygsZXpq0ru29Rh3WsLlUpsq/3b9+2VH0sv8BDr7K2MEtRyEI3MC7W\n7x+pOmmt16H5iAYmM203DZWq2LMjyd+DKDoPzgaNqXHyAsdddT1ZBjC6GLf8\nz2XWXvQQN2+kj+T/F6gJKi1z9Jk3WUuLqsKaFY7f5YmApihRPqrv1DXZv6Ft\n2nDdetu6bkVMUFZna02GuWh72fBUr+L/DCTDZVRleRS3CUoP8aveHtyAOyhB\n8/G9hTZ1XTlUVzuAwQ03qFJJ8mptLuQ/02M6Fvwv9/YoWkLYPB8xsznYbXHi\nVo+363AB9BralH//dWREuriz7UpOmjW2rcyYK4tDomIbG4VIZi0YvUafQCPh\nILZUPg1lAEmu03ZlGXSKOPe8M3ZAmZzMipldjbRtqlKiirB2oOmLAnlk755M\nopzPbYtA1MfyVtjl/AUNx1bAX7vHzxqxMbMeWRmFk3A0MBVsC/hYtcLMKlcT\nrRBf\r\n=JWtJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhnLnaTUFz5jFWM47W6x3VfTcj+7JJPh4RNclhVqq60gIhAPCj3yfXL6LbaB1GpZgYWTD95EYSeh/HiPrWltXHsZZ/"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9cc95c07.0_1597713419066_0.7662312725944036"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9f65ced3.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9f65ced3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9f65ced3.0","@material/mwc-textfield":"0.19.0-canary.9f65ced3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5aed2922c67f2ad7133772e74310e121b406dec1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5aed2922c67f2ad7133772e74310e121b406dec1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5aed2922c67f2ad7133772e74310e121b406dec1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5aed2922c67f2ad7133772e74310e121b406dec1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5aed2922c67f2ad7133772e74310e121b406dec1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5aed2922c67f2ad7133772e74310e121b406dec1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5aed2922c67f2ad7133772e74310e121b406dec1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9f65ced3.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-qPaCtyEY1hJrwpC0N0MLbmesYIpFP9YGocqzinpa5KUn0pSACUJ+DiXvP/5L+nUI50xCjN/j5ifMNTGRPY0y2w==","shasum":"b580653996d53bb8551b6ae3f13c59d0458e847c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9f65ced3.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPDchCRA9TVsSAnZWagAANTYQAJH+LX2xTCKzTOQH9Z0c\nJKmUeCdetDbukn/nu+W6UKbiPuxX8K6QCFEKJdQjpLy2bm3cKBi9v9BJ6Q3y\n3N/gB9eloTLl8FekC0BS1exLTJZBgP4A2ZKdcnUkP1mFDv3gwxhsHH5coheP\n0y/+Tsk/c6S3rm2qvUiTmgTR/xCpjVHyAgaIqi4xRdVI1hfbfnMInuwbjaHP\nd0JK0CpK8WmKhXvrF2ICRSVzIm8HULzNzlALBkaXZ1WEDI/K58q2Gz7gekDu\nxs21D+CK5GgTRjadAGTa6+C8f49xyLs7bA4VwOiY31AII79lIowJmV2dChxS\nf9S0lLUPpKWCW2DXbmwTj+TLBJUHfkCf4KzMP3T4IZ+H59yK++P8re6M9kka\niCMkPsI7WsRw6OaQTGzMAL9MCOTNEo1Wbvj1OQ7XJYJ+rw83LXev1wk8TpTw\naggpzff4EkjoBsLg7Yk2iqQ6iuE0x8jXjyIACACP5/UbeTFdYqHttDiTTLX1\nXEq+7uS89/u0z/kbbMW0QNgucBXJUZMB2WvcPIgor5f4uaxeI5waJvZA8IVD\nh4hx9DQ358FQXjEDOLOI/MFoUW0jMlvPXv/PcNhIzU+yBGH6vndCCqbQLFiW\nDj8YboTTV6Wy+4S6G0jxnGvFXYgp+cN3fqOGb0Gw+vBhDm7zb7s9aPsqEjpu\naklY\r\n=OOoN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGtEZiudW286Kn8n6bYTugXtQBhP3ePhuYKLxs6g9VgvAiEA/PwiqW3H1C/vGIfkLnGe8EgTYQBzfUbvL0ImOfLqar0="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9f65ced3.0_1597781793014_0.20689206362933743"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.5962b365.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.5962b365.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.5962b365.0","@material/mwc-textfield":"0.19.0-canary.5962b365.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"454d30885df0a3162dac8184409307ee571c6215","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/454d30885df0a3162dac8184409307ee571c6215/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/454d30885df0a3162dac8184409307ee571c6215/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/454d30885df0a3162dac8184409307ee571c6215/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/454d30885df0a3162dac8184409307ee571c6215/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/454d30885df0a3162dac8184409307ee571c6215/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/454d30885df0a3162dac8184409307ee571c6215/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.5962b365.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-tUGTQi9yOXqVX3+YNMwauAQ4ofi5ookg7/X8SqAfsn8mUv3+NDWHCcYmEJS+jjArkHRKwA2Hwe2HaxYvVXuFPA==","shasum":"71e79ac9f6b057e25b068616824ce0ba9e539a88","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.5962b365.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPYulCRA9TVsSAnZWagAAS+8P/3+VlZdegdf3gKtkzvVm\n7zqUkhoP7pspfghwxsKXFrdmAskcUIetS+MXelFGwOZqEPAfmz/VFzx7OCKq\nkBUirWKkdqB+ZFrF6315sXpegQA/zHlwmtQzVCVDx6afKYvrV3pdJfaIqtGh\nzc3zMuhdBVrqIfvYff3BIGh2FoQVd3EySWDEC3ZQutFAxMiFdY0s5HP+0Lep\nwrK8kg3kdzE15Q74Sf/leuH5+wVxiyhD06IQoHORjSd3Z2Dv39tsTw5P2fi0\nRwv//Bxdd0BpdAj2XlGVidzJKQBrdJwuaDf2777AMNyazXZbcTFdLA6LhO9X\nVG9YBdPRmLOVC0v6kT25t+RKGuLnCiTQPHslpAcWpVqdMZhPlvnk+Xf8kecW\nwdTIBDS/ZqT8xHQ3wPBzvM66xNl8tVtlyck7syrP0ArTA+TNtqiDdojiavlv\nzeOQyHWa0ffd/GWBKpXFTORXJNg33DINQoxh4VZBBTq5Mjoy7b05SM9uEUxM\nCRBoIf+G/jljm2CpGtfGEWfSYWfaan/xh13KJ2FQl1c9AIHaH0d/HsVZNQr3\n83Se0dRWE1fzkgeYxo1cryfZcQquxKalG3rWeAMwmwJYnKOIHNA2s2o4d5J1\nJc+XUmgPdfldiA0rRtJNPWVBRSl6zdibvAVAElRAcY49uW/sQ6hfGv3SAr16\nvm5E\r\n=RltT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZSBPh0ykFs/10HnLaiz5IfJuIY0YOzx5al154iZBLWAiEAje6c3dLoAaEEm+9el4L8qvB7ksox+A4yN52XsVZPM9I="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.5962b365.0_1597868965406_0.8491745414081906"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9c9ec756.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9c9ec756.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9c9ec756.0","@material/mwc-textfield":"0.19.0-canary.9c9ec756.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4c887788f2cb30e8b788a5cb0a1a13dcb78a0961","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c887788f2cb30e8b788a5cb0a1a13dcb78a0961/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c887788f2cb30e8b788a5cb0a1a13dcb78a0961/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c887788f2cb30e8b788a5cb0a1a13dcb78a0961/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c887788f2cb30e8b788a5cb0a1a13dcb78a0961/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c887788f2cb30e8b788a5cb0a1a13dcb78a0961/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c887788f2cb30e8b788a5cb0a1a13dcb78a0961/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9c9ec756.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-D6+PZzkNjxelUgl/Fw7BH2SeAAFIg627NCKFvzJNx3hx6N27MKUh4uXHZXUNw+UypyTIZOe8S7MgIWW2KTA1uw==","shasum":"603b6c16e0d0d45083ac5ba508388fea0a60243c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9c9ec756.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPsdOCRA9TVsSAnZWagAADpYP/j0+k7ldI64fxPXCfKkA\nfbfcQecC7AuQkapWqgKWmMcos3i/Xlu0py+fBGKrtkrhsaSmiyeOMpT1Lg2b\n7S1ES12+p8sCWsA+rwuz77tJGoKw0eUULe/Gi5VMwE7J3KfoskbXHW2SVjJO\ntGkfnHd+fHidE1SZsArzj6RaxgaUqSTSXfE95N1t1NjPThGvqpl8qEkViP76\n2b/wMXfRu2yWzDwlqXPLOxybmf6m5xPvKnuYFVplE8AWsI9FQRI6+eoaUsrM\nqbeMgACHynfYhzCyuLddUqDp0sfsWGa974dfWGL3Wca3dd3aw09KEXocDNBo\n4ZRcYJweUtZUuOyk+dMH3F+i1psRwHvp2sK6FDAgr8lPwW6QC/dOnddQsRNw\nviwVRiseHfJ9UR/YHP+44UsAPRdr8Vqtr4CRKFcKRp6WRMi08l1gBfSzCfhg\nQJDMfBcALeL3jDI/gU+N4f11D+b+9bQGa1A7puh6jTMsYMCUkpenrwobGvPj\nUXEK0J3Ghx4vZBVJzLRrLeI97IMFyTBvDMsfM/S6RkEGlTGy7dWm6C7B4hyL\nwP80yTmsqjJD2xvbUrgZ8VNMFHAUTqgWOASwuLtfzqPNCrdXQzP+B3WXBECG\nyt8PWbtglaeHdqfWCn6wDkQrme1hJeaCf1/f0+jLxBkXpxiWATQ2b28YACqW\nXs3n\r\n=pU1A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP7YZ5JKjtyUYbuEuvgT31ScnmNiFgxQAV261ev7g7VAIgGfMoX7Zg4snUCK4wlBnPJuc6PRuCq8uLZgxCWjXJi/I="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9c9ec756.0_1597949773618_0.3542420787896783"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.fa0ad66a.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.fa0ad66a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.fa0ad66a.0","@material/mwc-textfield":"0.19.0-canary.fa0ad66a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d4020241262a9309827adc8467ba4c499bfab71f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4020241262a9309827adc8467ba4c499bfab71f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4020241262a9309827adc8467ba4c499bfab71f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4020241262a9309827adc8467ba4c499bfab71f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4020241262a9309827adc8467ba4c499bfab71f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4020241262a9309827adc8467ba4c499bfab71f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4020241262a9309827adc8467ba4c499bfab71f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.fa0ad66a.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-NwAUHFvOElxAA0kKLy9uEpXhcvc+zwqeu6MbgTZW1zRJ62ClH83LK6GqhV5ocGrR0mwPi3KECjhvdF7fbV1f9Q==","shasum":"8a1b25750a1d8388f4171756c478078b1f2bf014","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.fa0ad66a.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPt6HCRA9TVsSAnZWagAA4+kQAItXmHihGiK3alGtCLlr\nkoUYhro7RaDfUmXw2gtQfQJdgvDzv9xxN1ob8QCGTnduaZls5stgbdksyY32\nHgJ/oONCxb78eb39NdS/8wyvkf7/NVryIOONAMUSGEHREhwsorxczVMbiKE6\nP5uOoZdYGo9x98rb3IM5sZJaEOO5FBq6bqfTYw32FMzWKpxXM1hQox+V1+br\nidHEMBu47dDf75w6+fJjU4k5LHQGLDJYSavFhsMMcWSvgxlasL+XW+F99XFE\nXsBAaGqaJfHYyVoDF+khbBq0sqpa/FPt2YM6Z020T1+RbEMfuA7XE57mBuF8\n4wweQfBkPVW9ZCzc0Mp3Q5/V6K5XmkeMQ9W0/StAg2UN00kl9Bz0Ugqa8Pm6\n6g9idgg9mknZf4Sj5g8/FkIQsyTx11RYuEYHqqdcCRoKP3sZRvLg7U41gL2D\nYbxVuiP06xEfzC5dTcvyGL+7vbBFa1Fm3oQ+ZXUYCdaMSusGoXWsr6QVx7jD\nDW/mCbJmdNgghVgGgk8mHFxluXrH5K3R66hGlG8BqSIguZ8voB72ZSKLV734\nKcw2QqlX8iSGibvUUnExrrQBKI5Jm20antIPI/AzaTk1K162SaD+2+LY8YSH\nyS/RaUAQ//BurteSaPiV+OX6meFWX6t6YQ5trgcyF8wWsLMhM+OyDIPszywg\nWT3z\r\n=ZSil\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjUPqaU3Rm6/PO84EstAXMVe38glkehlWe0yAjoTrwtAiEA9RLzkqCD3NWCV7OSfqFI4eWL1jW/Z9EWdmJyrTYDE5M="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.fa0ad66a.0_1597955719225_0.20228330335493117"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.06ecdd6b.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.06ecdd6b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.06ecdd6b.0","@material/mwc-textfield":"0.19.0-canary.06ecdd6b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"35a2331f3c8450d35506d4f0b54075d121a2670a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/35a2331f3c8450d35506d4f0b54075d121a2670a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/35a2331f3c8450d35506d4f0b54075d121a2670a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/35a2331f3c8450d35506d4f0b54075d121a2670a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/35a2331f3c8450d35506d4f0b54075d121a2670a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/35a2331f3c8450d35506d4f0b54075d121a2670a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/35a2331f3c8450d35506d4f0b54075d121a2670a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.06ecdd6b.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-adcR07G+LPKOZGlRrJq2NS8BAwxgb/U58cELsrNyxw+Udi2aEGaQCIJUJZoRO4SXEdg05IRLzxXsC8hYvPxZGw==","shasum":"920885343d1b456671f60c5a07feb31504ffb451","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.06ecdd6b.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPuxaCRA9TVsSAnZWagAADkwQAJ8qPynKzgnjijyYmbNc\nNj5FIbb1+TiNGBHjU8HOO2OS+Pj7zgyufaDazjqtAlSjR0I7Y7g6FDDfiD+v\n5gMMw8oDAJmrDkPWs+3FDlwEPwFk5egwOPjq5allpbp8Qxn0k6m46SUQw+xD\nElydqefse0ThRNVssnqWHEzhwQloMv9WtwjMZHGbgkE10Vg0b1QGKXP1p1I7\noAODB6vrQHl7DYG7yHwDSpJSPrnz8ae3Rx709hPjqVTnVPL6MRiKdzC2oeTt\n3akQYVe2sqN3Mi78rM0/1P9ZSv7ybdznPAejuf8RvLC4dKDCN3drZ7uw7dJa\nYRsTuB8OoIM78eRU/VFbY6bQPUMzo6S6L2qZ5v2rtF7TBVqjLr8XKl/3fFgw\nJ7I/CYtpk5jZeaMsWuoKe8hV1Aqohxi+gahuJVAwk90r5fVgrKuP3Cp41vQT\n547+M+MbEYsbSjsZhuBx3p71ahzcnL9ZgYCLiZs03OdOjx3wcggw21HwPAyz\nYKswRdSvV9LddThaicYj/aZJyqSpf7rzVsfMW/fcJZsTKk0w2M0ltaDncarI\nwiYl4TT9xUwMgiIG7q0LGz5nTNJcttdl8co6RuYAhgDDPMbvjR9ZXvQEheNX\nhX3VuQmkH6b6PcoFs8+dTs2BXaDZPFLRJcDVAP7WBrMqMXkCACAkzVFX83V2\nNQCS\r\n=Cv87\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdVHEEv0TZeI+VkM6xXlSgJV+b+K+vMDhr2fBU0kXF8AiBVdNsE7Hywq/9gvANwQSwBIX+ymY+HAsyxlTKbsteLHw=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.06ecdd6b.0_1597959258316_0.2865898661196449"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.2bca2318.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.2bca2318.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.2bca2318.0","@material/mwc-textfield":"0.19.0-canary.2bca2318.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2e3f0ca806ce8930df2251177b8dcedb9deaa8d7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2e3f0ca806ce8930df2251177b8dcedb9deaa8d7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2e3f0ca806ce8930df2251177b8dcedb9deaa8d7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2e3f0ca806ce8930df2251177b8dcedb9deaa8d7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2e3f0ca806ce8930df2251177b8dcedb9deaa8d7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2e3f0ca806ce8930df2251177b8dcedb9deaa8d7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2e3f0ca806ce8930df2251177b8dcedb9deaa8d7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.2bca2318.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-6QxD8TANPhkcWbT6U7sw9DHUTxnzNb+14YkSlx0AqleV9QP3N0afKIuhVurg9OxJApf+gSEfQ+leRN1DU1bcNw==","shasum":"1108d22a518bf32dbf599a11d1ed81f3a89c07fc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.2bca2318.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQAnvCRA9TVsSAnZWagAA51AP/3aIBy3a1QnnzfkgG/kc\ngo87k/JkEco/2rUeSGA/tNq22+wnKTYpy7d0OoYJTBUXEKwFgupVOQF+3bIh\nMT0iwzBBbTqZyqDN8lTHJjAzmepLLhYqE8OJsZYM/qOVAOkBYa63N+B5MO4N\nYUOk3azCwdSU/VQeWEZBQZ7ZnCwABkWQMUdT1wG9sLanyqZlznaGOoRGbalz\ndVy2+kSU+Aaryurs4mGNmWb+uQrvzHTeyjEbObP2JZJ0sAL59qBCpwoqKeb0\nSTl+qVmU7w751M89yBCj1v2Q2yXFmVvJBBQ0xDEr5Vvaf6en/LSv8uN5aLNa\nKhHnrg+kqgIalxJ3NVCxw+8YcN9t3HC8G5ZBgpATVAOxrVgYGozHP6gC6iwH\nWmCkvDnRwZf9ImtH4KzPtSlC8l/8EU0FkuDA3ZBXnHQosvg3vUkXniQzZA+6\n1svlPcdS61BVW5/3un9T7qA6r9b6ql9BsbQ9yrk6tD0je7pRBuXY46d/oJx+\nDGbNaxNAL4ko7HQVr7nIGuzgM8iQROzEdlhIBK5mc2vRvVIk/U7DUE6mPv9l\nUBHCkQrL9dQeiJOwcVuTY7R3aLDbJfXJQnsxbntGIEw2gcdKGs/+ZC4XRGYd\nf34LfQsHCHPK9q0Vg1hBQzzOi/8EJV5fcvrehi8t21EfrfJ6nK1lbg+JO831\nHiIC\r\n=R+nw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVruHUD+8Jks7K6PTLQmUcGDjpL1AV4qzsmFFTqiqceAiBqWf6gmLjY/8JnCd76SUUFtTPfYy8bxJk2eLOXvdBR7g=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.2bca2318.0_1598032366614_0.6614752950246348"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.6aa47265.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.6aa47265.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.6aa47265.0","@material/mwc-textfield":"0.19.0-canary.6aa47265.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f13aa269065b757dd289dd89367756db80da1596","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13aa269065b757dd289dd89367756db80da1596/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13aa269065b757dd289dd89367756db80da1596/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13aa269065b757dd289dd89367756db80da1596/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13aa269065b757dd289dd89367756db80da1596/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13aa269065b757dd289dd89367756db80da1596/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13aa269065b757dd289dd89367756db80da1596/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.6aa47265.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-gHXhhDrR+F2cr2SD+ed53I/p8blnXD1xBcrO+U3R+Bn4srTFGA9xJ0AilCvi1iuQaIRY9yU6Kt2ydHj+NQvITA==","shasum":"717b535c8022969642a040c86c4444e0905ec852","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.6aa47265.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQA+ACRA9TVsSAnZWagAAp/wP/3d9krfXNg2JdoSZGP8/\nMckuCbmGVPlX19ElwVYe6H2/PRiNU/k5lRn9O5LwHvb1stqdUy3IZPlU7MVa\nVCSjdpyYY8b1EvJRlSyl7oDyuscO9QAbRdoeiVSdfzESgs804MpS/hyUJ4yU\nEKA9uFgjUgsjhFS3Ud802eXE/2evOnqd0WlFtCiPWU8XP3DjSk1wXnlw1dVu\nCytwkv5tn+6TZZ9DEtY/79UO3gguZ65SKlxaJKpIGnAUBa7vqQRH9asP6Q7h\ncoeLkw2kdn/N058VcjpHtC9Ccr9vx2QgYtHU0jRXbMXDNOHyKNf3n86oWvxk\nEAVZGkBCiXWfrpeMjZn7hMKPSIA79ER9BGAKH9X8oS2Czk/Dl6wKViv8sArc\n6DCwMCN/Cty9QDCw+ulfO7cleL7FgKGmrVwccpbuXs1uzXSqskG6cjqLK6hy\nJlFTXTQnoe8QDhAwQvYdKwZLGTwsHaew0uPnxJUXFHegH8+oNQZMD9Por7Uc\nwgxsOX3F0DJ3vTCbsu4POk/kEHEs4w3tM/vBY+hHxvLUc1rHhOFuLGGIAXd8\nPHuiYnyj/TPtN42eofMuWYa+ddSmCku6Pppa8zJDrIIVHX6mUhGjwiBZ8+Ws\nk28taBuXLICSBsbO4qAHb2HlJKK1iwZrB9OKPsabTledqrMv+9DFA9kEYSAR\nc1iz\r\n=UUif\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEIHhguZx++8BbI2Uyp0nt3TThKB4lth5xM6jLGpBPsTAiEAlPBEXWIcSL6JTIpbhUnSNPD5crzOJLYZdp0iuv+Rjsg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.6aa47265.0_1598033792106_0.9568485157749567"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.e7202a07.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.e7202a07.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.e7202a07.0","@material/mwc-textfield":"0.19.0-canary.e7202a07.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c2f6251cc1ab7c3f27cc51409b86305fd50bd2c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.e7202a07.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-A8xEms8IwKdC3dRHlsbtYvbvuwk9hCJ2Zwvg1fg4OxS2Bdn5rLk1Wd6HTnezVYrDdoyZl5VX8st/PbOITOJDYA==","shasum":"b57c1533cda3e35b243084a6270359e004695d4c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.e7202a07.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQB9QCRA9TVsSAnZWagAAARgQAJgfXBkBMWlbF30Gp24d\nptDg318N7OajVwI8u+pMfYoqpVcn2NLqeVPRLc4rfWJtQ0QRF0CIvyFDf4HV\n4y4E5YJ3tF2c0/2Alw6mV+CnlWMAm1pcIkLR2+iGgHhLOQqMbVjItiTHhNx2\nPdqFy2sBa3hhUtE3UIsNFApyTi6WCSl2SxOZ21h70KvUUSS9pKiXnyZfiFyD\nv5QU1D8FUMp28OG1IYaBsLo/30+A9wciG1Xt5fkmTZPP5LKnww1YhjeT/Izs\nkHgtue8n2vs/0kx5x1NkSZ/BYI0DTD1pN6w6/CwrvcWHHmQLNb41UQ/5DJj8\n1Tmj+01gHPqQVKiPvQc6tHZMLH9nMgO1Q1PbsFMEhYijBccX5v9qwMgNq8Yk\nHS25a5Als+rhDP2mzA4T5MFtfo+F5P0JcngiKR/UOBzx4Aj03BveQ+Lg/PAu\nGAeSETBUQIkZllsOHzxFygIgEmLVjA+rv8t75UjXufa05RVsLdP+dWh3fm+n\nDELIWnjsatejcisV28wMHGq1dsHtUu5n521R1jc4la6kav6UkwLj4cuMjRqZ\nWRBsFBWAfRzMgb2YTez7bwlyq2DC4FXhkYDN4A/djw0Vu/dhScmbYYzG+YEe\n/bvSLVXH0VXpWstJKVMDrpTiVAZmVR5m8QNzuKaXDv/OWUkaqiM9k+t3qEnT\nNOEs\r\n=ZDKM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCE62bkSoGsFr0yiOOVJj7UZ1mxpp0Rkzm32SBJto1FXgIhAI1Co6+FTqjwd2ER+at4QrWi7j+nW8+W0Qf0rxOBAqqV"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.e7202a07.0_1598037840384_0.3643462698188391"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.f208201e.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.f208201e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.f208201e.0","@material/mwc-textfield":"0.19.0-canary.f208201e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c666b3346918d8521008d20fa3c20b4cfe3ee481","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c666b3346918d8521008d20fa3c20b4cfe3ee481/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c666b3346918d8521008d20fa3c20b4cfe3ee481/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c666b3346918d8521008d20fa3c20b4cfe3ee481/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c666b3346918d8521008d20fa3c20b4cfe3ee481/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c666b3346918d8521008d20fa3c20b4cfe3ee481/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c666b3346918d8521008d20fa3c20b4cfe3ee481/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.f208201e.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-u3qmogWrNDyaMSjFkH/KaD140kumobzeBlvigtH77NFyZVYIbHkP0hEcvf0jA8EntGdQcOCmGdpMexQOFtonWg==","shasum":"b7901d5ccbfdcbe2739c1ba129ee818558952dca","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.f208201e.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRA8FCRA9TVsSAnZWagAAxAoP/2xNeJV/CzUQxBnm6mgz\nqCmLJzAQ7bqMJZ5WAWOZlq2oJWgs5ZZB28JwfL0s+LttbN0b5lymKzJAAYrM\neWZA5yypEGEvIv26vnb8N5G3F4Qi2yR9+MZa+RWXyezEDliWt3YjnUwmWio3\nV84gIwPw36swQ6SmrgrBQv/wQIDl4GnH9vI0ILFb4Wye2+ZLykTzo4QEmys6\n8414ZDLzAS0AdaMLcKZyIS3+GVE4Smw5qgXY3MSlZWg2IaiuNAs2BvlwoNQc\n2sjUlbTeNP1UNrpGMufwhl1QrmmxCFnkUgevOjFAeGeuQaaOgnQQPj3b6Ni7\nCP5ZsOgzjywcMuJ+pJ9Nz+8FLVHRc/X/7026GA69jgn2wI8IimsMei+8nhPU\nxf4qeKYpcg0PIVcPFsuuODuq9AYe2FbohU2VIldlvdBBwRqxi7wGV8Tbf5pH\n+XsOyLp5lC+DnODslV3vYBzp68BsBbKksuEI4pDtHms6lLvKlzaNPgc9FdYl\nOeetDtoSbcKdilzm4mtkQe54vRYNFAYabOgwTObXgB7SSTlBagd/PL6s0VY5\n6HOgb928L3QY2qM+2Q36FzvGfRq86+kpaitiFieamlUrLUdYTx3BkFKM89KX\ntztNDLAkQrY94/AA54tKHpFcD0PEChzCZNMVk5HnHJf7alMgBAuyMnR3N57Y\nD1gE\r\n=Q65f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/2ikqVyUX24h2deeMyoqjwFXyw3DczxUPfZ9PjEbXYgIhAN2hGuw+zA5aWsjRbN1YZoY8fHAKOL/RjbQQajL3NvKL"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.f208201e.0_1598295813297_0.9066594877535734"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.14a172db.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.14a172db.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.14a172db.0","@material/mwc-textfield":"0.19.0-canary.14a172db.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"dae488440593f3d8bdddcbf01a3a6b5343d88761","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dae488440593f3d8bdddcbf01a3a6b5343d88761/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dae488440593f3d8bdddcbf01a3a6b5343d88761/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dae488440593f3d8bdddcbf01a3a6b5343d88761/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dae488440593f3d8bdddcbf01a3a6b5343d88761/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dae488440593f3d8bdddcbf01a3a6b5343d88761/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dae488440593f3d8bdddcbf01a3a6b5343d88761/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.14a172db.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-FzVvHBbArQ/YHgn/shDvgcpThrIfKhL2gj1Z4lNGw9fnJjomE/77KWORy0JIauck1piFBELpzOlUYVUBBQ5LkQ==","shasum":"9e11a3cd7b8f10e3ffcd8f7d7bf1ce1c0f20a131","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.14a172db.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRWsCCRA9TVsSAnZWagAAq/wP/3V6jGbS+LsMyN1+YPqi\n0bwBfWQ1QbNwIEPMo3IALdnrNatbjzlAIyGDQ8J8hD7nIYIQJXts1lRUuWZB\nSjISVP/hxvnywNQqO36IKymXH1ZUpB70hvLTaG3w7DjSpjEpXOtr3gtGwO0D\nQJjhC+9f404U1/zkG+apJWKIZobYThQvVUXp3IkiheYHJZZKsoOmcIZ/6X/8\n00cwBa7N6rPdK5iBUDVAHRqE9QalvohWG0FNDuwXfkDKFRzYEyuvrChzuwaQ\nQeNxQz0xmHJbsQ957D2YPyIajGYaumugHSxGtibFSxI1SjZyXJJpyk10rg6o\nfSIVfDnH5NcCDSgBPsjkxbcCDubJHMIL0xscHKk8LvlBuptHceGHTkM5BRTh\nbkRSIKfsz3+uLqRgMVefzeNkzk9p+guswcC8Gsx+bIx5S0eH/+eBp2XH0CVj\nDaEOTLTF2OhMyWvL+bYT73PoYL4Z9nX4EzQEyOGgfe7l0WX/O/EAWfAne6Se\n1LYQTkTZWH9PJCFb1AQ+htycbKXzifcQlir12SfNHWgi0EqYyfZ5N1TlKu2n\nP8pPkNs/wQ7FenBdd0BkCp9xN/SvQpfEnbHM34SqLuU/7z/y7vUmWuSHDbK/\njyTVHl5EztcNE+uKqXIe9wN6iIiDXWUlnKoOmIcp4/6qO2q7pKici1keN7uy\nZ6Oy\r\n=Q7Jb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgMJwJqTdMT2PLDCpfi8EXhb9ccBC32BWtzBF77iG0mgIgMlLjuImFOUBO9CvRaNikLgrYwbfWWsTMaptx/JxisLg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.14a172db.0_1598384897527_0.28058790959811475"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.e6c1038d.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.e6c1038d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.e6c1038d.0","@material/mwc-textfield":"0.19.0-canary.e6c1038d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6629a242b77f90688959f5a54abc55be3a2dae2a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6629a242b77f90688959f5a54abc55be3a2dae2a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6629a242b77f90688959f5a54abc55be3a2dae2a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6629a242b77f90688959f5a54abc55be3a2dae2a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6629a242b77f90688959f5a54abc55be3a2dae2a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6629a242b77f90688959f5a54abc55be3a2dae2a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6629a242b77f90688959f5a54abc55be3a2dae2a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.e6c1038d.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-E970Kb7cUnW4+pVJbJPfD9ke9Fakq15Is7IaU9+KRKHKytYGUhi/qotPXJfXGewxjT0OtTQ6KS1s4UOrj9iCaA==","shasum":"e01a04997e16e442926d6b3e3a7c58320eea8cbf","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.e6c1038d.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSAt3CRA9TVsSAnZWagAAqTYP/07PtEvNs+hIc1nOcLtY\n6ef2ie78rrPfDxnWexzYl0TfzexKKHj3cx/nY2E53jxo9GQEJj6kaWaEHVJe\n6DFhIq8jmlfw9KWNdug2qMadc5pZBolWm+pVNT3K246YTIuAwyVehebnn2s0\n+fyFQ83ziKXwIyFDSWzo7TwW18nccatRyKbEM50eLdiBpJre9mfkmf+3Odb5\nDUVvKbsMy1AIxpbTFDvO/aiotEF5vB8uqEx3xp7QHykvpzk/01527qDVOcy9\ninKP+UxrHcoRHNx0KrOxU6t268FEKKD1r2hhlTHFjERhX2RBO2VsEcNOQYft\nYLZn3+nbXQk14lylU8e8APw4nQ/rQB1JmGAmQhHye5BFUpLP5p4CO/bAciAh\n6/LFnVjopwkOT0DV2BXciqQql9tEgL05SWr2o3wzDW5zsF0Fb4XpvEej1l01\n9t8Kj58CebGnboOHDg8Dt7rma/cHfGyL6HJd7enw03Szhlx/x0YPuST6NxBf\no8gRdX5pktezcvmxK3OOy63kYsTmVrDdSjrDEseOC/ygRBXm6b1u/vS7g40r\nfxV8j8qsGymzlkaCW15zF9kZ+1XQswSss5DyQCZGQBWPcrt6/KxFdjKa73ed\nRGNni9mB+vxHGjKMQ4A4It/Zp4X6H84zOZVRB2Ff8ihv4QYvczm3rSZekowV\nzdVR\r\n=2Spf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICxeoH4H5ZvB0XwRe8kBjeo2PSVI7NQOlFEVQ5ywnO1wAiBdmnJh4n5X32nV0UvzK2Q9/HrWtEEM3qQiKVnL8RrkHQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.e6c1038d.0_1598557046606_0.8710127448121936"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.34012082.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.34012082.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.34012082.0","@material/mwc-textfield":"0.19.0-canary.34012082.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2df5ccd57b9ce1a3c2b3ddda99e7e7d8b185ef26/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.34012082.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-1pzC82GnQv8vhurX6cxr6feML8ikf4dYpEGI3OnYZbq99oQqOJ8s3tS968NUi6dpXBQPbQ+gik4CVDqNZhDlgA==","shasum":"8d3bbdc0609ea7c7b8b863476f5019a8ceae2245","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.34012082.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSA4eCRA9TVsSAnZWagAAGHAP/21ARKPVyrYrL7bfBpeE\nPr3MxAatDk9U8nXxGaQc2NLItLvmCzheDtgIzg961TXhgbPy0Dg3D3Pgdf/p\nSl+UV+SKCpzG9izC2/eW1TjiExW1mgkBXIoHtOaIVUiKsbXu1Z2omzMne6bJ\nnwI5PcfLvwNXBjeYggxbFBRAaQAMKXKkdFL3uJ5k1EiZXPNegDctviG/GkTO\nc1XWwCtzEfcL1SidSDi8fBhsUMuMOgKH8iwnHOOUFWFkyx52+jThiHJHioBg\nm3zKDZ+JL5qZLhNYiKZCOTWotJzH3t1F+ZptvOeO9KfPgSCIHR3nUw3Ysr7m\np+xFktIfDu1t9l/JEdOeyXPCC+X/2VGvJ1o4DEqQTz9j7QbqJ8D4MsnVU/0L\nhfwGWiM0nx2n8DuaTCBEuYkDDI73tEQISW2uptt9tNQAxyWrJ4Kn2dkq+9GW\nIKdP9GaTbd9haOcProOcie2PUlixt5l/EEErUCm7gDOTc1l4S7+GJsV06Ooj\n9ZNvyFKVrTH9sD/JaAjz3G2JKpoXlYq6670D/gryQxHAA/0o8DrLPxJ1GqmM\necWRva4qDIt0XMDBVeY9cC1Hqki4pwCQv+SBhGZSxkh+jAh4Whc6OUCZASHl\nlFqFjHkmF8aeia6QPr3qzbZtFArGt4uha4X2+VGkOryg5T4dg1HBIS4d1sHE\n9v1F\r\n=Ut3Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAy9Cn0/N+LjuN3R7GamgM0/SLVD22MilBLDdXfzYSFaAiB4QbPLwLdcPx/5sbbJBvmcwdwzWhLQVfG7Gm2Ogb76UQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.34012082.0_1598557725646_0.620458135294282"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.c073f7b8.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.c073f7b8.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.c073f7b8.0","@material/mwc-textfield":"0.19.0-canary.c073f7b8.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e16d759d8a3de4908c04fd08603483dbc37b1747","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e16d759d8a3de4908c04fd08603483dbc37b1747/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e16d759d8a3de4908c04fd08603483dbc37b1747/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e16d759d8a3de4908c04fd08603483dbc37b1747/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e16d759d8a3de4908c04fd08603483dbc37b1747/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e16d759d8a3de4908c04fd08603483dbc37b1747/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e16d759d8a3de4908c04fd08603483dbc37b1747/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.c073f7b8.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-Cq8FYEBHWpf370TY7hCTuPz6xrg3ZD0PLjQA/JytiBz6IlgtuNuNk+1iFmh7lmpZQQcl15vaZhTY8ogTZ0tmRg==","shasum":"ebcd5257b9cf57104363b10d46793f2112b583ce","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.c073f7b8.0.tgz","fileCount":16,"unpackedSize":48003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSTr/CRA9TVsSAnZWagAAUUsP/RnJvyFzpMvrhMC5YBW+\nibFslaNNLyuLz0KQ2bYm0IuLmbzHITwm3e7teDZbs8giCDXF4OBIv5BtnGfa\nVOX8kUgud9SspbDjqajswFZLE4UBmNHz9YCblRNIuxBPEJ7KPtP1t4lLQrLQ\n7ao+GPKWLE/ETFsHaaDL+exbQ9xQXk4Sbq7fdhw6ww8e1QCGRH7b6Cr1fgpO\n9GTG3Yr7zUcx2gnFs/kTCQ9ofIywuFmPw8SOj9P52gpBd7qEjik9oe7+wiLj\nsMMj4wyL9euGyR7ocJZVZo+5FRpBXs+tLm5swp9z+liJTcPy/gZSHNJPQFZB\nimSMa/k9tGzPnILPVqehFgrzeFrHCYc2PKOsuf8zsCmyanHnA7v2fu3VaTyh\nCMfmTEFqBDs6PDPJITb5Rs97Yi1niqPAmJqhEltcYjYm/nDeTwwR7y+FuU5e\n2D6bntTW22HD7sAkv8bVTJ9m75uEFT7afOTIjdY2FMA0AUHM+y7JxIXGUM1J\nh8s24fXhsfqh5yPIqxHLArO77SG0KSi89ZO1aYu4OYcRPXDr3J1fV1njB+Fu\n9GYgscTTCsLYmxLQ/KRPNzHKRruq1dISqDxanJVVHZM84wLf+NX6kMMFu3MO\na74EwbM5d/zflOZ7rJHVkm27ngzEZkdUtP3B+MFEtHsOc0z7GPHxJ8pE8saJ\nalYF\r\n=MAAc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhkdve+0kE0gq9I9HwakzrcFaXQqFOZry2sUIRZY/8eAiAa+i2GGkAC4dJ9Vi9pNduNyvSSnf98n7yK7k3sqXi6zQ=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.c073f7b8.0_1598634750721_0.48516880241122107"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.b7ae68ff.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.b7ae68ff.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.b7ae68ff.0","@material/mwc-textfield":"0.19.0-canary.b7ae68ff.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"2065ba1bc7a6ad7aa6a2c0404136a31018fba984","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2065ba1bc7a6ad7aa6a2c0404136a31018fba984/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2065ba1bc7a6ad7aa6a2c0404136a31018fba984/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2065ba1bc7a6ad7aa6a2c0404136a31018fba984/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2065ba1bc7a6ad7aa6a2c0404136a31018fba984/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2065ba1bc7a6ad7aa6a2c0404136a31018fba984/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2065ba1bc7a6ad7aa6a2c0404136a31018fba984/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.b7ae68ff.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-5TOvkW7KHeK+1GqhpQb6LiieKoO2b5+PryqNFy3lJqhcPqnn3N/8bP3Lg1viKSXvBGuyDQ2bBmgTkOPfNIt91A==","shasum":"8b6a47ac5b9ff1e2572ae1705bfc3683d9657afa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.b7ae68ff.0.tgz","fileCount":13,"unpackedSize":42152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSa7/CRA9TVsSAnZWagAAy/AP/AuQsb/g4r6qCk3uET0X\nSVKb/yG5dd2dzalTv4LJwTz5B0WDAhx2L07ceapPNJTKzPJzWqfW/lYyC2l9\nmlJWbxjjbbUZJoexkpUAV9rGZ9CsnAT53sZdPrQ8kSAIo8/t7I8BAZjb4JhX\nGyqe0nQgi0ogi2nXZ1LHDhkouCcZynCpETv4w2v2EbMTW6Brs6h0UeqaVNBc\nfTNaqb5nTwNaoOS4S3B3D1RJUhBVM/Y9iWXmCSvvi67+aEMXUzT3amFqMh/B\nur6JNLn9ZUb4iljnhuzq+q5yw5017DLF6AcbUTL9JfLU54uY/EbMb4DjyQAd\nvYb6NeWSfouqNIAOCN9yQPj08Wob6abQAkkP5e6wsO6Q1mkesQlYGAuCtnOu\n3rjSK6e+FHiXP626117qHjgqBHRTFkJHEe51x1C7rEj6qXiq12Gbz1YCYTlx\noF+qzfU8c4EOZ5njrZBLjxx6CKtjpMfqkQmzE7vTqdh0FzrBxgrrcxz6bFb9\niy0LVLJfX0+o43vTecSgklfPTIxQeyeF4J55DuvUInlGptiZ8OfU9CoIQJEL\nOs9VIWOsJtpvSCtN00nTpiW1YSvBg5EzZL4bmjSky6hLTJ/ixIEWQ1bSeopx\nJqFbHKd7/xJJGtqUXGP+iy07QuzN9uV1aflVQZUNpd7Pto2QnR5hbESW1kb1\nAtn2\r\n=svvV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDftrlJ9NyO8RtaUwHinFlCHNvCIPVwnT2pMHKu2d6nEQIgfe5sjWeDfad73/nvjkOhUXk3CdRFi4wNKxgdD02Qlh4="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.b7ae68ff.0_1598664446843_0.9977468282877227"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.697e3879.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.697e3879.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.697e3879.0","@material/mwc-textfield":"0.19.0-canary.697e3879.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"beb4a106ec95684b6ccc8c4af64c083d8462c917","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb4a106ec95684b6ccc8c4af64c083d8462c917/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb4a106ec95684b6ccc8c4af64c083d8462c917/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb4a106ec95684b6ccc8c4af64c083d8462c917/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb4a106ec95684b6ccc8c4af64c083d8462c917/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb4a106ec95684b6ccc8c4af64c083d8462c917/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/beb4a106ec95684b6ccc8c4af64c083d8462c917/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.697e3879.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-bFHCRAOmSbdpMzxucGPnek1S1j0jv4u25qnHvngghcLP553PUy99SFFl+JdlNM+qFFT6E/xankRO8/smnDpakA==","shasum":"5cf86ca42fb75854f262ecc8da5a1aa6179df9cb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.697e3879.0.tgz","fileCount":13,"unpackedSize":42152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTuO1CRA9TVsSAnZWagAAEAkQAKAYfiwVZvWKv7le2l5S\noCoWNXa7YKz1o7XQWv9kCgvM6fRYWSUXqcwqQROQc2tW5GU+D5BXaYAkyWCA\nd/gPFE1jgR29KrsJKFqlx+VQbx8Vn1wY0bl+T1M/uOvyASc22rrikrCZ21sM\nPQN0HrD20Oqyhkvr8m4KBmzWMFMjXXB3BgTh4/a4gbhenhzaqWvHS6AonQ0/\nFt8aQn7fravSN3ep/q14QoRqVrGXjknAloJ/omA3yj+PuEBFG034Gv+D1KKh\noYa4dZBo+7aDFbeqKSlueM81gfSlvLp5EpgSvZOTsQt/TsqeYvb+Cj11ealp\nWDiXjr3J2M02TRBRlfPnM6o6B6OraRvFzLMfn7GctM2lcM+h46V9BRNrHogN\np1j5foDmHk7SBP7Af5sEqOtNkK3djIUiqkJOEc8sYB4gFCnfl2VxA5IAHEkB\nItCK2Ao8gtlNhUJGw8IXDTVsmAJXEKX7EjZPl5e7mIV4WyWEFH2QqFhJh93a\nUZ07LlkCwQep93Ff9DrQqcYuTcG1UYNujVoIcEhnEY1ZP+zJuhkdX3v6Ls7b\nNIF2bgwUuHiwi4K28U3trQmD5cmBluwEIE36v9Adg0vyafPPOktkOWgqIafB\n/sI4i1mdk1VndkQZROU1cNBLEeJKLdBLXe3YFo8QWR+YLd3BfUmpaWY7F/LS\nDqdK\r\n=07rz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAIx1KXsmPGl4HeTBO5q/9441X12bBm2b08uOzdGC3mAIhAKgIkAUU1/6CVtGwFokKmucgAG6v1z0/g+nygUKp6QTB"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.697e3879.0_1599005620832_0.3940293865063378"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.eafb7991.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.eafb7991.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.eafb7991.0","@material/mwc-textfield":"0.19.0-canary.eafb7991.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"98841f8d9a2c624210fc6f0bdb87082222279e38","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98841f8d9a2c624210fc6f0bdb87082222279e38/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98841f8d9a2c624210fc6f0bdb87082222279e38/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98841f8d9a2c624210fc6f0bdb87082222279e38/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98841f8d9a2c624210fc6f0bdb87082222279e38/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98841f8d9a2c624210fc6f0bdb87082222279e38/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98841f8d9a2c624210fc6f0bdb87082222279e38/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-theme-primary`                             | `#6200ee`             | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`                               | `#b00020`             | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.eafb7991.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-T+AY4a3TWCZUKiTsW+RwVW4e3DwyhX1phcwIDpAV7omldxq0amFHH8GC+NovtC8vYvQdzo5eQUsQJFJ5FeeCuA==","shasum":"0aad0a8af8ebe6d5ee38af7971f4a5b73d56c0ad","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.eafb7991.0.tgz","fileCount":13,"unpackedSize":42152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTwEBCRA9TVsSAnZWagAAtP8P+wT45qriUpVdKWPzuJlC\nlUno+Dw3ZHCiw5fzBjAfF8X7ZG7WkDSUnsPp6KwE6EdyS/TNFHK2GhtJEvkm\njn8TadF3r2fknOo/+i4CC9eu0xxorVbkI0rqTzhbSa+Eth/7fKAI7nGZBnx8\nmHk86rzHDjcC673lAejU1MMACNhaQu/ne0aVwwtIpzGMwl/HIK/ycrmZwFn3\nW0OZQkW9+PgV9XdciPpzl9gddgUzdTJ5ecaE8gIPFYMW1eKIFqejwiysv3r+\nprHbyNfQbDFGq95nFFp0WnJ5awl0amkNabqv4S7qnRCVuGNzH1R2fogLQVr2\nXv6YfgtdFJ65CdprriSUJh4SKiR0norSn4sYOc9D/p56g0fcGcRVMzqDIh8A\ni36jbNHHkzFAymyuFPrLV0brxRKjWyKv9yx6I85WwS30CmpWsapcPZ3EYsZz\nvM+55Rgf6tfzREs2MSxFHcj+QjCeEFBUEdjo5/FyhYrwnEobQx76Vvs77erD\nGXyvx6S3b6E7ku1ae+Gbwf1BCdXgYseRuWCzYzeDrjVfTzNEjzyS9RLEHNGA\nfVRs59KBzcjZMIgr10z4IfHjNMRLqXCoMLB3EVqyKm1Qs3SZ2Ry9P97GJN90\njfvE/Gh1f7eQ/HxiO122BRg0BcqjB46W+IonUtFAN5r+gIvPyuPwl0baBbe9\nMtDf\r\n=UYCo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLVWvBRtaLwt84M99SUwqxPs3d/b/AgwMVjT4qztCqVAIgArrhxitvmqx7A/VD141usVCrEdDdcahf2m3GSqfUToo="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.eafb7991.0_1599013121326_0.2941806220440486"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.606642ec.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.606642ec.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.606642ec.0","@material/mwc-textfield":"0.19.0-canary.606642ec.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e02eff9a35c3b9c054d88cd2c45d44ac7d81db14","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e02eff9a35c3b9c054d88cd2c45d44ac7d81db14/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e02eff9a35c3b9c054d88cd2c45d44ac7d81db14/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e02eff9a35c3b9c054d88cd2c45d44ac7d81db14/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e02eff9a35c3b9c054d88cd2c45d44ac7d81db14/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e02eff9a35c3b9c054d88cd2c45d44ac7d81db14/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e02eff9a35c3b9c054d88cd2c45d44ac7d81db14/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                 | Description\n| -------------------- | -----------\n`--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n`--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.606642ec.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-v1CFwp9Ea8R/jrwe2qxAeLTedAZ63+5ajNtxZoiirWIFFMNZGa+2A+qDWKBnBRhNPb1y+tJC+lVlgDFZ7a2YCw==","shasum":"6a2a888a16f467cd7fa205e94925f9fdf33b13c9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.606642ec.0.tgz","fileCount":13,"unpackedSize":42329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUBBGCRA9TVsSAnZWagAAWq4P/i9wyVzIch1Il4UfPXLR\nMw1mWU2nwEjyhO8njiiOlmKud4xzQ3aPcAFBRW5aGD5q4rTApcgm+HlmIvJp\nCzt/GPFUOcmIeTHqz0D9VCmmKPmTSOpUYBf5DnOri9C7tF4G4Jq6tliEchD/\n87tWcx90Im6w2qBaxAMENHah50uSkIrsOCApLgNx/Ye4VJUmIInS5lsTlwOq\nokY1BRQ1U+UgMf6knf4jujS6LQ3FWYuLIPw0VwXA4zqS5TZH4gbZmeiRmsTJ\njDFMW9PuoiAH+7LD2Oi38NWULidTqTkLhDYiC8owdjcZHBvtT80txd8UPrLg\nej9mswvRZmFB042FjNUbaODvof6uKFxquGeriYUCNT40TIFg57C6CA53Sidm\n9+PGaGEzuWTeUDbhIdJNYaEveJjv2Fc4i5Rp5b2IFpLo7P5L5hi8EslIcXJo\n4khBfxGARc5jo8no/PT9NY27iBf+so8O2l4UR6g4qRfk6E79K2aTNlkiBzyx\n14yWbjB902q9rWCmeHczrgJK8yDNsr62Ra+oh9zXw759tcy4sxI6+TX0mfV3\n9wn+xgT+u6iwEYqeWf2yMyCIiLrMvLXBykVISYWfQtPIdph7INde525/Pvw5\nu5Sr8GryICazrw4iju6bVJVjXU5xpmD2+EtaSA2iA892gYv7thBxz8AB+5t9\n0/iR\r\n=em0S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH4v5ypXKjjNhRYeZbn7hz6UxzZ13IFOGeIYWbjXcioPAiEAtBqRjJA9SYY+p6GOst8g6Hc/tvCuu6rdrg0GHWJxo9s="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.606642ec.0_1599082566386_0.617151904801978"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.ddf05c42.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.ddf05c42.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.ddf05c42.0","@material/mwc-textfield":"0.19.0-canary.ddf05c42.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1733e660bd96fac32b417696613437f27b2841e8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1733e660bd96fac32b417696613437f27b2841e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1733e660bd96fac32b417696613437f27b2841e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1733e660bd96fac32b417696613437f27b2841e8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1733e660bd96fac32b417696613437f27b2841e8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1733e660bd96fac32b417696613437f27b2841e8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1733e660bd96fac32b417696613437f27b2841e8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.ddf05c42.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-DflEa9fOkf4t/rcfnDTym7QNFnoE+0PZ0yaPbTqGgr6JLMkV4QGbUaiLXK49ABzjs9hfd3bW8GjgZt2jQ8TuXA==","shasum":"2b240eb845426bad77acef920004f58f87ce8cd4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.ddf05c42.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUPVZCRA9TVsSAnZWagAA+ZwP/jsVOivQ/VU3PREFdi2+\nH07YMpeOfyEtzNI745dGQZEyj9pQjoLtFVwDEd8TBFvp++B1GwHki5Eed+V8\nukeQHsLCeCwPtkCnbogccefjqFQCVEPG3vvfcQirrWjO5crVdgPRXaGiBwNx\nipExdgj2XWP0jPeRt9HmwGUDbguyAC5OCpnwapJCA5ddfSSFgmLlHJHFRDKI\nDaCEFGGnrfqENkhEqscuZfMr/1dXMbzhVg0ucbm0vRIVgiI6o6EDIbxmeMqy\n6QW3g3OV2511GPZUinzVJHaky5eUwClHK6e7SSa8Mnt8UCRnOuHW1sFnqNj7\nLUZ/Q60m7AZiUXbtVwPiG9JkpUBnsqlMlyLsP2iAR4cnsnUG6/sQFxR8wa5F\nib6JT/wpUGtryrGB0unYa/04QOWOcFz+wR/wvQglZcjrYpGcHX5qJvRj6AKV\nqBO1gnvMUF5ykFK7LdXVURFiV2/IoOZsuNDuyBFmxYYrHSctHZOIfXAohc8f\nvjhDYhePn6c8QDopOvvWFSOg6HKIZk+VqFP+FkHMPhegSnW/81L3t2JXylha\n9AG6dedRcF2UHFrAR9sYHswd1U4rhXhhJPBAYGqoyeHeB0EjSboXuO3Qkeij\nZ/J/WryrfqtBkUd8jmh2OW7UXfHDQVzDkS8e6cfuCB3OpXXX9zHXSwiwveBE\nlE4l\r\n=WbsN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZnOqbX+3Px7pO6Lx7JxggvvKidJes/cRylwepoAkt9AiAa8SHruG6Z/bzvXYMQ/24AoGF/hVl1pBPdI79ZUWsfvA=="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.ddf05c42.0_1599141209272_0.7077447750568098"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.b889e6dc.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.b889e6dc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.b889e6dc.0","@material/mwc-textfield":"0.19.0-canary.b889e6dc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9c47011345ccf89ec21a35053b80a0901ab1d6f3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c47011345ccf89ec21a35053b80a0901ab1d6f3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c47011345ccf89ec21a35053b80a0901ab1d6f3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c47011345ccf89ec21a35053b80a0901ab1d6f3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c47011345ccf89ec21a35053b80a0901ab1d6f3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c47011345ccf89ec21a35053b80a0901ab1d6f3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c47011345ccf89ec21a35053b80a0901ab1d6f3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.b889e6dc.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-MrzfO8d/BylfMWZcRLVfn3LCHJ3FZDx5MjvbrMvvgpwv2gLXKzztB7+mrQoRV/vV5qyuX2FickE+I07x3ktsHw==","shasum":"15ec14e39719f4429eaac7a3e10f96b5093c95d2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.b889e6dc.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUPmhCRA9TVsSAnZWagAA7RIP/i4kqmk8MZn7EL4zKTFD\nTeyWZ5aH+8XC2OCikchucyOBQuNICwmbFGKnByxRj2/vsAMkZ5IuCOAg6JT5\nyQzXPFjk/vlDL39OwCJ5k/ioKr9x0AF0bSeQwqCcDoMd9G5Tw6SGWFHaS4I1\n71TnI2AAm8nW7A7+cxX/AaDcUKesE25NsBSQID7u1BQe4Js0abpz57+IfdXw\nf0xsoSlxCNpJ0AbSdE3P7MkIcY9nOWd/VNXijavXArrqllSssGkdMSp0Z0vW\n+AgPwLoZTkNGGkbICqHaaARCAQBa70eUtbwuXn+U11XYLdESl7nU1B1BwMrx\nYDPj9BVIB0ZpwKQ63PFCsZ6N4PcEv/wWDDJjFaNduG2frH24UkOTqk6puhSH\ni0zl99xQHbJDbtEGJd8sTvXB8Y+/sJZbhY1vrCgdhFtlqrQNlmxy8nRCjbnL\ndaKI2TGoD23sdzz9y7VnFEL3k4x71w6Gd4KkuC4gZDzllanyWSUoNPj0s4+o\nt8VU2ED/rT0S8ZbojC2eVfSng0OVMZt9/Qc4lJibwEzrzzBX5PttAN0SO5z7\nOQLKLUyaP4j0RALBV+LwHZnK34BSxVOzG/dexcDFy30sOAi8hBp8rvud+0hK\nLKZ6UEDbtGOqY4Wms661mPBK7b+6BKAjxoBq8+6Zx55zlv9C5HGdzWy1sLnA\nEihX\r\n=NpT9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGlys+phBPn9hkB4dbd/RbzIakHda4XHJPQfe3ws8UHQIhAIsMQfPLx+9W0KcmICEKjrgE1xCf+/5ZXYkiokofhlaM"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.b889e6dc.0_1599142304848_0.16389380651264984"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.aabeceb0.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.aabeceb0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.aabeceb0.0","@material/mwc-textfield":"0.19.0-canary.aabeceb0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f699717c41dd2fd6f77fc62da010cecb621e6991","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f699717c41dd2fd6f77fc62da010cecb621e6991/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f699717c41dd2fd6f77fc62da010cecb621e6991/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f699717c41dd2fd6f77fc62da010cecb621e6991/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f699717c41dd2fd6f77fc62da010cecb621e6991/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f699717c41dd2fd6f77fc62da010cecb621e6991/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f699717c41dd2fd6f77fc62da010cecb621e6991/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.aabeceb0.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-2H8TzFRIjo+h/GdTg3XjCSh+MVKrHhasfJZqwuLcrgjmEu5yCAmJgkk6V3TAJJlQRS7IP4ttFIOL8mqclEsOig==","shasum":"c1268877f9cbecce41aee6ee01bf9ed6ac227674","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.aabeceb0.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUUrHCRA9TVsSAnZWagAA3ksP/RSI5kc97kCZNYrCbGaT\neZYttXwkvF8uanMXXLj9smPa2u5Bxflqe59i/hrwaLUlN3/DkMU4JfcfzikV\nDlTMUTbuoea+tFrI6gEKBXqMf3rTm7Ve03vzPIv0FnlWMEMcl10MBwFd3VpM\nZL0pbKTkXGV6dJhsA33xcA1IR+cZ2iFqd83Za5SfFLhkOyhGX/tQffzqt+pz\nTs1kld/eRlwC5IuvOZe4hHP0c5NDy+d14FumwqbBJSoekGLraLvg6miq+caF\nV5ccw2tF/UdODpBu/4ZeFXCB/kI7zNoUTyPQoIm28zS8Sr8IAvFJOzJm5G9E\nn3YW7UTMam1FbFuhjVrD8AUeGSKv6O5O8iM8MBQQmrHLqw2yPNArzCe5m2KO\nrl3IPbCr7KsivubnLw56IEOoXNF8LUdF0tZePWyhqS0nvd6shD/9i08SY1bt\nTmgiO7hb3UYijZ0qNY5RY1NtIeTB2kpR8I5NYTzSvOxMZtrrMzclaiChk9Zn\nvWlssSzIE9Foi1wO+/dn0N1adwmIbWleExyro5Tjct1DiP/EdqyrejM2dAbR\nY0EmCNBDfBm6h7vXNRrD70TxxD/0tnZIKnmoB+CJOq0gBjR38z1r3Qc+vcpy\nxHMYJsfPTc3VIQE8N2ATqFexcVuTJ0nMoDNtLVKImG/ALyXgw5e7E4+BtOzZ\noY7i\r\n=BgH4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDD1naWoynyUjZ6HvkTaHtJH5//5+mZtu0imBECZoo7dwIgI90fxv+2Hyn5OuiJlq6YH9bd5lmEFOcdSyQW+Jw0Kyg="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.aabeceb0.0_1599163079357_0.7341185427420975"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.d8cca3a6.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.d8cca3a6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.d8cca3a6.0","@material/mwc-textfield":"0.19.0-canary.d8cca3a6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"db99eec046a418490ab66f7fa667607aefc5b26c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/db99eec046a418490ab66f7fa667607aefc5b26c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/db99eec046a418490ab66f7fa667607aefc5b26c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/db99eec046a418490ab66f7fa667607aefc5b26c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/db99eec046a418490ab66f7fa667607aefc5b26c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/db99eec046a418490ab66f7fa667607aefc5b26c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/db99eec046a418490ab66f7fa667607aefc5b26c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.d8cca3a6.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-iNuRl5GUzt4ocolDo4LBdEI4EkfETJC9FCoNEHNDvmC2TdlhRVxr+xut/ln8FvxpdbUDB3UR/X6IaeVLGrXWMw==","shasum":"f5efd050e299dbce017381782821ee46149310f9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.d8cca3a6.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUWDPCRA9TVsSAnZWagAAxmsQAINR3+MzeR+HiVbEaLp6\nZZtPSiWNkIdhIZfIDp/aYVJeLbvOCCGAZHMk2lPXDR5CJrYAazmkEIPQFMvA\nsiBcg8et65x5GunizwFIPjeJqkl5G5ezbsa1EUfusTZ5a+6yG9H0RAe7Jk7j\ntMD/l/tXIpCCqWf0b3dhUEhS7ZY2FhMQydRHokyYstYiMU5CTZy/PMDw2bOV\nr8o82qcm8UopkmCgiA9D9RcSh5m9pvpJawyl7Y1hWpK5sh/3HRKTgjFOGgbA\nAhtRJQ2XYoDcj8m4ltcP5jL0/p4Jmp2y8/QN5XvLyHmQkpDno9w97WRwV04V\n2As7YSexU+DomzTJWExFz/HCQny7g1cT2gYzHXcl9sUDf5y4bPeFOyHHSugw\nIx9YkgktUxDd95Y00dtfAXmU7cWHiNfUtqKHfN7H7RxR6nZHDfu98GXkCJpE\n22lLJmvGbtLAixtX1D4M5TRHR01pTwcBGZo4VUBToM3dJcYTCSs9AihQeQFG\n+a+6LHAYXnAdlZ5J0MD2ORDMGHcduRqw97LziqHFc/aVC7oWrJq4IeWE7H3B\n3jn1UfriPgRCn2/X5CYGyW1SA+Lk6Za7t2Ym4uasS1TjBV1zexQbAgopeeCT\n3F0Ih02y97k01XYybbch5r9PG0dB2EG8VSQpYH9oAx29B0U0Z/Es1wvkMk8K\n9Cqd\r\n=Fxal\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9Ua/0lKFmKoc6QSq1K9e9kFqXgAPey3dwcM0yWHt8LAIgKfzhbjZnwnsiCPrcdBqPmhk2f5G1jeVNclLjx4KuO5k="}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.d8cca3a6.0_1599168718562_0.23215685574372413"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.26d34b2e.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.26d34b2e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.26d34b2e.0","@material/mwc-textfield":"0.19.0-canary.26d34b2e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"52bb6b8fb277d5ec6b66932a0683e4f2fdeac872","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52bb6b8fb277d5ec6b66932a0683e4f2fdeac872/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52bb6b8fb277d5ec6b66932a0683e4f2fdeac872/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52bb6b8fb277d5ec6b66932a0683e4f2fdeac872/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52bb6b8fb277d5ec6b66932a0683e4f2fdeac872/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52bb6b8fb277d5ec6b66932a0683e4f2fdeac872/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52bb6b8fb277d5ec6b66932a0683e4f2fdeac872/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.26d34b2e.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-FRzF9aW4VYYc7k1nDh0iXk8+8L3bBM2cS80lWca1yu3kTaQF4IC/tBACc8cUABIG3sO6aN48l/Pz0qvxsHpYiA==","shasum":"6facb0776380017892b7b7f5f0f75cdd9b2f89ed","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.26d34b2e.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUWa6CRA9TVsSAnZWagAAhXcP/3SJN7o+V1BLiR55kbZP\nTcxCyUd0rUzPvwcAlFp9UhFRU431o+iofMeXgznI4e33GfZh5cSMHIybKBTM\n9p0ovWUP0XdPg+0/eG1IeWbaixbjOED/nb1WlqCPVX+wxL44gMJA1qKsaoRN\ne4vB737IbQC3e29HcjnUuS0ULuYXkGi4D9ZPfdTkmIVL44p2w9DIrEBaIXqh\nR6DYpGoa8eoJRDjrGRB2+DlxSF4KixvB9pIvPdCpxsVfkoRjTLj/plEo5cPz\nNHCnb3sVgZYfYrps0Bdv7X1HECRY/UeHFvG71Y3D3clZAoJ0+HoWulWXFNLz\ni0eJXrYpyakmdiFc6Mu6dEYEKzIB84qTi+nLvaW4yqtdSMmJGey5ZsiZvcPQ\nNGW4TFJ8o2KW6EKLo0OuarcWj+ylorwOT2g8r5FlPW5BMkqAVNPCHJW2nIgi\nPIsPnaHpRSNeq3pIaQTtfJg/F8UOpL6NogkYuqZ4Ewcigfr2toNTeEuKrO9O\nuO8UVk77VL2FoCEtwTBOkmMo+0IvyskyWq50CsGa2l/aWahSNXIZT4XVRYFm\n5i6LpRtmBrqCBksLpvfPhSaUozTljDPZhice/NOr1C5HPiAmKUaQYLM4tDmp\nqEYHHObU/LOcDPXYiYoLyFWpFYqnbNRnahuhkB4i+rpiEw/aGye1jG4cBS/3\nxDUq\r\n=SIkY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRGDWhyB0FwOWrRO+rxy52ewgaaNR3HKumQ9I1rIPU8AIhALHiwGph1LsYTOf8Kdr6l37ee/o8G426ToA6CK5zL1jo"}]},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"acdvorak@gmail.com","name":"acdvorak"},{"email":"allanchen@google.com","name":"allanchen"},{"email":"aomarks@google.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"bonniez@google.com","name":"bonniez"},{"email":"obrien.test@gmail.com","name":"bwobrien"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"kenneth.franqueiro@gmail.com","name":"kfranqueiro"},{"email":"lynnjepsen@google.com","name":"lynnjepsen"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"mattgoo@gmail.com","name":"moog16"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"williamernest@google.com","name":"williamernest"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.26d34b2e.0_1599170234276_0.9613801621028708"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.a1c44494.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.a1c44494.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.a1c44494.0","@material/mwc-textfield":"0.19.0-canary.a1c44494.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ee68077e51a883c9a0728019c33ed96d4563758b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ee68077e51a883c9a0728019c33ed96d4563758b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ee68077e51a883c9a0728019c33ed96d4563758b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ee68077e51a883c9a0728019c33ed96d4563758b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ee68077e51a883c9a0728019c33ed96d4563758b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ee68077e51a883c9a0728019c33ed96d4563758b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ee68077e51a883c9a0728019c33ed96d4563758b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.a1c44494.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-ooCH/65lio3UC0NSJtfiNISztIyxv+iBqekiqsZy3Y8zGmcxpJ3vXVXFvi/fKAyhGAiOoOxwgfYFmcCyfqfpkA==","shasum":"d4592f302b0924a145f9d200feea52255537c9a7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.a1c44494.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWVJACRA9TVsSAnZWagAAoG4P/2i2TiFC1VDpvoT4If6R\nCPwAPsjE6xfpKsdO/JVAPywkjS5JJKVA8fm0rz54jsDTx21Na4c6WcxN9NSK\nFmmUHNZddSCb6aKXcG6RyOUYQ+LYOXUycnMA1BqueOQSAt/70zq51DG8+3cJ\nuh7YvWcRFOvcZOland3wkypIJJw1WnTeUGQIXSQadLko5rmSRLRwmuReX2Qs\nQlA7jhijDmM+EvS7jUBlb0l6MZ1I2R5Kog466g/h/o03L/8f9vFfkk7UiBM0\nruxwLefkmIih/IgciejW+Y6h4Pf944wDqWXG/PijqK6o42ZclEHSur56nPeS\nOlqdNz8NzUFDFeqSANAZsCxOwABvvJ8h9lwkPEs4Yr+HryE+AdZ1lrslm6p/\nG0DTYKRQwIuVJR/Y3O469Do0QQTiac7cCdyjVZB80INGsuHy0VIrLB+jlRAz\nf8FzmUjbaUoZLiX+83eYdTc45lLEq8bVMWCMWAidDCfYHh+si9AoT+bn9Mt4\n8xIoOt+iPt4bPhrKKQOX/lx8caKC26DpJOZoiBt1QVoGclPmkJq+clkWIbvM\nj8or1oLPKcsBlXotpVsVTiFOxpcPVESnllSOhcZ0prDV+vARe3CmEmUxiG8z\n8GEUKFS/ZNEV+1HBK/ZMw8nVJ/asTzS5FSsaaka80tYhcadw9u6gmXCsQ9IX\nIMS5\r\n=2lye\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBRqiDd/vXDOBVBfcrG5JNNzHQTK3bW7iIjO4xjT2JFQIhANr0N3HBfnI4DRupjL/MrsrMOJSTbqPlwKZnsZAWcueq"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.a1c44494.0_1599689279648_0.26292266918536233"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.be1cd1e9.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.be1cd1e9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.be1cd1e9.0","@material/mwc-textfield":"0.19.0-canary.be1cd1e9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e4ece959ee320d67e92b5c9add79f6f7eb4b2be4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4ece959ee320d67e92b5c9add79f6f7eb4b2be4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4ece959ee320d67e92b5c9add79f6f7eb4b2be4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4ece959ee320d67e92b5c9add79f6f7eb4b2be4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4ece959ee320d67e92b5c9add79f6f7eb4b2be4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4ece959ee320d67e92b5c9add79f6f7eb4b2be4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e4ece959ee320d67e92b5c9add79f6f7eb4b2be4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.be1cd1e9.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-uG9qCemxX0Pv7wKCXkhP65l+NiGaZqQLX/+gOUnLXlX/8gyNFM5YWRb+MlGmdaJa7spMBQUt39fEPsJgDEbgIA==","shasum":"b137453ae319f03080123149ec65cf9f713f441f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.be1cd1e9.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWlc4CRA9TVsSAnZWagAAcJcQAIYxlRVM13WQjTShBWyZ\ntpeXIxnMQ/RJ+qkMJ/VKcT7OGragz0aSY5yiUIohBUL6aPCfI53dVh20sm8j\n+pTXFPWd5/hyMXiNjjd6P7X42rcsZuEshwf2FH3tlS9+bcESwrSR/af7pYQE\nzcjWtzulNgZ0gVGFTUgwNoK5LTLSOW5soXshuOIQ3uNrhlqQE9cPdk6Pa+zI\nnt9kwVEZit1CuYyVIAkVpoRa9MfLdE/su0hjyHOU4Ra7UFd7QROftxSdysQ0\n2VvKYwojMkpWe5+IJXMOxde9tZ3YkxT1zI28ThSAO4EMWVQehn7/GFMnZ2BY\nSymWHnUmmIULrrnTO8gQel2UoDmPb3eDRiJxmpV5XNEA7qSHlLb+WU7pTpJ9\n/F9Ctxcx5J1nFBtYXDusZZVHR1UyN5LZZczMZxQe3Tu+3LwozEcKKnp22iY1\nkYaIx1fjnB13p5iiHzYUQNDVs6lbBleZsI0L3G7EMXZSRgwLGZwXVh/4J6Hg\nWanl4qDRXciurIIMIjZVZgkolg7F3ww6Ogv65f8LMam8/XAtEPMKmr/T5goj\n8Bq2zIxRsdzG2d/UYTyXYIAFf767tMOTngi2KmlvxAVxm/px2HVe4Fq0R9cD\nEjt7ALrIzU0lk4KmQQctfpkBAuRLkF0QLJ97sGp+Oveiau0ro4Xu6vObZ7H9\ntHpG\r\n=TSV+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDy0XSk2jFmsCkdPBMDBFGKIp7Jl3kjP+xuosV3rh5X7AiEAgZSWaG9HgFPeH1epTAfl7Tg7O4ojzr9YJ8hEJlG5d0s="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.be1cd1e9.0_1599756087879_0.6754948708930562"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.f094c0ce.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.f094c0ce.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.f094c0ce.0","@material/mwc-textfield":"0.19.0-canary.f094c0ce.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"de510bf2f44db6ede47942c88abfee6266225354","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de510bf2f44db6ede47942c88abfee6266225354/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de510bf2f44db6ede47942c88abfee6266225354/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de510bf2f44db6ede47942c88abfee6266225354/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de510bf2f44db6ede47942c88abfee6266225354/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de510bf2f44db6ede47942c88abfee6266225354/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de510bf2f44db6ede47942c88abfee6266225354/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.f094c0ce.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-WscFd5DCASAtGkDFgkpk4PlGc1VISMemz80wc2/2FFfLT6FZbi0kGOSDn95VrY0gTkG+2m/jYBbFJY1hwRA3OA==","shasum":"1c8bf3dde4ed0a7dc2fdb68ac8427020f592bc48","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.f094c0ce.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWmQnCRA9TVsSAnZWagAAGXUP/0CWPYBQWYPu/XZ21gCg\nFkYslYpsMwYlatKWc3lIrhe/QjLTFNEPJBRcX7aPHOEbRSivGa8/5b1Solrg\ndd3Sp5UWWc5lV3A4SqVMkbOiNfI+vvp7QqCMF3MKCz8+cPEd/4fm21KLMBXB\nKqTmzSqWUBzJNX2zRr6dgbKpil/D7xdRIPBzC/NcJp8CK+As16qk1I+7Aflv\nAs1325A93ICuadH3c1hxm5dyrS4khXK8kuuja+iEFuChYNwf4h4F2yvKhn3L\n1mnbsMOPrIvfwEjzmYGLZiuig29uX2dL+/1shqFGV7JHwmALqnBsQ4P1y81M\noo/tyhWZ/Z3YYVl2HheE2nNckPxCLGpo1ICXeXZJF0buvCVCAARApSsJSu4V\n8IEslQqBINpXmq5pABJYE1fGIKCIAgib3n11PKkI3JZa/CLxt9Hz6bhm7jzH\nMFN96FtoO7zTrYH7HePlFAwdXs7iO3xp2dGDAFrUDTh6M/7SGvcnBDTzVU6d\noiMfCwhmelYInUDGk/lfARmoe5mqep3hx93pnkOSzsXJ6/RSBZ785VJzDwW5\ntNuEnrfjYKjuZ+U/pAU4pNHwTzZcX+Tu+EVC9b9y6Xig+QUgPf8Zyv0j8stz\ntDt6kia4w/306WZuO3m9et/nHAkC7s8kfGfWr1chHohhTG/swyLtYyRaXayR\nJQ9V\r\n=PgBP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXsLH/Bvm7j4KI/oQqJRCSd6d1ii923YN4qiE72f1duAIgLq72Mn6p2Z+dm8pUMk9v1wLOTeZb9eLvyhLXjw1LKhM="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.f094c0ce.0_1599759399352_0.4518112519029507"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.c1261e7d.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.c1261e7d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.c1261e7d.0","@material/mwc-textfield":"0.19.0-canary.c1261e7d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d3ed845121c57e24ccb397b137eccd91a179c1d5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d3ed845121c57e24ccb397b137eccd91a179c1d5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d3ed845121c57e24ccb397b137eccd91a179c1d5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d3ed845121c57e24ccb397b137eccd91a179c1d5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d3ed845121c57e24ccb397b137eccd91a179c1d5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d3ed845121c57e24ccb397b137eccd91a179c1d5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d3ed845121c57e24ccb397b137eccd91a179c1d5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.c1261e7d.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-0VHQT6yY6DVS/0o2EMWeKA4CcvBAIa7S4fmzPbhm5Ck1IRR6vArUOygwUmqewuE9YE/tVJnjm6Vkom1P66SNhg==","shasum":"ef895f012063dcf2957e094a8878c9ddcc49b571","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.c1261e7d.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWuBoCRA9TVsSAnZWagAAF/YP/3zV/h+hsZbSMkhh5OeL\nD7gx3s1s1mL5uz+dz22pYwHSMPmfPkFn2mDpz+8MqJclCQYS6Wvk43z3MfUU\nTf6KUv0H0HtnoiuRJWi8e+yotY2FkT68TY9jpKlREfjfXfqSiHs4/rE3y1g8\n6w1rc+vZDEiBlvhBGltMVD7XsT2C25o7cGBQmX3nUtWbLcSkb3Z/obUPgLy2\nQ4rGBmUwmhCKaDMOjzCCY7KuevZbDFNH9uQzQxMhaprfG3m12bEqJszRXNnO\n18s8Up6IxCimSPkD5W7C7vXGYzvJicUGbHKHA3oBRca6k2wLvX3Bacwi2UNq\nAJjYW4Y5ta+W0lTMTAYQZ2xlV9RRtCi6L3MJS3IkpvY921yRXwRJKMaOiwYO\n7sN+Kok0CKcDL5tLmhY2oy+QW0hQt+PAq5I8DNAlJAoxcGIAOvhIKquLbynh\nmUh+Jq4DVc4+WBDP9K+TaoDyUi6C/bwl7YL5+JfQA9fHkR+mkMGrOMKsEgKa\nHXNqtwfsR4voObWlGLr+H2DFP2fVQW9bfs69ZY6RoE5gfIVnQ/WBJuZpsWol\nVSOfrEqI6tckAnZx8WV375IXsksLCXu1pbTNEAAFkxybuV1G0T4U2AVAUKTn\noJ1FAUBDbLMBL06IFR0hK73LuW9fRPWFCD9tdArjRnd2DMyeqiKoi1UsGAGt\n1YoN\r\n=5QkO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDykKy9Fw064j5xDiFsKRUAAd/8zTwVyka3U0kTx+70rAiASvT8WGrYEaTMzS5b+gWS1NJCWnEpDLp5a6gpP5ALx0w=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.c1261e7d.0_1599791207939_0.2472435353282405"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9b39ed1e.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9b39ed1e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9b39ed1e.0","@material/mwc-textfield":"0.19.0-canary.9b39ed1e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8fdf88b38d36782496195681d3b1d340ae36fe12","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fdf88b38d36782496195681d3b1d340ae36fe12/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fdf88b38d36782496195681d3b1d340ae36fe12/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fdf88b38d36782496195681d3b1d340ae36fe12/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fdf88b38d36782496195681d3b1d340ae36fe12/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fdf88b38d36782496195681d3b1d340ae36fe12/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fdf88b38d36782496195681d3b1d340ae36fe12/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9b39ed1e.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-bzi/5mmOsAPegSUBjnkwL3rMceFz177zDoLlKRtqLPbV0s3qsg/NhyqfMSU4557EGKjDsKhDeUfgwZZRqWt9jA==","shasum":"aab38872c844e270fa3b6682902b3fd12196babc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9b39ed1e.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWuCYCRA9TVsSAnZWagAAHkgP/0YZBhRwE/xAml4StoB2\nq1DEru2tz+h/ldGUe1fjIwm23LPRtEdSiVp6dmY1TAYGgalVZJX9XTvT36Cu\nFoKgI1IaeRYBc8iedR+h8Rt/qlSEmSX6kUahJVmHTKFKieYdZtpNJWNpXJK3\n+deZWQ9yCcdH3cj0dpC4AjqCz84uIzBbdiNBN5D0eIeqKADMMFX892BYTUBH\n+BoTBuHUMFanzRxYARpPzYptJudpX1KwWtcC7+jblxIEDt5MqCPPVpRvt/6B\nb80Wl9MqV0doxcMVVKdaWOhlNbykt2xY1mLSV/s5QbJUJWxqjCqLB0V6iuDc\nAppKAClBDJqk/6hLp0Q2/n17bgmGnhqKzlZEiFT/i+d6cELXdH7vkSW3zWTO\nh8Y3U1vWq9sJZmcVvboOHfAQDzr84dI3JGqHT4Cc6cDm6+zQbOZhqemXNATe\nbdfefg3vdojiX93UJN6xbvqWUNkYnZf16yMM/pKqTWDb0i/r9SLjm6DuDsbS\nJ0qdlvaTmsj2jqsx63320/L0ihc9tF4ohNeMjznt1iQu2sPVJFxdj2VcY+hf\nHPyT45irhL11YtdceEEqGmRUT0Kt2DxVM2/crZQXbtS8MqfUPNbcvUIXeobD\niA5B8ImE3o8m2WncGnlD72mNI+xkz+jkK0C0l0QHYyxvBXGeeRuISh/JyUrV\n8V+L\r\n=/txm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHdbOEUeF6p/RoxHwSKGrAli8MyD+yN0oKj4bBD8fNXuAiAwKmpof6ynyF4/KYkHYxVzV5ySKwePYHDq8SfrCiUiRw=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9b39ed1e.0_1599791255964_0.8497696518140123"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.e67214b3.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.e67214b3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.e67214b3.0","@material/mwc-textfield":"0.19.0-canary.e67214b3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9d09adcdde4c822614f34fd4c8fbf1e1b07e558a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9d09adcdde4c822614f34fd4c8fbf1e1b07e558a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9d09adcdde4c822614f34fd4c8fbf1e1b07e558a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9d09adcdde4c822614f34fd4c8fbf1e1b07e558a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9d09adcdde4c822614f34fd4c8fbf1e1b07e558a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9d09adcdde4c822614f34fd4c8fbf1e1b07e558a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9d09adcdde4c822614f34fd4c8fbf1e1b07e558a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.e67214b3.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-pRA8Ffbm/W7h8h0rN6n4nOcowE8+igvJfdOcIWUgCx2K2pZ4PzNlHhY0XtHYpSbPXb8NrUvSr8oAMC7s7Fr+iQ==","shasum":"7270fc85c89f8f217ccaa3c20211eac0aefe5090","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.e67214b3.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWuGgCRA9TVsSAnZWagAAHVAP/iOQDbfSWsqLh4FaZsqi\nDmQOfPe8n3PUvclcbpWvkzph9VmP+4RTfdWmjHB3rlbd/WeEv7qCy2BBXkNd\n+vNAKdU7E2kY84IoEjXjP46qRAndH9rdq3OEKlBTYzvBZLcOk+CPRxcQZwH5\nODKkJsOXTgjcEBT6cnNr4goyIuP4Z+HZyq+Z21HqTGVDK5+LLxmndf27ZODU\nUb7vLzxDAj688qwzPspxAN5h7nmJV9CPIU+57sh6Y1Icg2o1M+HHTWxGgGMe\nl16/D4OkGgXSY+1dPl7AiIaoxqQqRj6PmoXodhz9Ba5bN63YTbk4LNuUFpFA\n9u2BMn55M05HcVtcBlAH3+zlgnC/wrUopZYaPGdJjgPKsUwdSlHp7vNNoobE\nhK/KEuNGPgZtyr45shauXJHXNUAyyH8NZ7BkxrYNc9UytKJi5R1MjXgZ8x4d\nQD6rOPOtyHT6H680z9YnQO2JbZKY/uya8VVRe5QF01C1H4UzVWhFbKH/6Icu\n3h5wqeS1h93TCvg6o0Ch5Ci5sq0LJ4sJPaXDgSCQKAio5YUrv/6FIyRX0J/w\nmRR971x8GtVWfXL5xgH+jo7JHt8zikzCKg103sL/CUfWbhgKQ3Q6dU4p8TbX\n3bk7t92fR8BWEDmQttnN7fCxOB++FsRsfZq01l+bxhbrE4d3ceN5gdD0eoc/\nxXpJ\r\n=Jo2f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPnIi9yfi1+cWBqQTNMCOOTB9T/uvJ5cNeDnYOkVSEswIhALpqsrUiJkkjCAG6ZNnZT2Nz/Bl8Tp7ZDJv0FZAbQXpc"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.e67214b3.0_1599791519575_0.1513263654254431"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.36f5da28.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.36f5da28.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.36f5da28.0","@material/mwc-textfield":"0.19.0-canary.36f5da28.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"eb828fe61bd1e331e8d6f63a24f6e78d58858a93","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb828fe61bd1e331e8d6f63a24f6e78d58858a93/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb828fe61bd1e331e8d6f63a24f6e78d58858a93/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb828fe61bd1e331e8d6f63a24f6e78d58858a93/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb828fe61bd1e331e8d6f63a24f6e78d58858a93/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb828fe61bd1e331e8d6f63a24f6e78d58858a93/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb828fe61bd1e331e8d6f63a24f6e78d58858a93/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.36f5da28.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-GUW2Heiy6mMJEh1E1uqkuegp2riIW65Fz93yQeIc6Wf58tCxPHr2/cbNFSCGYf5SfcuEe/s6WYyUpGIbMWbLzQ==","shasum":"e79c033900240de3292902b9b584f890ee543153","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.36f5da28.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWuJACRA9TVsSAnZWagAAqGsQAIWhLHhblVZI7BBuOh6X\nuz097nf2jrzLGffW+SKzyrYQWFnFouzxUWcCdeJ/p6Cv5l2/lubfTJbyH7xZ\nESb3qOkx8q2mb3b6N2e3h9xM5l7qhbuomhX0WjQGAtc7ucdfqbiYCxiNHZs/\nSgfPfs0ou1ZWIHS0BlOEh4IriBDf+KMpYf46XcdMDlMp40F4/lI986MB3tAD\nhztbAjTb3A+u5ewKYYN2jmqcanAciMnaWtzCeXLe/efHVnjGhqDpJMyON8nL\nEojiBDxiKlw1Qon5y5ficae8e6SdbR0/9YdCTwfCotfhkolThW7il7DjvjBn\ndf7CHAIcRM5mElt71asfAJ3Vt+jobmgLAm6HdnYOKZc1ACZltmAagFQyyiWl\nUZtKnMiEQf+mF/77kk0NnWMEjesbUwiArrSFG8qg0owdOd72iaC5jyuGZ/Ak\n351p65X0n00+7/+/qP5VYCub5C7dVM5fwLy6Jf3HbGMfVzxhfLEX2T2TLxhP\n5G3r9Ovq0b0zWF03wcHLrGGs4Fl0xJPNetn0q77mNU/X7RQBFw+/zcDPBcaU\n/5TZMoeSq4aEGhNKEcnlnjWQIDVVFIFiB7q5/GST37cnp6FU35JcAtDxItAF\nFkYFw2kXHFBwd1QRyhWB8foEs7/RN0kZXb1a5qszagOeSwMbRmSAX408fGr0\n0tMQ\r\n=D4Oh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwukAEpvubS9fJP0Ii7c/jskvrxmCq6Pw6v4EfkghhkAiBvMJw/1A6wPbbQxGMDR+TMLiRw2HODaEtW0bYXkyRZuQ=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.36f5da28.0_1599791680261_0.32190078234600406"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.3babab12.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.3babab12.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.3babab12.0","@material/mwc-textfield":"0.19.0-canary.3babab12.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3c0abab82c4079d265dbe68e3b3ce3dcac8519b4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c0abab82c4079d265dbe68e3b3ce3dcac8519b4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c0abab82c4079d265dbe68e3b3ce3dcac8519b4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c0abab82c4079d265dbe68e3b3ce3dcac8519b4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c0abab82c4079d265dbe68e3b3ce3dcac8519b4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c0abab82c4079d265dbe68e3b3ce3dcac8519b4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c0abab82c4079d265dbe68e3b3ce3dcac8519b4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.3babab12.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-0ohqOFnXq1UNiJBkwSrz8ybn1ymD2ruBnvcy9V0NMcJggdUm2Sbyd6/LJcz+EVsYcI+z5H2MAxvH+zFMFa2PSQ==","shasum":"79bde7cd6385b519874c1154c41b6f7e6f2afc21","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.3babab12.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWuL4CRA9TVsSAnZWagAA/u0P+wZ0inklQs7LZpV2cV8G\nK/cW6QgWorCJH0iY9UoL+mtBB/Yv4yP0q/WrMdKx5G4noKBqNkVEnm9bIthx\nxoRRO1yDFxbdjqi62PO9mD42mJtiMSnY6LF9EEIEP/DgCdTvlyeTN+0Mz9kV\n1/yiYIE9QvGQUapJMvKQ4Z/qaEqBQ4GZNe8GysiQs/rJ2qDFhL1t+/k/QUf0\n4OAKvGzJf5UeWIiJ9aiUy5SuOJRk8S2sryZ1Ta+k4iQYpxwMygxGWkI9O2hs\nPdvw1v+8tliRN7tMXKrZdmyUI2T+LEY+rDhma9ZZEYo4lh/W0Hc2WkjbHeb/\nQFJ6/zTOTa+RJ0QR2HXKCPp6r/hqBtVLg8C2ji2DvuQWqmufnkIZLWcR4TKS\nqHD61j7i/YOtCbjRHiOQqcFrbrXTvkZ51oUdmDS0uqWJEFraVUYZtAHnHEj0\nrBAamRDWAzVgBMXzC8Yrxxi9sd0RstsDIgcn/Ntj6rcIV5KFuU9nHKB4sq1H\nUWvY8IAYVEDhHNTmmk5PppCENcNZ0xd58H7DkM4t9vGlge74MNcaSiLP28AM\nQ0CUIpJHpjMr6Hp5ESS8Xk75hnCNRT7XqdpFqUdRYFTi+vtbIC9N/o/yhwhv\nVXRFCfS29cwnhU1exhYPL0TG4EjBhfL7amnVLdymlqlLOj4BNYPHf/YqBMDh\nhe6q\r\n=D6IQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/jz6APk4N9ZR9pq4fMybHb/SKte2epPPdWsfuLaaLGgIhAIMeY0O8H2oOgnrIODFOgYhWaYxMppY8/OaoOr3zmZH4"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.3babab12.0_1599791864556_0.9772455555716957"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.a4481e6f.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.a4481e6f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.a4481e6f.0","@material/mwc-textfield":"0.19.0-canary.a4481e6f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"de37747ea53bd97e6674642d17f239407a14ba71","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de37747ea53bd97e6674642d17f239407a14ba71/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de37747ea53bd97e6674642d17f239407a14ba71/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de37747ea53bd97e6674642d17f239407a14ba71/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de37747ea53bd97e6674642d17f239407a14ba71/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de37747ea53bd97e6674642d17f239407a14ba71/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/de37747ea53bd97e6674642d17f239407a14ba71/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.a4481e6f.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-UbOxsky5VnCfSeNqnayR0/jUn719DAO3Vc7VSi8MY12B9cprvCymzVeLHIOwu6mLD+ItKpFgOHCH0gmZTvzUEg==","shasum":"cf3f304c104aabbbe7e76a48183d74dd3e5a1d47","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.a4481e6f.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWuXGCRA9TVsSAnZWagAA0+sQAKExqEDZpjujlArbJkYw\nJA3/yTDzCq194LsDbClBxsLP2ViB+xBeufVvDQGObt15LRBQutXHqrieojvg\n/ZDxXOGF/LeHNa32BscFqbz2dskCUKaDnCGhhx1hPMIVz39LXqLrBkEeWF8+\nr/Uz3u5f6o+snaqW81MpYndyOrUIZgCQcT6r0qx9pPH/p/TqmvvfpFKdF3G9\nI2t5BLmVwU7HhsKDL/q6TWPz6+omouq4SXzgb/RXiFx6UfFUFXzntbl7SB3B\n2tNRRWyJMMLnDZA6cGdeOLnQty6ycMH6Vn8rFV85CvQVh4ZCjmJPM4luuhiU\nMff4WxuAWh1/bfn01jc90MY8Bpr5GjByiYNCPlfAEDH1qQTR7kk34Givo/MQ\nNhBPxaRmfIJiq7ZKMWMigB4DrwP0AGZPk0eubdNz+r+mFPl25l8nHHJzi0pG\n+XWfofrYD9HM28ZtULit3Y0/z3fW4z31JYV4yUHd7UMvxf3wjtXaKIcNHyTU\nWstBpQXBQxD49XHFpx5y7ZDbHkHwuXFphJcR1c4Vj/7lU3VcOp2GJL9sCZxS\n2pEIdRuVvVH+o5i11z5nhNrABNvRyIVfJ+6fQg4gg30IDlztEKobN8ay/b1u\nWg82zzQEDBm2QWChUALln2lIwUtqBPJlj7sXURpxTNZbyJdX1yNWDYQW7yN+\nL1DQ\r\n=sjsz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHvhzARpdauzSz8/O43S1l0aj/W+bprld3bP0FcclglAiEA+ye2rdhe/j/2auU6VmtHI5dOdYf06cnZiGSw2kqhXUg="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.a4481e6f.0_1599792581965_0.00883367632216392"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.a9177836.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.a9177836.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.a9177836.0","@material/mwc-textfield":"0.19.0-canary.a9177836.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"172468b3d6a388a8fa5360f5754a4a7dec5b878e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/172468b3d6a388a8fa5360f5754a4a7dec5b878e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/172468b3d6a388a8fa5360f5754a4a7dec5b878e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/172468b3d6a388a8fa5360f5754a4a7dec5b878e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/172468b3d6a388a8fa5360f5754a4a7dec5b878e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/172468b3d6a388a8fa5360f5754a4a7dec5b878e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/172468b3d6a388a8fa5360f5754a4a7dec5b878e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.a9177836.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-L73gqvByt+L4rp4g7aF1AbHlddoEZ6Wga2fLTVxGDCIvLHjjkOWihngyVpksM+Vy7j2Yon96xz1sRe5fjXVLCg==","shasum":"8ba228722af8142ae93548ce37d4f5e4a1c6d2d9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.a9177836.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW7hMCRA9TVsSAnZWagAA8UAP/iAi8yXjGwjVapaK2KXj\ntPTvRewriw6sDlVQ6UL853mov41UsF3nDL9SJT4RTdc55b0ntkKZvBljayov\nAlP5PX0/fdP08QkgopJFyRI8RaqzbjFaO4/AMSYA6GMqqMnpFZUBiRMNUswL\nhNRfgXBQkpwFNJmdMAxcTL47OlsVKzTpQSi1pzAcAwP/bQO2il5SpFvVB3jl\nA21WKfz2qWbq69K9zOmxZZ7a7astP4OrxubRqiWy9IhwAoltnnklOmMT2GpO\n7sz89aCElhcx9Y48SaMduj24zEHMUA4uY677Gwk8AphyVttbi3/0jwV6pbzR\nJtdPEEH7HsbD+8yH0/6dD+9u8l2Y0sj648kGBjvfOi5tL8AQAmYmjk5yCyzZ\nqsZOipPOKFwK+ZjzBuFyMMUQIpDgipBQ9BKuKMnLxRGnAXvq7PohF6HwUWAM\nsk324dam0PPLiUYyg6p98M5/NeXKL3wrOFO8Q7PCM/jbM8lDaCjl8xxXZSja\nfMHPzOBMne0DS1Zal9WPzHW8mrSupUQOg7jKczPSQrEWnmW3WoVfbni+5ewE\nnlru1Kpv9eKUlfI6Hg+cUSIZVmbGCzb44662XExTI3+4mDPoNCwunzsT/hWh\nx6Ir7W4+eSRQzaINzoh+a7QrfSKkPYa2nB7CHQ6T7qY0CdUwRIJXwQmkZ1LH\nGYw2\r\n=+Nwh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwjzvWgB3hsPJlAfUvHh3Ex9Y34JSKO/KgUzZX8HzJxwIgRRRpOXFHA92OAl61DdgenRl3iFMbxp7rQ+ox4iS/INg="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.a9177836.0_1599846475710_0.7396922397836492"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.b102a3c8.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.b102a3c8.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.b102a3c8.0","@material/mwc-textfield":"0.19.0-canary.b102a3c8.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6e9858879b6405bc690bd677e308d5197c609741","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e9858879b6405bc690bd677e308d5197c609741/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e9858879b6405bc690bd677e308d5197c609741/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e9858879b6405bc690bd677e308d5197c609741/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e9858879b6405bc690bd677e308d5197c609741/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e9858879b6405bc690bd677e308d5197c609741/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6e9858879b6405bc690bd677e308d5197c609741/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.b102a3c8.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-qBSDnHKLr/2wy7/Kbm7aG1xTSx9ECqcAPdw2xNRVe0JPbxHigHSS4FI6RJVuoUDIc/0KZRBjx/pWx5DdDV7Lwg==","shasum":"861f68832b6d3908efa0ed5c9266a38daec084f4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.b102a3c8.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfX875CRA9TVsSAnZWagAANc0P/A7E8i5U74ma7mL/A0BI\ncM/qdQoafP/mquKrMxY6T7/gPZJELCv5OUjaFi3o7vRsyjER2nTla8Yl9/rB\nzTpWOYWy0tpVdrWf81iii/bNyaGtdHwYTWonUb68T79dNMPdXZNkR7/YF9xR\nhf19gbupRtQg4wnoEoOD2AY3gHTh8iq3rC+j9wrpeE5A+pT5zIrwbed2KR0M\nxUks/LTiBGY7kbwbEH3LJqbmjpnSJWqh3wtB6SuEbrIdudVeHOCDADCG3cZ0\n6HTxU3vPdhMIF4hS8Vj4tdlvGLdLO/ohsWGBarr6mhggQJqEPs6yPBcLD7rX\ntol0qNb+27TKZmee8+74TyrP1kM2tSzE/9qK/N0QRy9fFDBQVgMEsxJgd2r3\nFsPGvCT68gKXc6nkErGjC09zBXtdn6HWHfqAX149Fy7hMQ3Jwan5tPAZ8C/d\nrEhOohoFXk3zkI60lkDJPMRVsHMZ3MDdVrGelsdHXb0P10sj50uXXEoX201f\noPcAmdHgwZbg6kRYGlneZZRm3MqW6y2ayTfLI26jsPisbSskHqoAQte3dflH\nS/GFcvs64u6fqsIAkybKiEFcDwD3gvBGmkRcH5/zqtFG7n5OEI65O7aKtdTZ\nrY/0k7Hmyp9D/GGcdDiGpol9t87//pLdh6Uh344hD9+OI4K1SHVTntMIHPke\n69P4\r\n=dOY9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICk7H0hAgBP2LBWvI8VTs/RE39oBKwkJ/rnHuI+rNkDjAiEAjcGLnN9f87+jWdBvN+hyf/wVltjbAo6sBSUbca22Eas="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.b102a3c8.0_1600114425378_0.9177696659442856"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.a7fbc707.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.a7fbc707.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.a7fbc707.0","@material/mwc-textfield":"0.19.0-canary.a7fbc707.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"02e804c299cde57ab03b33a403a43803fa9868dc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02e804c299cde57ab03b33a403a43803fa9868dc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02e804c299cde57ab03b33a403a43803fa9868dc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02e804c299cde57ab03b33a403a43803fa9868dc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02e804c299cde57ab03b33a403a43803fa9868dc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02e804c299cde57ab03b33a403a43803fa9868dc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02e804c299cde57ab03b33a403a43803fa9868dc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.a7fbc707.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-z/3Spku8nvj3KKIhG/vUGqufVVaGKhVKtGhgHo79Msw/GmzKrypKJXUBCfYO8K7nGFTQhbu3ZsBacrMftaijvg==","shasum":"ad996f171d2f0d4d47df5246c1cfcf016edd8c77","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.a7fbc707.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYOZuCRA9TVsSAnZWagAAYn4P/2f8/D/vKN/vnj3aXJIj\nKlgTPZfbVOBCt0M0mFF8QRLCNqcF0vtLaENrjFutq+lNMQao5gJz+CAUDOjR\nr15GWM5FHqoKtPSUbxQ80hM3RhhJ6/A2ocjUyk/8yVHAPIicxMEQvuzye8eI\nQPN3zCXp/6aSRee1Eu1ox6wEZDq7MaG2gwCmfxX2WPn6UzOOTyXEGc6ivOLW\nQlCiVcF92dcwXGybz6LIzUO0wHwuP6Ey1ZVEGgoL0MiKfDZBb6S5kU903sr6\nyGKO+CxVrJYiYr2DImF11Ivdq0X9Q7RP+2Rn3ImslTsXQJhJ1eOk1oz1PbX7\nDHq10YsWHTfN6yPOVvXwxZyyCuUSFaT7g4kVIjX/CAaQKmESqyrNdLVPMnzP\ny/cjIsfJuVvxAgCqRtCDVr3Ucb9ihNJZZSTFBE62Bs3bTEuA6aqRKIxVMQWE\n7OWmI52gzPq3FzyDIThcugMXJ7KelbXbRNOCszbP9j57iUEXpAeRWncxMBCU\n+dB21UMFNEJNXZZZLZf+KAI+EgCM33hYDM6B08wuP52gebjjJz4x33MTyR7x\nIuCR5qgvSzafEdE56jdxvPqrxsjaas/hQ+j8N3oL3dHUfhZIhMMTNO/1TdSb\nCE1B7bacoyyTZDXDe8J6toFzXwRGD07PrRKVSlxmogxui8OhsHaibaAQSKTI\ntM1L\r\n=FWj0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA0ADb85TarM1g7Yppbp/DCISJfuok/GFizbD4LtouOiAiEAtK+aSmihATypHCfFh2zrzlCeaP13DSjZ14xDVnElZbk="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.a7fbc707.0_1600185965672_0.1529439499261127"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.ed6b8660.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.ed6b8660.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.ed6b8660.0","@material/mwc-textfield":"0.19.0-canary.ed6b8660.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1367f8f205fb56c27d6146b261ef87d62751f903","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1367f8f205fb56c27d6146b261ef87d62751f903/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1367f8f205fb56c27d6146b261ef87d62751f903/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1367f8f205fb56c27d6146b261ef87d62751f903/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1367f8f205fb56c27d6146b261ef87d62751f903/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1367f8f205fb56c27d6146b261ef87d62751f903/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1367f8f205fb56c27d6146b261ef87d62751f903/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.ed6b8660.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-bY1WNDzmVB0RpNIsAa90bd83+zfTzmWlIOg9rxmHgZg+oq6eSuHMf40r8noCKCSzAmIsdv6SBd0++gE5pYk/0Q==","shasum":"7895aef5264aaa292a66638958a4cfb285610293","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.ed6b8660.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYPkJCRA9TVsSAnZWagAA/+wP/A4w8mQ4EKK0IaeDqITN\nOy9SNrssUAcNtvy4BkalJmnmNeLO+oan7xq/PjIHPg354RvYApKDWG18ze8/\ngF7cjJiNM83d2BblXZqFjV83vQ8jz/sBz2aSXsYls7+ONRLPnY7OVcbi/Hq4\n21rNCKyRUpe899XamKib7SpgayPjc5ks75EnKQWh6O+1b1dgjV4EMV2EowOc\nnmwclx87JY2mwgEBdjVnfK8gKRQmsM4IZoFhIa86F+SI6upttOLseWOti1wR\n5+PN94dfwnkrOitdWhkOG/CP4+wVNLDkas3zFcVfrvxf7jPl6sgBg5hE9PvH\nqGBhDZ7rZQv8NfGIhxbk1kWH4jA7deNRXPOWWgMcEpJWXyUfSBdIreKccAUd\nVuajOnP93lXoFlLfxAwj82Ow4nLcqIRXMj0IJizCFgKhWU5UzqgPNtjsaJrf\n3XB3+r8pl6nuuCT5I+vO0m9X8U1VDcEON8JFHn0E6ON3hhRZfKl4zh3S7nJV\nBuxn59ZmsTsXfbfNjcaiWRqFMYmAFMzSaOssc1S7sbSjJru58NFfo7ZoIOPi\ng8Zrvme7L7z13wOvSDwurk2YRRvmjbZz9HkZt2ZpRgJ5tKEOKd68LoOoK6NF\nsPj2OnBSO4tYkUvraGKbuNs1eDykTxAxVQSnIi/eSmxzbN6I6ZqHZizQI0jW\nwUv+\r\n=yOM5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwn96JGVu7yG86im2Ltw/PzURrEHGEqRMDwFg6zwnOpAiAn8rnUh5Ab2WJA1V4a9vD3YsPhE3yeVb3nNXAoIug+Zw=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.ed6b8660.0_1600190728478_0.056449489416718235"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9c2331f5.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9c2331f5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9c2331f5.0","@material/mwc-textfield":"0.19.0-canary.9c2331f5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"59f9c402cf61ed25b9563e2c228a24b4fb13e1cd","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59f9c402cf61ed25b9563e2c228a24b4fb13e1cd/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59f9c402cf61ed25b9563e2c228a24b4fb13e1cd/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59f9c402cf61ed25b9563e2c228a24b4fb13e1cd/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59f9c402cf61ed25b9563e2c228a24b4fb13e1cd/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59f9c402cf61ed25b9563e2c228a24b4fb13e1cd/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59f9c402cf61ed25b9563e2c228a24b4fb13e1cd/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9c2331f5.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-Sjg1Mfqc+E2laoyt9idM3Hr8RW0G8oyJPPXv0FjzaQ3Ppatr69Yrnwga56NJtbiFCs+Otoa+HSxTbUrfvpS8hQ==","shasum":"e2e8f2bc81e76f04fba96795f0de73c2d2096f58","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9c2331f5.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYP67CRA9TVsSAnZWagAA0x0P/jLLHtF4y7wurZiK5Tx4\nMklz5YwwN2PoP2zeN7RAIc0tikzU69tW6G0OB7PVe7n8GUpCauIIK4X+2lZ8\nLQU6cQ2V/WbeqReky+AMYVSLMGe8UcfyaUb47YV9Oc1SfcMAwJATLhvgYCRZ\nByrKZwg8snpYwLUzjpr28mS+Zv85+6iR7CuMYBk4bw+21c8abIF5Lxqq57YP\nyb8p2CR2mM66S/aU/RkmYu09EBrxl+5ygQ/xyojUSf+Yi5z1d4UNv/Hb2dmg\ns21IGbl1CmP9/GgS5VRsQPqbJYLSkzRtH+IH69lgL3fkc7xcsyCcywANU57q\nVM0cr+tD1cVHUByFwCS8lRp6IfpZQLZb/9SZMmj8rhrplwGNefPEPNfZmbzf\nC1LViSXFwbi4IMqtZTSXmRbaeJBTU/sgsj5Gz++0wxH2WXK2GWehQPmi3pfa\n1NgchNcza/L5LJyGEUFdExwFw5kqAd9PJLOJSuSoWS4Ucm5bZeCUMoC9qSnS\nT9WWXmUVpKKOcQqbIdATwZsKaSjTQgfUON6I4MGi/bOKoUeP2s1e41dVd8LY\nBx4XCxNynV84ZcU8/1Zkevkqdktjgb1QdRXb4vLAKtSWMfxaVqSjayilVE+u\n/Dlti+Zmrrx8LNFr8si8BTr5UmemNSPb8MgN11PH6DL9PgOx8uK2fJAqafwz\n6sx6\r\n=2b9B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChXEIbneCe8H/3GH0QrfBZjvfXBPXagSHmyD8VrdpKAwIgDbsl1f6jq2SQT4DE5ZuzywANUMc71mdKFu/4tLdes1E="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9c2331f5.0_1600192186850_0.5356091561644896"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.63a5f088.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.63a5f088.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.63a5f088.0","@material/mwc-textfield":"0.19.0-canary.63a5f088.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e26f8baf20e7e3a7056a6b95b14cbd94c380a1a3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.63a5f088.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-AFaXeN0BdkbYe7VAK800xTgBPq4z5uA3+BXkpeNjbfbql48lUTQpoETDVZyjt6AZAgZOo1lht0oQjMkpcRIcVA==","shasum":"6db79d52ec0f4b0ffc171a71782c7f1ca85e14dc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.63a5f088.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYoXPCRA9TVsSAnZWagAAQVwP/RVsS71X/01yxJvqaoJv\nh/aqevtYG9UYC5uoc9XZE8JnSIClx2YLb7HwlRMNFimwNAXqMulVSAF5hl/G\nMpDxeTc1i3vN9JMEbgXRtqqD+a3L54SsIZ2CMFX8Knkyfq4MflXCiZp5ZP1W\n7FOal8hHudEMjclvtQwdErxWVFuQ0Rytu5FUMOIOahiz0sljc/eLx91kJXJh\ntL/nrYuVJBbPHODyjLob34/gXmb9Bu39r7Hyg4jqBmhXKysReFnsWfN1LBon\nHm9rbX5ZReybbP9aHqtJneSNklbkMfWYK97HnJ+oPAzjsLnSplihdxiv9duI\nCHVhL/d2qWk7np1XLXRI3GGL1fa939fVh2gUfy8My65Q5sqb1jSh963CCqwZ\nrCkljKOsJJRBHmTDPW4fznS74r5p4c3qyidNKhUtfouAjfoITBbMXJFeRiyb\nSMcvkBijKQkJNHlYvr7RLfqxmS//QCsScJE+0vj5GkBW0Sxac/ru/Jyebnzk\ndOtdDd4RZbK8LntaDpAFpkBaNZEgSBlfyOYAue91mgQdQMv2XpVBVjaIJ7Hx\ng4CmO2PqrrLkvurpj80xdAHi3gzuLJ8B66eVYs/Sx1H+8RtsfCQNKLIPtbOo\n4WivAtBHf4WbD7K9rf4pZZutFvvZlPZI4pu8iBP4qa51XEyHQuVqCEblgDta\nRsHe\r\n=jLp+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUyf1qV17puDFV2EYQnC5IR407QpP7NIljVitGxRMN0AiEApQekd93ppbFAHflC5O4VeQ4fvH0Rdv5wo8HzZ96crxY="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.63a5f088.0_1600292302696_0.4814521209963061"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.b7995e49.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.b7995e49.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.b7995e49.0","@material/mwc-textfield":"0.19.0-canary.b7995e49.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"18f169aac3491f89184c2463a837b86dba845e82","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18f169aac3491f89184c2463a837b86dba845e82/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18f169aac3491f89184c2463a837b86dba845e82/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18f169aac3491f89184c2463a837b86dba845e82/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18f169aac3491f89184c2463a837b86dba845e82/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18f169aac3491f89184c2463a837b86dba845e82/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18f169aac3491f89184c2463a837b86dba845e82/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.b7995e49.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-cXnQWJTVpcv1BIr5dpsIDkW8sNN1XaO+RjU8SKiXWHXBA8KOjQoxv/xda1Q9AKrRjnee1SLznVJkty6KjYmt8w==","shasum":"766a2a0695b1d489a2c2dfb4f208ac82a50420a5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.b7995e49.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYp9ACRA9TVsSAnZWagAACesQAJ2A7XNaFO6Xxw9w3zRW\n2nfGYApqSB10nT6otRmjZ9I672QYrNwn/HJBIu9qU6CCIukSrhkccX0QNdID\nBtvkKSOPVNwFO9CUUzHZS7LMC3NJnHi+Nun33Wkw7mVYIuXm5yHYcfat7RLn\nn6/tWEKv1R4ctlLKZdsEFNggjMRTqzLH7EOF0zjDaPpoqgrYLAA7t5YietHN\nv/hZZ62ZReea/Uchi31pXF6gXgRXP0HqtqL6u1dgVm9jaOv2MIUzVTzNJ1Xu\nS3PhnBOLEdjzwdjXW6RfFrhVuPw0OG1lfZL59S/QL9fmyhTpY5Dmw8C2IcJU\nBctd1ZaMbcegOHnXuh+etiZxkegVoOMAjRVGCen+wX/U0zpW787VdYd8nAap\n3dSHQ/DUNhDa1AK9ND9I5+W9zOFfuKXNHOPyb9UFjC1BZvceTdeFpdZT+Fp/\ntEhAEEl4fu1okGp6g3bAIjCtSyEpC37JS0UsDii2dn9sBLDhdv805pMhJGxy\nzv48z1aLRY1eo7n2wD8TNv06AV41vmtcoBh1NctiYCfPpXx1v6gpaXU6pMtG\nmkdU9VbFZmLanJ2zJyJTyurl3VPmw1WCclK70nIwt6Ebo7I1CJ/NuIY5XpQ9\nMF+qNWwzAAI0lZxxT+SrLaTYnzL5+VNnrfqZjzfJ2XlPaCIqGlyi4paOOB8Q\n5+wV\r\n=xAjh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzzocTAFAem0CPE3+63MVOF/DlYRcHamz9dg9K4ptjgAiEA2g03l6vwC46Agy3OONxfdDicAQFa5U2cGLKDuacH11Y="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.b7995e49.0_1600298816165_0.7528327163337609"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.0da3ec97.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.0da3ec97.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.0da3ec97.0","@material/mwc-textfield":"0.19.0-canary.0da3ec97.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5f18f76403ebea15763db5e696b84d6d20a3768e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f18f76403ebea15763db5e696b84d6d20a3768e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f18f76403ebea15763db5e696b84d6d20a3768e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f18f76403ebea15763db5e696b84d6d20a3768e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f18f76403ebea15763db5e696b84d6d20a3768e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f18f76403ebea15763db5e696b84d6d20a3768e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f18f76403ebea15763db5e696b84d6d20a3768e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.0da3ec97.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-UktPimfDaX6sjCwbPa23/l7GmL6npXvwYlloXeTk4DUiiavGGV8s6dqykKkStvdbF7IoWsVjAzVBVH6gRVpb1w==","shasum":"bef57d0428791ae4794af3b529f637e236679912","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.0da3ec97.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaSSNCRA9TVsSAnZWagAAHS4QAJ1JAYNGE545OzYfowyb\ntPDMpBh4A8yhKsBe6t073kGVc6I/k2juSVY03mae5mSJwddZGKytE2A6IH88\nwu+Qs5LaHvs956rkwR5I8IrqHLviyHWE23Y76RZ+98YDWlEFMc85B87eHcRN\nrLJ+Svy2cZV51r1GxppkJ1p3BypcWweKZG7GvWDUSWiBMu2pDrztaRnDCnAb\nKpky+RcWSgHIHhwVuX1UwtJiJgKD24kA7XvbSsWU+agfW145ZDN9wUXoPyaQ\ntUc9iCDRKNIuWmL6d4CmlfyvkwLZ+rh//MwDJEt86cm5RxitafK+pkGLAnz3\njVFqNZjMb6FwPkpju6IPMPGDQsRp6BZxuQ33EZypcVESUKlXLcoNJW6eV0cb\nUlaT8peebR8u0ZQU/v4mHxpK2DF7cTJuVvpoUuRXbO0swVBfLiEotvMhGc7T\nIgRbiaW3CEBsxew89B9QJm54dd9Kok3Amx9bfp2bHL+r0cIccntNhwtfhypw\nz4lFE4oQJpWQSRdER+yW1SRUu5IKzTucyLfZELDaEAsAlkqbEuvktlr2qP06\nknhfvaX94xWcWYNyJMV3FrepdYUq20K3DlWgbZEhWW0GVuPzfRIpok43CWF2\n1BW+bWV8g5s6v1D6/+0rGWPrlBjwKVsb2nQI7/qXtC/nyD0LoA9aQByV4S4K\n3IyL\r\n=9VVZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9caEvQfTWXJa7h/JHskfGgaf1djpUBd3Ec1dEvnYy8wIgXhdZRPetM4qL6vgfiACYOZJdmimyn8Xn9HHhCGXU15k="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.0da3ec97.0_1600726156748_0.36001459369072"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.a0793c96.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.a0793c96.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.a0793c96.0","@material/mwc-textfield":"0.19.0-canary.a0793c96.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"4332e148b28dc28d9b324306eb18987b31a80ca5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4332e148b28dc28d9b324306eb18987b31a80ca5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4332e148b28dc28d9b324306eb18987b31a80ca5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4332e148b28dc28d9b324306eb18987b31a80ca5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4332e148b28dc28d9b324306eb18987b31a80ca5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4332e148b28dc28d9b324306eb18987b31a80ca5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4332e148b28dc28d9b324306eb18987b31a80ca5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.a0793c96.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-tcvGHcniRUkLrl3OoCcaBq5MPaJ34GhpC/Q8X/UzISTNs00H4ZZyequMsMvMZzQcBjjbMQhGsjn04xKXnXxFAw==","shasum":"0ba08a3b5d2b5a6c8611f4bb41103d74b3300466","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.a0793c96.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfai67CRA9TVsSAnZWagAAu+QP/Ra6p0pvKx9RLZ5CMK0k\npDAYt7U5z4JkwWTHUN9zML4vzT+fAQBfLvWTRCoh76ChIJpCbpjqWkFbkeOG\nh9kP6g+HDDYEn2a/GKInnFOZ9ihCfj5nSdNzcG2XXshIjrVOJAtnFJt3eMZx\nej0ke7Eq/hCj8VgMI3SU2aiASLr2h/EojGutRGvZ5LbzG3JRzqf2A8g1AnPm\nUWy3XBR5g95Fn3sByw2Z2XGl258jWYsvazgrGAP6XAZu/YEcdjBSrlr6PJjo\nyPP8ookqQUn7jzh43NjD/3pxwYykWU/76bpOtQ5QI5QNbq5pA78BFEdEvCBV\nvxwOsBhRR4Yvw1/zZCsbF+lOddga4Z7IPFm1nd3wPy0OiV9uGisp/LZALXZh\nKHU8Ok/fyEdNg/RADdvUkI/GDYzuJTrYtd5br/nuF4Fl+9xsHBssl81UCg2K\nqt1er5UszRkmgJfvQG6tw4CN8sEVIaznArYcsyswp2rGbrBAaAcjBNLse+d/\n1/m1ii1kASZKEc8Td0w+7qL8iu4a9HDL4l6tVygEe2C16AySvE8U67fT/FXx\nFZGWYaaq7vA+otjVP4kG0NAQLg8Yg79rCcDQ898P3bXOq4ZGJ/4jBgfa0Mrd\n7cuBNLkIbW7q6XhDzrb96Jf5u7ElhqbfRigihkFwH1B8ih8WGhJDGlMBR37M\nnvHz\r\n=W7ws\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzqQ4Ba5CGaIlJQnhhl6Y9zmixzv2XUF/5KDbXyAQ/JQIgYo/61y8UdqSUX01mOYn+RIOjhfTp6cHPKv43kOzTFbs="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.a0793c96.0_1600794299050_0.7030442180995817"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.06998a3e.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.06998a3e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.06998a3e.0","@material/mwc-textfield":"0.19.0-canary.06998a3e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"decf3423597b14fccc721d29e0ec911320eee3a2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/decf3423597b14fccc721d29e0ec911320eee3a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/decf3423597b14fccc721d29e0ec911320eee3a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/decf3423597b14fccc721d29e0ec911320eee3a2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/decf3423597b14fccc721d29e0ec911320eee3a2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/decf3423597b14fccc721d29e0ec911320eee3a2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/decf3423597b14fccc721d29e0ec911320eee3a2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.06998a3e.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-mr3DEj5mLa7IjLGBffLX2QAQMqAosS6s7odf9LYfAERDPUbUV6aFt5rj9hAOLKJg3Lky9v+fehmwK+QP6VCDcg==","shasum":"7c98e9b7ac1af046fa8475c31a8c35da468e62d3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.06998a3e.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfakHFCRA9TVsSAnZWagAAsFkP/0yqdSvaPhZXKmYZfoMp\n+XqjQeFBcWj7r+ea2U+VVO8r430MyffpqlQplVKT3hYB5KUnXKS6naffEbv8\nM+K+7ugmB0AOp0RX6TymVgrMjF7Gw8TDX6JJmLnIKxU6Xrbfj/RnOq4UTzdS\nhwXaFhAu8NhidvRynqFwQFpzQTI7wtptXkAxqx7JBtGgamhKP83Z0Os3G6i2\n7SdFQA4lJxzK62hj98f2VfT+2HbJt6c9hJBsOLU0mrynfjGU+rrU1GUhvTu+\nwUmSHDQABHRI2GWSlBN28Q2J9dOmiD11hAe6O81ELlztloJ8COPo/dMRkT33\npc69v21E61RTtFbTI3j7M4uurH7EUeBDuy2ccvIYK5kclCAzjwehlSvYnSvR\n/RI+qZjmDFsJqgLm5sQqlOKi0MOuP741HkyQ6e916tYo2bOmeb/mK/knMQnj\npp6EhvPgdIrJGhe9dTwo3S3HrWLbg0YuAMaZ/M8dp04eFSue3gsuxp7sLxVv\nnQC0131QeNM7BLvEBCHt3tqZEuK6agbfNb3nbQhOJ0Irg/lYyG9e5LdxKJn/\nckghnnVryubdwHWPve/cumq/cXMSfPevuahpvKwBofx7YVnACuG5QqjLVVhW\nmJkkqcAeaI9lBsTGWXwe41ZWG+mF7GJKA177U1jeDI1tfJvgBuDWbOQFAWze\n5X7H\r\n=PxQ+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAAKwI6riBd+dSX9b42MibWwXSoFmlXvVa5hfmBdxk5AiBdnT9uzhuo7h9scE8plw9KcwcGxV3DBJ7DIhASfKHn6A=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.06998a3e.0_1600799172797_0.960263853644332"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.3484a90d.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.3484a90d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.3484a90d.0","@material/mwc-textfield":"0.19.0-canary.3484a90d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9a495a0451ae2f8e95b786a624153a7b57c4760e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a495a0451ae2f8e95b786a624153a7b57c4760e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a495a0451ae2f8e95b786a624153a7b57c4760e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a495a0451ae2f8e95b786a624153a7b57c4760e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a495a0451ae2f8e95b786a624153a7b57c4760e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a495a0451ae2f8e95b786a624153a7b57c4760e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a495a0451ae2f8e95b786a624153a7b57c4760e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.3484a90d.0","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.20.2/node@v10.22.0+x64 (linux)","dist":{"integrity":"sha512-OCsL65E8wX4N2BQYYD1BQgEicbKk4XY4Xf8hE+lJfHWukTyJNhpj/WBSxiq4kRnHmBAXd6Hy2yniqshQ3s7dfA==","shasum":"b5b30ae8f4740e9ea09430df32bfab78db4b3ea0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.3484a90d.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfanTyCRA9TVsSAnZWagAAcu0P/1h0Ndmo44g0UvjpJ2Ca\nNZyja/c3sRt+5+XOcD0E6tzj1eib8S7hflkTWqSWNdA3ZibZp4JUzw4yGV4c\nDc8i1jo5VKFFyiowmfd5kXKUzTQe5kS1UVHwvWK1ezjq9sjwMyDOX8iY/BbY\nXO2OyHMi19Sitxkat2aZnjkJjkFLY4v76UWJ8uWCRfXqbBF9K7u++Wg/S8/A\nm8jqNsqRfXiT1XihHSXeuLaB6hRtZDnSTMr0qSWJem9rvVN8UtoIupaZestS\nxkHKH7+jTLGp5mTMJK8tfNdzGfINhQXDiQrO60cMzwsiljbYxixm7gpiBGBL\n8X3il1OE90neQA6yOF4zEnI3fYLhCkh2hFU8X8Gej9qr/hBeE/vaDsuPIqgv\nLgsYZ+8qw0iCgTraI+hsDI2JIIg/GiBZGIiPCZeRowUe91k+HClqoj2O3yIi\nz6yHvgIff13mx+TIjmMle+dWvF7Mwh0eVMeUPF1gnCN/ygTh9W4QaU6UWj1D\nHJRuYS+e5G23euKfEYxB7KaZP4LCcFCFpiqb4taMlxQogSFyUr78xDveD70V\nIAsdgsWApKDOUtkVrT8UCH+otv2wMr0wbp8NL1GtAdw1UvghC0lLTW+30Kjk\nuMaKVDOOa2kId/5hlnwgPi3xNXsnQ01eGcGAAA1m9YP4JCE3JHcf5cDcqbWB\n9gR1\r\n=12jz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5cMwwdtbPuSN9faLA+r9GMQg4VZA8uMutzwo7KcSsOgIgHzIb+o50AaJxvWuVJk8Pa7am/0oDUXZJsMuM/zCf11s="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.3484a90d.0_1600812274408_0.40216348344983865"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.3f99af40.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.3f99af40.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.3f99af40.0","@material/mwc-textfield":"0.19.0-canary.3f99af40.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9c1a716646d54bc9aebac750a99d1fa752f60d9f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c1a716646d54bc9aebac750a99d1fa752f60d9f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c1a716646d54bc9aebac750a99d1fa752f60d9f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c1a716646d54bc9aebac750a99d1fa752f60d9f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c1a716646d54bc9aebac750a99d1fa752f60d9f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c1a716646d54bc9aebac750a99d1fa752f60d9f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9c1a716646d54bc9aebac750a99d1fa752f60d9f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.3f99af40.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-qYzFgloNCNV5/cNW6OwDCSADLEZxqQa24S+DBu9szThXp5eELUaVv/M0ISIMFOCEjd+PYQeWTGXvVnk99inK7w==","shasum":"2931694f1fae2dc48a3bf3399ffef40a2144340d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.3f99af40.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbSoSCRA9TVsSAnZWagAADyUP/1NPL1UE2UpLIRMKpu93\nL5iE/+kbo0C1audhcTHwwVs5AfRcJBjN11pa4lJKruO+MOeIM6WE7EbZLgzs\nnwWM1dLb3uuXkPo25ImZb/2WWeUhkc9RgNyZiKCuEeexr+uKcs4lGCsP+tWu\nAIBrB4gStQGaaLSy7eKmoROElY8ljoxB/M0lg93Pw+1jEBSGU2PoImUCDCO5\n/uv+PI9BGIb0gM8KerrIaWXmk81v3ROTY3eqTtdU9ZdGGuAYbvv3alakbljS\nBQ0eV5SMldZIKH+WwUb8V90JjavUPwxT57izqoVYqnwGvR4bC2tlRzDNIJpc\npZCCrMEo8Gy6oJrVBWDfIzKCfZFH6U2AG5fMtQyXHWZUNAIGCbDNOvXl1dzX\n1T2pnCR9PYClmBHCZpZJVIRGATwYNk8z5dr6BrLYLKd5J8tR7j0ZTuBzDoF9\n4l95/BMtP57SsO813C5AXDQIdW9VdGwtGlKeJVsqvFFxpdXAdyyPo1ig9zAj\nxI4fcXlzCAc8tsAVybmpTVrzx7jIy1MT+lOQ6Wqgs4JN0ZjZhoSmnAoGDTJJ\n5oNNCBwNfyGitTQlwf+W3CoOWXamN6wVqabAEAbOg3q88B4mWQY28TKZyKBD\nECUgpNkC4c0fCse+/IMBD+jIvju87RgO4/0VCLB7YJD/N+6UnbmwxG7gyAqa\nLNyO\r\n=aXIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWwdFsSNSl4phXBNAcPuQGWKZidx5iPs+N09eMFrr5VAIhAM0khiSHvdtv0VPx3w2WEE8SKZWcurO59T/EaNMzSRBP"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.3f99af40.0_1600989713920_0.9241224349125585"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.72aa1129.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.72aa1129.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.72aa1129.0","@material/mwc-textfield":"0.19.0-canary.72aa1129.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b0de5dacb779cde3abc9f66672e5a936030fe63f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0de5dacb779cde3abc9f66672e5a936030fe63f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0de5dacb779cde3abc9f66672e5a936030fe63f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0de5dacb779cde3abc9f66672e5a936030fe63f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0de5dacb779cde3abc9f66672e5a936030fe63f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0de5dacb779cde3abc9f66672e5a936030fe63f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0de5dacb779cde3abc9f66672e5a936030fe63f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.72aa1129.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-pFmlpqAkNlDP6CXE+Hhlo7ur4o/NkuT/JcfAlGZVHlGQ3JZWRxwO1QKRaebIzJteUz9E8X0z8lZKKZlqhSABJA==","shasum":"75afcd41e23c4b8db7581cc048e9277031152dca","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.72aa1129.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfblwhCRA9TVsSAnZWagAAN5EP/jyZbVKH2tdZxoPBHpUL\nfgZWjftSdTAn6/pmr4nHGw9hIQ8BaWlw4sfT8bb1NBJ4YsoPzyS/ZkmA4fSb\nbtrDocU7lMzxliu+mvu2u2Ekc5azkqU7uPV3emJxoM77/zzoWqgkDTRAW5+x\n7WBpkG+ZYwQ80IU9kQQ5gAiMsyJU7YkwQxWN3hDmscuyh6mV/xg66Hy6EdcF\nTJxIbANgWHJ6y1rk88Oz4okKoNft+D8DlQj54NayVoYcuYisMvZacuSGnC13\nZbvcLw+7IwJejnqLSpQIQWPiT2sMf7xWHk6VDKPUgvVHrUR5QnMnrXCzYhLf\nKSLWZxqfnOUSMoFBXOPRQK1A+oHoeBIRl5urY7Uq9RyZAd4mWgfloCmoyBoM\ne8179DLIts83Qi35zTUuRkw7C6CrkvPoz5cmj6n67qaUYSukQsEQ7gHhXamZ\nfNZYNo18n0LveId0M9MGvHGmaryiyE0TIQMnBXXQmmwJFth8w9Pf+G9uvzjO\nj4Vu1Q85xn0DCcNNohiY2K2iO2kjnNihpmxzN9tUyGF4N2tZDGFbX4V5kNyM\nh0zqkDXB6g9J0iER8KHVzRWCPjrl/prmrVx4yWkHqr0ndx2zw6JsWViNuEr1\nhndS2S2GUznDYzK1yq1OwWbAA9INa1Or5vUwm2/oNu+Fnk+d0Zk/y2u24eMQ\nz3tr\r\n=f/YA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFM6Mkkfo7ypNvOv+JZ9OpYVZttJS7QUc5jBOlHh3+tcAiEA41eLuBFTfPzyAB868N1dDbqelHyKbCWNBTVU/vZY5ls="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.72aa1129.0_1601068064692_0.5559241909765489"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.394fd3f6.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.394fd3f6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.394fd3f6.0","@material/mwc-textfield":"0.19.0-canary.394fd3f6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f7ed30422433da24768cee2e9ee84140331af4e4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f7ed30422433da24768cee2e9ee84140331af4e4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f7ed30422433da24768cee2e9ee84140331af4e4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f7ed30422433da24768cee2e9ee84140331af4e4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f7ed30422433da24768cee2e9ee84140331af4e4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f7ed30422433da24768cee2e9ee84140331af4e4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f7ed30422433da24768cee2e9ee84140331af4e4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.394fd3f6.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-/YynlIJNAzlbuNzdbvlcgSpeIHF08DCFTDSaG8YoMCNNZbVFHmeOXVHW2apZ7GwZszBpuOeNLkm8h9R9niqDPg==","shasum":"781fed31adb7d3d7234460816b7b30141f1a2bb7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.394fd3f6.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfce9rCRA9TVsSAnZWagAAGsoP/RczWVwl+AnGwAN9eR9W\n/eFbvpeUl9y/f5d8ELeyt+aRQTYg+X6Q7XYiSvURAkwiGoeKcaCqupKEKcYf\nr+VIJD7NOd5VTxXnStuYHo52zcIs6bz93ywNci6vhvlQoQ8QlzfhC3Y5Ovp5\nmUJGpX0mVE8aue0pX/D9Pw8Yvb9haiFOag+4237/nvmCsD8oJ+ytI6JhslYf\ngj/pV/EzxkBQ7fAao7YXZYjOrhad2wmuKmzUIn4eYSxMSBmJYLb2ly7/aRD8\nTJgglH9eu/U1v36780ky3N6kFSbtfhpgdfXT53Lzt0Iu8zDF2WcnrExF4NWI\nTQSmQE+0OeVyjtrMGCOLNzJaODM/HKwV6gvzeRWUVuVoTK/y8VwTe/jTH7Fg\nZy7D4Iu3FkVR2MTQlhwn8njH6pkHAOYyE9reaZryE3sY5OO8Ve7KWpJ3s41v\nSy0/CW8skCydeD1HN9oQskTeA3N7tqf3SFVBqrC5obtMzgPjnFdGCKA1CZkE\nHO6gmp456zoAUUkhCeLBlm/kR0h37z6hYT/ZqcdOZt7/FChyqwLx6wZjX2S5\nAWCYHljrApgTKqzJdiWC4K+XGZqEAmGFMWuKNU6f+EQrKenHPHac67uk+XRj\nZSTDNdFDTbvJAKyzd6MMlYZyVCJJiIPsO+joaYimM0vW+t1Evptw2UMaEExx\nSz7L\r\n=DVwf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6Uf0DgBRXbublYPuNSDA7AFsjZI3S6H2Zkqajqjm3YAIhAO4oxHMk33M8LGuLiwJfrQ+YNwq1kAiL7ZTUCAHGPFnL"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.394fd3f6.0_1601302379170_0.562866064763031"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.347110f1.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.347110f1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.347110f1.0","@material/mwc-textfield":"0.19.0-canary.347110f1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b51682018a9a68b95f2c2cf2ebd16682dc3f2e22","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b51682018a9a68b95f2c2cf2ebd16682dc3f2e22/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b51682018a9a68b95f2c2cf2ebd16682dc3f2e22/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b51682018a9a68b95f2c2cf2ebd16682dc3f2e22/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b51682018a9a68b95f2c2cf2ebd16682dc3f2e22/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b51682018a9a68b95f2c2cf2ebd16682dc3f2e22/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b51682018a9a68b95f2c2cf2ebd16682dc3f2e22/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.347110f1.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-OpgldskbmZdshQ5OIEmcQLTeLqk5GK2blLXttPfilvvF8z9F3ziq2UFaKRY6XWsG2YcWt758YNcFXOBDOQ6GfA==","shasum":"cbce35fde4ff86342ae2a4ca68dd9fedd69461c8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.347110f1.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfchRlCRA9TVsSAnZWagAADw8QAJHpTpPMLUjaUrvTVfqo\nwdeLkWl3ZpBQ4m/appX32AzmP9LrqdUNmQqj+C1ym6Ai9GuGIhmlaJa8+Inw\ntCHLmy0BD7v+JWhjpHn2A3IDA0dR045exeIC+KwDd8D29IxcwHMWl445MueZ\nJisxq+/4Yzu8NR/iyTgbix9Pi+1nxCKMBD3JGBirVFGp8NCUCy8laEj74MRH\nyGGUy43Qen/gnYSmOmtrc2PyRAKQNb5gbe65BKg09Y1jkj+tb1dLcqzNo8vH\n5CuaGBihYtj9rKfmfs+EDyOEeOVxk1P3wzV57n9WCsBwar8JQqGtAPGqPbZG\nVK83h8b5tlKg2mMtSJPuiKsyUNYN/+7zxo7qhs4zH/4y2Bv88E0V48lip8My\nr92N3cHr3x7skLBXkGRMTRuqx9S+bQ6lusFb0E3w1kFxHS8k1Uc30MFQrwSs\nfny/S5bmvbOcCPl+yQDCn+AtvY5oUb0/vZ68iRGiCXxGTXZ94S15sbDwuRsQ\ndwMPIWcRhZ3GfkdUf2KkH7EDDgjGlRIw+8P3g/EBAz8r0ElwSVJB20CBAW1g\nYWWeH4iVyorzOQ641ziAvkhCneCrBi9j8Q6gx8hFbol4Yiz1Rys27y0+WT3p\nOtMcBXrKYfRm/Intxf6T+j0cu6QwcSlJyksTmoaeZ5LrXwlbWpno4eooH1Zl\n+VM+\r\n=50E5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYyWjmhNyB1Y7Pri5SugyLOAYDnVYMOkgbeEQDCY+n7AiEA0NBJKrdncHHacEMemPUkY+dWo6sTXVFeGIIskt86mEA="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.347110f1.0_1601311844875_0.6349588728892959"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.5e330bb9.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.5e330bb9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.5e330bb9.0","@material/mwc-textfield":"0.19.0-canary.5e330bb9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"edd7d263d4d4dfba81c2b086b08b2be10b533b2b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edd7d263d4d4dfba81c2b086b08b2be10b533b2b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edd7d263d4d4dfba81c2b086b08b2be10b533b2b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edd7d263d4d4dfba81c2b086b08b2be10b533b2b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edd7d263d4d4dfba81c2b086b08b2be10b533b2b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edd7d263d4d4dfba81c2b086b08b2be10b533b2b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edd7d263d4d4dfba81c2b086b08b2be10b533b2b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.5e330bb9.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-PNdnlGdYh3DOhqIc24vIb8LRektAf9hAvvmuLUnFLRh/IzOkzFYf3jtTgkebj5W1HLN1BokGTty4kVCmgb2K+g==","shasum":"ee488b854b99142c94c286c4f6c04234ff84feb9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.5e330bb9.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdQBBCRA9TVsSAnZWagAAMYEQAJ0u7PDNCEUex0FcoMMG\na+Wztp2A4Sm8j9J0iuMl/VjaT5aQ+LxVd0fKbF8Bir7vaw7FbDkv+aMctb8Q\nD21SrXbkCE0fETDjNQ/U9hRXkkNyWaZf0OemDISNFYxBRg204r2ueBzg4nTn\nBNb8bqkw9S4RyXeNLUZ0lK47b4EMW+XXoFXSa8j19NDH84GbY8+Ba1VzsG3R\nNPPTltK2SFZcDssZgNj30a9CgCVoysL6pxJCZRDf4Lr036o5sXeg4U4Lp9zf\n3wm3JwNk11xEwNhHHDyBU35C/xI/WXSP2f2ungLLMBtoxT5d+hfXamzqfTZ9\nWW2Dj48NJuXA/RE8tSeb4B9SpNxrR3xJIcW4OIC1fnFldxkQX4fC+0b24W0f\nX2gH+mPdvbrYpxilnq6BF3nF7vnUWHwhNMSmkoB6qH/Jv95ZSUzMSWVv1C3M\nOJc9ZmMq6zSSrakv3YTTiiOXtsSMi5yCMTKaK+bPmlc+0bl+1Ak0YPqXCygu\nYc2czDscbhvQZdPpBehJ1tJ+5q8qfC4gL5rOEJ1mhwi1c+0YrGum7kLvka25\ngr6T6qJuMYikDXCh1Q91tOrOLkE8v4zuUiI6Kvv6BGhze5vv3ClGr3+tOpWZ\nsA5PCYQIut0OcdRg2OyiKkwdtC1FuZqhVDuhgbxOtFKRIT8yKluf+5gPqK5J\nuhlZ\r\n=pBav\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMRBeXtaLkyhnIL99HIkCnp4vg5qEYmFGtQ/SegzT3vwIgfCpvBSS0l1kaSpHdpdVI/fUYH6O055CZnu9iEoesSNY="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.5e330bb9.0_1601503296756_0.5064908669573855"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.30b9e3a9.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.30b9e3a9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.30b9e3a9.0","@material/mwc-textfield":"0.19.0-canary.30b9e3a9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dbc47f1a0c4601e30ed5a9eb0fc9f9b56564e1c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.30b9e3a9.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-tDEDcUtpoteOzRD7eDnEpXtfK3HqUPmA8M2oZEhTtf1uN5ehSZG1IO0KJq9Sd5Dx5rXeXJ83sSpcZ21XpwJxHA==","shasum":"e22550ecec08978fb078839de502fc5ae05e6238","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.30b9e3a9.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdQjtCRA9TVsSAnZWagAAMnkP/0BXV16ZcO2Ya8k5JBvf\n9GoteS76sZpBSP8GmuCIJ501U4bFEg3Yuv7+LB7qcdIb4FgheY9fIaPC3Yds\n7Dsff5Ik/mk5699Wf0E8XkSNeRYfNMwEGwmx3evNjothViipcgJR+RvOoSUJ\n3y1NENLnIuWM8tfvdIIVvTKQXj9SXqBq6A+6KAjnSemGnZjG+0v4Wd5pOOZ9\nx5/k/hLxeh7AGfMBSD7WrGFjxJIJAh6bE28Y0CcidQB1Diq7WN9dw06MffVC\nXvxAou4ijAe4yAPGspWPD1YARA10gLRdR3yK0VKrnMXlzOKQ2J77M9KwFrSZ\nm+0rfTJ0L9NjtvEHIxFhed3jpCyFzeFqBPibaBO1SGc4/D2lUy/N3/a/bA7f\nTYpn6glFiPFAHSWHSrTOQVtxqD7quxJEB2HDHbntWKas+f0o8I/HvvdUZ6SV\nZFSVqr8/c+9ilsMWHtam4YHfnaUU1zxKAcD0SGpG1/c8P7CX9SAzESQX0yAV\ncq9MlaUuLOE8ssQKdt+X0TADHdPfqHxx3/QarewoLOLp/H4Rb9QA2CGnPyJU\nUxhksSi6v7rQnpAvNxeIqgEZT4BrEeDPZa9z7T/lChbGjvWI27SSjpYUlLxU\nCX98XMf+lMBKmCMmEWTl58CtgQRgIRwaF1ZVv+7z1E6V8RVU3F8E7LLQEuD3\nCfCk\r\n=tPqU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGq1cpk8hZXhlAuzEpKLL4syLY2LiJ5lu7hghq0bXNI6AiBkiZwD8notvZ8iE9QLfcSNPCaCYuStK3BdYt211aSVPQ=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.30b9e3a9.0_1601505517420_0.6540346462107844"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.7bb04b9a.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.7bb04b9a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.7bb04b9a.0","@material/mwc-textfield":"0.19.0-canary.7bb04b9a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f4137a832374dd43b862ca8a4db665a59c1a70f7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f4137a832374dd43b862ca8a4db665a59c1a70f7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f4137a832374dd43b862ca8a4db665a59c1a70f7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f4137a832374dd43b862ca8a4db665a59c1a70f7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f4137a832374dd43b862ca8a4db665a59c1a70f7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f4137a832374dd43b862ca8a4db665a59c1a70f7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f4137a832374dd43b862ca8a4db665a59c1a70f7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.7bb04b9a.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-G5XiMH0p2LeWQ9aS/EftKV0vqcN1y5Sv3ifVe1qNJdnSnREPeCUKk3iG0UbSL965g/6IoRVpTiSCZhO/Ua+n0w==","shasum":"67d999bb647fb57b9190745d17bbd95b92bb2c03","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.7bb04b9a.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdmT0CRA9TVsSAnZWagAAblwP/i4n2SDmm5QDeJecAPQ5\npqP9s/8UB2JNejK6MnNyHSAxdnQL5U5+Ljf7vOUIS3q0y5UnqUbw0wiZJVOi\nRXQ+JYwlBrV3tWEU4ZwBejklxwpKzCcPYzptei8KCqvmInjG+JDXrP6L/6VX\nqwhGIt/WWAxoXCfoIFRs/OVYXXjecM8EauykrY221XzsfREQ0tibiuy4N4bU\nnPRUDQpOIMuuIw/Nz7iHl38/IlsVrgHx9tL6ypltNYw6opv4W4sfSsTJoG7u\n8VpX9V6nV8Z6VykWtxbON35+QCCa3GflQXfILgz3qBhyS6SAf4IlLI1CmLYl\nHf68bagKQtUb6yhq+uBCdVrntfqVm2ZRA01sDtIx4OcwKI8f1Q22ekbZft38\nT3CKxra+iYVI9crBamXMxTs8UJ9tgRxYWFhb5PiCiy1wQ92i/dnd09NlcGtk\nFHetFUZjpXxdRw6gtFHwGmqwxO7gKPXhjL5gQmD9mIUieMTYN/jr8o2BqAcV\ncaQ6DapLYdYsP4wER49TSGDi2EGylddXxmzEVToKAGrQM1Grsr1FKewvBUdC\nIv7DLU141KC4gF7eFiekpu6oc4ShDfYfzizyXWvcKPRKtVpSp9coala4TXHH\nn0AAzL4FnHjTggM5k5ex+3c8HR306zEXdRLoffBDzV5N8coFh1gmBZto0ib/\nPgPX\r\n=jutc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD91zAXjc/M1q53mxtQynCronWy6Sz68SD6G9ku+L/mhgIgW1NPiYhiTyH1a0P12uemc+WNZrNoMrTUEhJcFstapek="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.7bb04b9a.0_1601594611751_0.6057201736084596"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.615d861d.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.615d861d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.615d861d.0","@material/mwc-textfield":"0.19.0-canary.615d861d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"31f7a82757513b3944c605422e6c70eef13bbd54","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31f7a82757513b3944c605422e6c70eef13bbd54/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31f7a82757513b3944c605422e6c70eef13bbd54/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31f7a82757513b3944c605422e6c70eef13bbd54/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31f7a82757513b3944c605422e6c70eef13bbd54/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31f7a82757513b3944c605422e6c70eef13bbd54/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31f7a82757513b3944c605422e6c70eef13bbd54/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.615d861d.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-j+IvvK8U8jjzpzkFUZw94kR85OrD6px09PD0Gf2/gTJNRPCGgCsgiKJPnU1qx7oh2EEeB//mNDzqKWtM0pY5zQ==","shasum":"ecd4255b3b7e02358bc4faf41120bb40971a35b2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.615d861d.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdoN6CRA9TVsSAnZWagAAUqIP/AqRYYBro7GWsl1SCe7a\noOFy/f1LSpVz7vldc4hM3ryw3yUbJs4teifLCkVrtzy6DnMSsIGf/5xB2PXF\n0/VULl4NYIJonF1c9ZjFG7r7H75B6xoOmT8QhLcoc5SbtmB0nNiJTwo8aJwO\nIQjqcxw82hUW9X4erDtpJcajQw0BG123kJ+tI3Iw2kcn/GNIZq5cJ1iJFs4y\nftNcc2ejNvqNspwoOYySQuAYoYKOhTG7BP0giZyEe9Wr2YNYdwQNSWoWHT1Y\nyyHhTM3RTko5rW+aW5imBdx31oZPkAFDU62V9k8EavpoHB4817pjZ1n+vAiH\nJvAGNhEgN0g5RutjjC5UGd+rdt9wXdChibFxsJgQWp6qQw4zcIaXYZRTxJ4x\n8zh1DDFL+kYXd/iN1MK++EgBw8+OjCVz8qUVtU6EG+lJO67d+YycR0uj8FgL\n+OwPHUY8XYzOEFFAZFmYhcsWxcOs/mXOPfZx1NShUIutjShCb/RsQbm+PlRQ\nGSssRR7aiWFWFoJfP51bIAfDApvXsQTYeI7RXmdgI+CPG26NZeZkf7tx3hgq\n47bAAi50NumTS80K3Vb2Oc1ryIZuFlOUNCM3fxk9DEokGQ5k6xaoze727bT6\nEAffR1DBqmgWUfOwZGe+Kqln80/axl2gME9kUxUPA4eB3FybMzKhZNLMERmI\ngMpO\r\n=Q548\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZZ+YJpJ1nH3sRw4GF8AYdqcOrwolY7lmeMgzw3h6s9QIgYVla8HvPnp5er4TOWcBq4HzZxw8vgwZvdRdOhhfrQSI="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.615d861d.0_1601602426447_0.41888613526137"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.af110e86.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.af110e86.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.af110e86.0","@material/mwc-textfield":"0.19.0-canary.af110e86.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ec4508e75df333e18bfc60188de82eb9e90a6d01","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec4508e75df333e18bfc60188de82eb9e90a6d01/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec4508e75df333e18bfc60188de82eb9e90a6d01/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec4508e75df333e18bfc60188de82eb9e90a6d01/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec4508e75df333e18bfc60188de82eb9e90a6d01/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec4508e75df333e18bfc60188de82eb9e90a6d01/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec4508e75df333e18bfc60188de82eb9e90a6d01/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.af110e86.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-Hx5hIbJqTuVNMBLdYmhn3/BjVlpO3uRWfvUA6f0vG+P+pde55PYOLqQ2Ca18febHv35upxIpsUZk6DJS4veXKQ==","shasum":"a027be181adaf1d6b4dc5cda88497eee54238251","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.af110e86.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd7y+CRA9TVsSAnZWagAA1RYQAIA36V11ftgIJRbvVrMi\ntNCOKn6reQB+NV+b/+SWbV9gxPFGMDwjfYL/cfwmB0rAZFMauxhhHgjer60B\n4AF1xlM8HxsETW+nbTapmrICnO1hy0hyEVHdynReaSQdKSLRkShnGWI5LKjE\n0eyKcykaNM6wc7WER4iMU+SJLBpDOyvE7NR6kQ51eWaZMy3+/cnyQsz7FJAN\npJ6oBLmYUPcQDzeTXU0mVfEWDAEXBzqxAJ8TzncFnDJTe0hhqDzTxVM3OIV5\nstLz7dRtj0EtqeS62DyDKl/Uz6HU23KAz3CP9ZWXhY+9BU5OGOvtTNRzQHZ3\n61m57k9ZiQZP8rC9d0OdbYl3Lt2/r+JcMJeis2DV1OJ8gfB6h/xRbsPr1v26\n83deaYt8IKDwsY1dcbDgvh+diGFQHo4578d+VkiGpvVJSOBJAwj0HzVyDX++\nTBnIDcg7QraWUZCsiItrX0pd/lpnSfF9emfUCTui7sN/M86G/7WdCNCmbFFs\nAyODQQuVuLglnJCGVucfozAXLTSmWV5Z37FrT+dScmbLaDAEsXa7mqKdVKFr\n6gml2m78eq9Ut8ZArl1kdQpzzRd25O24kYtuEXVJyMNUVcBgNuhjow/roHMF\nuWpzr09mlRFe6wAbVLBUtdFU9neOoZzvAkx6yYDS9YIXSR8Jcf8QX5crD+qM\nlQMx\r\n=Of5g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/IqW50HZn8eldc+ZUx0hM8m9Kz8xOc9UNrq9w5mHhKAiByLSJ3o5vY82kF3p6EBOPmFjF3Ly0nMamVvAUR2ZAr+A=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.af110e86.0_1601682622261_0.32946431976572543"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.89d27ca5.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.89d27ca5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.89d27ca5.0","@material/mwc-textfield":"0.19.0-canary.89d27ca5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"fbe5db689dbf4abb9f299c85581f7fb95f80ceae","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbe5db689dbf4abb9f299c85581f7fb95f80ceae/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbe5db689dbf4abb9f299c85581f7fb95f80ceae/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbe5db689dbf4abb9f299c85581f7fb95f80ceae/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbe5db689dbf4abb9f299c85581f7fb95f80ceae/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbe5db689dbf4abb9f299c85581f7fb95f80ceae/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbe5db689dbf4abb9f299c85581f7fb95f80ceae/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.89d27ca5.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-vzIbxkROPz9gCPnm2UYyQ/fKsl7ol7AzYJDTKcZHVcuX3oXekiR0YnTMSi12COyCxiwHbi88aeF0hR7jUZ0SpQ==","shasum":"5f548fe35f63a8e923a7e785e3a1a563148b4792","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.89d27ca5.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe8f/CRA9TVsSAnZWagAAUOcP/26mipnhlqApESR1nWIP\noAZ4k/A/Sv4hXN/hqLbWhH0hIqPChW96SpeGa3mi0KY5YU/UzprfZiXnmbiC\nwHN69yPi47SiEx5f8QLRwEA9WJUlXFxZXTTZTIvu6hFb2UdiH8vp4bpQi/V4\nCDiYJV+UybFnrYTM+74feY0d4m/Jz/BKEm26P7LGn0kFVLVkDOvFh8O9X4Ye\n+RF10khImDwrkPZvqO9oyqxeapBy/3t/7b+OGXJQbPdPDOz6fKikAC1Ev0PZ\nR2UZuCkBTefaRYH+ZbH6Vefvwha6JYFHnXV8M4IpQqjPv0yzyRRJr9wvimQu\n6iiQTvpYjSQPJRpKdmmZUZubXOOKvY8w0a9SZKKrPiqdqbEGR+ZIx0kGuIhz\n3T26RNwx5rp62rIR4oiIknuVASyvNKoFfwIUw4Snv9eZ/a2E3F2Pon3Zsjyg\njFJXhBQ4MndwoHKDCT++c1IDo+N+HS4yLTLhX9SSUxCilAKIf+Uu2lzrD4Eh\nKCpNCDKmHeX9ZNHIsnJiNWKG3PF3nwUaPKm8dJgsDgMfF8v6fuBdf4/nDKF5\nDLjwQOByFjnhEAgeK5g9G7LWkLfpu5bP0pBvJfcmeTXXrI8ZJg3UFKeo5MgA\nMB/GIkEwpCov+sq8wazmZMHc2ebeF3DdbStGptvvzfALldyezU3u2OsGdGf5\nehs2\r\n=jK10\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoI+HXFXJLh4kCzgaefnhwsFdIcSPguZ38W+yu/1wnjAIgMI/Wv6nAhShznPBSnaFRxCFgLqzpbUeJVDG6QFh6jHo="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.89d27ca5.0_1601947647017_0.731945273310276"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.9ef2e7c2.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.9ef2e7c2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.9ef2e7c2.0","@material/mwc-textfield":"0.19.0-canary.9ef2e7c2.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"05ef0de8978ff84725428953056488d768d115b6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05ef0de8978ff84725428953056488d768d115b6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05ef0de8978ff84725428953056488d768d115b6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05ef0de8978ff84725428953056488d768d115b6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05ef0de8978ff84725428953056488d768d115b6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05ef0de8978ff84725428953056488d768d115b6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05ef0de8978ff84725428953056488d768d115b6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.9ef2e7c2.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-YmggiLnE3J75Np7772Z/217W4fyLfUbt5HPXrVWSCo44xgc/rEJadpOpHric7i4PmWA9GVY9ULxg6Q0F25gLzA==","shasum":"b400b6c57dcd1939c10b9bbf13d1f963c7d6568f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.9ef2e7c2.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffQhzCRA9TVsSAnZWagAAjiwP/Rcx7QFiriN2lyzBl3lC\nkf3jCqhIa8NlDpEzyQknBV+HNl09lSeBL3OfmRwciuzUZrjD/odHnF+tkHj6\nFzdOcWUI0JFR1/DWfM5zhqUhp01wgvviNkfNOjSX0eFsw2ZZxqMzac2UtP23\nxeyZEy5hCfWt5uUNSsD6bp9cn729OjJh5UeNIXcOnXnSPQ3Rb/bIRLreGNCn\nI4CbGxYWhvYDXDkEb6Z8x1d0y7TXGRa+qDzrzMi3KgPACZ/W1mlWVuEjVfbl\nynN1JbjNRBf0xbe2/tRUTkPo6admrpRQRvVaz44jFagLzSeRgb4drZ/bNE7l\ngXiLkiAYYi0UTgNqMDa51BqweM1X12k6GCXH9ek3qUYxtwaUOhzyMpKs0XiH\nFP5Eg9y13k1nkvUfeu05fSgfOqT6Vl++GG2Iywa/9PY09f2vFhd6ebdEravd\nB4oMPota/YqfaLIDMAodjmj/H3LBpcShSAv3kH+DJ10O0I8Ynr4csc7XUil0\nCNFbxZpzi50MKiT053IpwuJRbpqeGATG5QMcdn4VGWS5FM1T+orTxIVcCtwx\nH+qNbF+BRHvI5y1OirVwHIZSBpnxnja0EKkO7/jEvCxUmYCg/0SmPw9UHJVe\nccuG8K0fIe/t4LD4yO5qYMtnrJMQpSef+fr8aRcf0jgIgRlMyoLNdwRO8iNd\nOaE6\r\n=38hV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVmA9OEfS472woheI9VU5Lo9fW1JQxpWCF5ctWXMsxJAiEA8MlBGpljepQhu6f6J8HODycOVa9ZSTSkXuXcPhoQPlo="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.9ef2e7c2.0_1602029682867_0.04280251567829718"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0-canary.96c8bdc1.0":{"name":"@material/mwc-textarea","version":"0.19.0-canary.96c8bdc1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.19.0-canary.96c8bdc1.0","@material/mwc-textfield":"0.19.0-canary.96c8bdc1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"1107015eb30f3673820101dee6e42cd62841721c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1107015eb30f3673820101dee6e42cd62841721c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1107015eb30f3673820101dee6e42cd62841721c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1107015eb30f3673820101dee6e42cd62841721c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1107015eb30f3673820101dee6e42cd62841721c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1107015eb30f3673820101dee6e42cd62841721c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1107015eb30f3673820101dee6e42cd62841721c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0-canary.96c8bdc1.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-A/kr1LsT1FYgIVX5F+iuwm7Cwu8LTrlLvukN/GydSCBifPiqYgBAVEXeVYnQnkkU95EObGAX+9/XajJl+ccVBQ==","shasum":"543c39ef191f1a156968cf4d2dc3d7290931182c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0-canary.96c8bdc1.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffiAnCRA9TVsSAnZWagAA9cwP/3jNiywER5h5C3us5xVy\n1tkfZV8Mkf/Cqcwt1yEY2BB9ter62BRF+lCZhx+7kDJo9sp9U0F4NyXdHsWQ\nlb9u7cI1g8pF0ZAB00N+uJj7LgMa+pSmIs5AAR5ISVnxjs0LyaxZACGsKaSr\ncsxzi7t5KpelY9agvmmHmhyAGHoUuSCRRstsFQjvsoVUhE8BJgx5VqYboW4h\nHvrzwOT7aTxlDS8EVr3HWdBUnT548SRyBvswThYCLDpcZSB5NCeWPi31ZvF6\nzUiLypd02UoVKtlUCMZORwGe4jVtHD9L77D/9b7u6W/e8xJeTdEf6JcGRwUT\nsHq66yZXvsWTV3RmyNbMb3zP90NlFxA3NzrQQdENADc5PYBehtFEUYmiV+jn\n2DyQ1sRxXE+Fp56g/MWqyo5l2f3psk03DdncOunBPp0LNapEw9TdpwfaDjgn\nUQK1f6jojYZ41kteCSjGws5PNzG+9UUcoEyjn0k4Cmc1EEJP4+Fgeu5O9hPx\nUiOHfY9TdOJNG+91fSq85TytNwbkM9JiIrZTxp7y0vzZmcGk98WlSNbKgJ31\n4ToCfqLwPBf9PJy+35I8xOEWSSddLFVmYTOYpmpe/nl6Y9c3dj5gcJO8isNv\nu0sfOqVjw/VFd+szCYAaZ43drJUNNyGTBKBo2iHxZbg2I2J/SzsHIgbj7oyR\nD+wL\r\n=8dAi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCADXEUW431DNHMe4a5Cb9rd+V3uUpHOvweiDkYmvP/nwIgWAmdXdsffxVxrjAenUcczd560pbp8DxNg3ys3PYOHU8="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0-canary.96c8bdc1.0_1602101286652_0.9722265115238184"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.6c21f034.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.6c21f034.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.6c21f034.0","@material/mwc-textfield":"0.20.0-canary.6c21f034.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"367e1d2c78522b5c85dbc2693548d691c8b84d59","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/367e1d2c78522b5c85dbc2693548d691c8b84d59/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/367e1d2c78522b5c85dbc2693548d691c8b84d59/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/367e1d2c78522b5c85dbc2693548d691c8b84d59/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/367e1d2c78522b5c85dbc2693548d691c8b84d59/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/367e1d2c78522b5c85dbc2693548d691c8b84d59/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/367e1d2c78522b5c85dbc2693548d691c8b84d59/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.6c21f034.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-wPfFM9E057bxQZjrLUo+jMzBzG2FwN4H0ye1lysAYSuFmcqsPZyEH2kxBnoMTNe6Ajo9SJy9X9y1Jz4D9/Hg7g==","shasum":"a407199072dc48548bb2e14f87d66b8c7e1233fb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.6c21f034.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffkGgCRA9TVsSAnZWagAAux0QAJhc7X8DOQnt6fjTwtgd\nzAnhC57COe9cyE1VSbVwvWOY74O0ycvD/BiE+OjJvF8W39v0izHq3urutx2R\nzcmlTJUhOmp7Et46096UjAozW3wF9yKSQBn8C5SWCpbdF1xUj4pVDN+afyyc\nm03ZIh0LjtCOBowjGTHbLhuge+aar0RZXJflI/TwjM0sPCodCTYdTXi6xMTr\nF6ZVo8AEHbvOxjTpdKWA4KvfyhgAgbRcDD4J3OAtadUZQSVwbIKmdkDiYwo/\n9sbHAu1Cur7oK5vPgRSS8iAUDsQTRCfvFRHngLpr0MuyZ/yYNvDyItklK9Gg\n+ZkbpdiBJmbrI/6rYTkYk/24DW1d8ZqbdAAF3IxzJmYAC+lOwIt8hhXbiMuN\ntUD29NfiRwgULPyXUncNShu2ij7FGIJypHji/utmTuX/jldLM9341uK3yt9N\naUPYRovYFozkxjAHyrvOOn1Lf0HZMOYU0Dwt2HAVmnMClmgc5mvEhXfVzku2\nFSUludOpwQe6crM6/uDv+2dHmjO3O6vxhSXRSIHm4Q1PUEFVKatqUazSbOs1\nErvOLWR/eR6Xlx1H36eJcVzBIagkkoIFMnjBHCzF/ZvmqvFjdXI2PA2fqpTC\ncpqkbiVMkH4d9CT3ibU2NLS59b58lwma3SbQ9XxBuPySZyYKjJurG+acIeiL\n8W/8\r\n=tXDt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5GfgI0GvLexwaUJgVWHdgHNcg8tqGuw8lkZtCfRKzeAiA0KEyRSrZhFSWup1XbpEgbREWRrN/MwaURAJqieLVVAA=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.6c21f034.0_1602109855668_0.6931989142121171"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.0":{"name":"@material/mwc-textarea","version":"0.19.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.19.0","@material/mwc-textfield":"^0.19.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6c21f03466ddd0381aa030eeb2fd8f9615a3ed73","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.0","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-zSf8OPazJkOM9hrA/Svu9916Frze6V4xx2lxZmtMJYgMGXW0xZVGxDJmlgqrql2/8ulTuMOHZcQYr5YOqHuLJA==","shasum":"6209ffc8fb1de565b9d97858de29eb84d388b338","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.0.tgz","fileCount":13,"unpackedSize":42390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffkI/CRA9TVsSAnZWagAAj9UQAKNZhObrzw2v1Oh18hRS\nd37/KzA+8hADhZs04ss9NGxG7k+EfBRRV60U/gBGpU7oKdlDqBO77K6kVD/U\nhMCRaKKnKs47WbaxOGtkQtXCLkDsKyyiwHkQLzoU/wR4VjJk8NudFyrjFBFP\n2Zg0uWD6rldmy3CzMtzAI6ZqNw6cimiUUVo4XWIMjpFs3jmrYgrDksfH6U15\nY8s4XPT6+g3SyzktKYdpGXN7O8tBQIi1VJozJfVDNo/A4pNXAlXVW69bdxNx\nf3Nc8gFSgbI3uklmjzWjZreuCBHWE/TJ4RZLyuep7jxmpk0LystNEtvTw8/w\nmmVyaUcsuHk777t+pxuQQxq+ChBHTN1O1YyiS3L1IXJEGgP3QbZx6uBa6ncc\nGOjjZHcxPmQ5OZgh6fLjJeLRPDrCJZaSG1GFFbU1qbQIlDykNL3vgj/THU5L\nnUzx9ltcGRsYtJmT7RZ29gRz35PbMgpXKgVCbJiTMJto8KYsbGYNLqBE0lnj\n8oY8I63Fr0Zx7izokd9cDJwe3pD//WhGxaJJoQhHqWrzbTg1e4/s49VvDvg8\ndtfcSKSXgDKbf/9oeJme2Yv4fUgG3omv4oz3ek+Jt8PMEzOhrY7n1iO07QJc\nf+JZt1DHCJWuPD4qL3RHBup+7piGq+KP/maeuVf7+bCHXBahLI2cnmdV0Bbz\nKqEl\r\n=w+ro\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/BmhKZpTik4Pu/QCxMuNrfLGtP9hk2LkeCEYyGQV3ogIgeTNPE6yZ6AQ8mwdvPBDCcAWwoO3RGfYzej/EX8dPFCs="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.0_1602110014934_0.7530163327866382"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.1f026aaa.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.1f026aaa.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.1f026aaa.0","@material/mwc-textfield":"0.20.0-canary.1f026aaa.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"3082455321637675854584edbbfeafa95d95dd1c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3082455321637675854584edbbfeafa95d95dd1c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3082455321637675854584edbbfeafa95d95dd1c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3082455321637675854584edbbfeafa95d95dd1c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3082455321637675854584edbbfeafa95d95dd1c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3082455321637675854584edbbfeafa95d95dd1c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3082455321637675854584edbbfeafa95d95dd1c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.1f026aaa.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-sYIpRNOHdf20Gex53qcAYtcv5jMjT0zd/XfrDbjPsX3+TACQW7OSaM2/7mm4fOnWUXzPmZBv07hJJcwSi9yMGA==","shasum":"f0347d9277e839478ad3d98812c9495578b0f8ef","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.1f026aaa.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff5iKCRA9TVsSAnZWagAAuooP/jEh/u64g70LMm4uWlAh\nsGmfvPKkTDdVMpC6Qgi1yGssjjvsvdcJDSWDF32dV+jncDm0P50lvqyq8OQq\npYd+IHcKrYc9hGoOR8S80R1Q6J0Ko31kSij/NdJl6XGQBWktxkQEK20YmScl\npPYiOvqr+PWqhaBDEwbkWsJ/SUil/NJf9i3UlKNkhnuQIKuB1tIN03igKDkg\nAskdIo11jwKqlSob6to+zdyEgZvk3n/eu7maY8gctOUUym2V3aK39Of+b4P1\nGYpwAT8gL3g9im3RWXw7ikQxCGQJFR5qIVSE8bJDne465svEeTdWB47UKSXK\nxOgD+dpC1GQ3tbHkAltI1Mb8ycvI1HDVi9Flsj/e98YYi1Mtpv9y04x+QW77\n1T6hNcKKTZiLOhjwsqFjqwtkd0iD9XyP9ihfuBgm2+mgsspLLqD9esfabF21\nXsVk2nnnEUt3VXvg2VZhk4ojMLKLsE7QhdUmA3/4uEsB9i+/+7/n62NCxDCG\nYBgNRrY4ihY0tJTX8egq/XOJu++fZCKZ4gAJkSHltCxc3d2Ln9jfYOJkuIOv\n1WlLSH1rAJ7cqbkaJhwDI19RecXfjQMq4BN0Zr6cjmaUZmHHZgZg3Ssq4FvD\np2XXgSZ3LqIMHflL9KktOY/IBlKkFmVo+jycrCzeQz79+sI+n0wBqDhcmRf6\nS0+g\r\n=tafw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQCu6ddWaR7RnftAdl9z1kntoln033PgBPSLp07f6M6E6wIfPf4ZGurXW/FBkMXs5tRBBBBA440+8d0OJVPOMBTfSQ=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.1f026aaa.0_1602197642223_0.2021621974340746"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.19.1":{"name":"@material/mwc-textarea","version":"0.19.1","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.19.1","@material/mwc-textfield":"^0.19.1","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"5f6894b191aacdb7da61e0e9f91bae96169fb190","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.19.1","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-pzvNtZ+jX3Y2bnWPUraYtJr9HnBXrUOiECC6KqNsrNZGCP0igXnVZPsS0SX1d44RdJsb9G1xXs9vhbZJUIPTlQ==","shasum":"07bce3e04316712f086b213fb07c398b30c55e49","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.19.1.tgz","fileCount":13,"unpackedSize":42390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff5tfCRA9TVsSAnZWagAAw8sP/2rOu+K7M+y0NrAk39J7\nJtLIXTkK4mJpvRY16s4E73JG3Kjt5OJzZCeF9fsIxmFI3RFW6BUgh669k+Cu\nzPIHpI7bXQszwYKtmvJEpEjDU+IjLcBnn2xG75KJhl3DZ/kMpUGLF15AkU1o\nC5t0myzJ5ekYwctuziXRciWpRvrhJP2UpXRmdhx+3dMzmg9zhNLWVsHElSLC\nzyDke29/cir410doLVi3l0MftgomdJfiSUiVD4V8sWzqicG7JqOps6J4ldqd\nxwjdVp4QN8lMg1zbWJ6JKsJuIzbqQLRw0obFPwEAExwXRbPQrwkv+TIjh4zJ\n0kxJrUby+LU5JunxtED78pkt5OfwbsSzoo0uUaV1Bh4X/nJcgdwdJqIEM+/K\nL6b1tJx1IZEtpsO2Jp2lfwJeYXUsWtS3m+6p8It9CxTGW5Dtihov/Vi5eFJ8\nUSFroXf7P4Nj8K+g/CoUTPSARt23v+5EUctLsR//39oNp2GTTFN0L4Q8muoQ\nBTSrSRphwZJkC8gqfT67U/ewCwT2lslAMGOTkyxv3St8FwdJp8OepW6UANLl\n6OYDAtmYOekYKHfK1Eo9CM5XK/OIfaYu/l3DyNn2uSyQ62TF3MZ+tAYhaFfh\nz98F+UGIleU0WRPi6TGrMpAmybJ/MjtDf2yCK14TUQYF25UmLHtSPXOaouA6\naHNJ\r\n=gV3h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA9wMJzgysyVKuISJ9XVjTaEFKy1FO9g6fbuhhQ8KcsjAiBmf50QqLqvqVLE6jL6ozdFsMQYNHHhMKJ6DT2fITlCAA=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.19.1_1602198366962_0.9376490211173696"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.5f6894b1.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.5f6894b1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.5f6894b1.0","@material/mwc-textfield":"0.20.0-canary.5f6894b1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"63718fb08d28bef1d0a9044bb2ae8026b49541a6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/63718fb08d28bef1d0a9044bb2ae8026b49541a6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/63718fb08d28bef1d0a9044bb2ae8026b49541a6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/63718fb08d28bef1d0a9044bb2ae8026b49541a6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/63718fb08d28bef1d0a9044bb2ae8026b49541a6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/63718fb08d28bef1d0a9044bb2ae8026b49541a6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/63718fb08d28bef1d0a9044bb2ae8026b49541a6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.5f6894b1.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-cv0p+L/beH4NkilLhmWmkJ0N82aw65tLYwxMV0OQ68n9CRqHvJBK3e+qY9W/hipx1CYaQbLIPqeLZMcfR4aKKw==","shasum":"9f86f1e852624a7f9be03a8dcbed92fc452c6ebd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.5f6894b1.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff5u6CRA9TVsSAnZWagAAjNQQAID18I0xHkl1IgqU/u1h\nRVDdgJB7so1rHORsoJivJqnhZ95ak2yUhFSHeFbRrG8itHnSgLG5BZY2KyB3\nfTMt2dI68AQ+vjva0B63dA/3yfAuRKGeciBeYsN1+xzBd8UrNgNiqGnfO+dl\n0W3YkIqqcIHwfaL56hlAhOqEL57d+gY4oceWcPT1fQIOyNzIu5oSZN5gqauQ\nubah1zbFqf6NmO64SK/D9lsjfFSalzY06vs4sMQ4cnOxbuDUq+p8YohXvIt6\nT2RaGg1UlOmJeXO5c4ImoU/ia5Z2xFOE/+n6C4pZue94AH/mjO5Hzcm5sNPJ\nHRm/TlcnAaPzW2k9RfWsZzgoauzivvHnbBg8qXsoXFWsHbzwLwraRZf9u4QH\nqDpxpUJUUSvcd7DWC1qdu2PQ2PiT+W8lBZW28LLUKO9j9x8opfFYKS2jRD+b\nZL3PeeK4MNmb0xYwsMdBaKmWnXCk0NfhPNwwq+/spCrtCC3QKxVMJM2OaLa8\nbpIcq3Vl1KYyEfny/ouKSe9dj2WZsYaNiB2a+aPQIW2YNKeURKqMZmy9BN/F\nGu2y5tzzYd5ZgtPKEcdxsULj6QVTaV3waJbzhmL27yD+8ly4+kPVbxeiiTv4\nDcjNSVdBwFqyPt8D04tgXGR2UVkSWhNAH6VguHzX2UneN13hSfbI3zYjibI7\nG3mS\r\n=mNIM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFQFPi1Xe6tM+P5FdQaPV8a14yQLORGaydOQY8cStMWEAiB7FIuggzO/r0zcMjLFcUePKz3kXLA89l2EA/XI5HC7tw=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.5f6894b1.0_1602198457899_0.37579028812964244"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.f6260d06.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.f6260d06.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.f6260d06.0","@material/mwc-textfield":"0.20.0-canary.f6260d06.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d0f921476509811c1109c8805b0eaf1e5cbb3218","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0f921476509811c1109c8805b0eaf1e5cbb3218/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0f921476509811c1109c8805b0eaf1e5cbb3218/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0f921476509811c1109c8805b0eaf1e5cbb3218/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0f921476509811c1109c8805b0eaf1e5cbb3218/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0f921476509811c1109c8805b0eaf1e5cbb3218/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d0f921476509811c1109c8805b0eaf1e5cbb3218/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.f6260d06.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-zAtqv8gpNZuFSuAkvnbViEioguS0HXaBwDPNJUqZ7WTBc+tfhE+4uNyeX2IU7JymkESkmZcDfTBWlHHO8+cCEw==","shasum":"80aba5ecc745ce02e2d5e70203a0931d8bdcf5c6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.f6260d06.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhNn/CRA9TVsSAnZWagAA2P4P/j1m+567XWJlFT43ydM/\n/k+HOj/+Uc18i2Q7eW60LfXAw3xKFovAxVY0M4EcazfNe/gGDmR47uGZqhvJ\npNSRdCP4EUHZWiQd5e/vQ9ScAKHPdBdgB4XcAjka5M6cCIyjvaklV5dqF2yu\nVWOHvX6He1F81/osjQWMTmv2+QbcC/yvszbPNtdr9A/4MHvgRKWkPmMNYyjc\n1ctbXWnNqCNYRpqB4Jf7PoWbyNFoO/QUQV0PdEDdQX0oDDqijpBiRqy6+Pi9\ngSZI99jKuAPchfWKKi1oZy/HkeXDf4TeIFby3D2nZD5gD3ZorOYa8nPplsdz\n9Tgs3V/swe4J4Zz5rRI5mDJZxt1FEWTwj39YILZlARQd/ftGU6IyOwfvUPBJ\nu+fTIvZNAh6jT/0dljALso5/aOYHiw7LyOH4Pp5nDLSrU6M4YGB79gK654rp\niACDkNarDPHxMoMZjdysRxqtJhut2ZPbN0TVvYfbBeLljtUk210H9qz6tXki\naWzroQkn+iFYaPaLhAasrTboh60+2LEjNGMfHKfyd7zkUQKOtF5/BLnGEhee\neoao01mPH3J6i7E1glDLUew/fRcjYoApv4Og+woH+mU/OlODXI3DdmF/wrAr\nZ9Q/HRjsBf7rCi6g/mQoWHJgtbV6iWQiBseYxPgaQlmtxYwoY0fvM7O5jOlP\n3ooM\r\n=KzTb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/vTJs6HbyHtjSAPPOTW0iJy1Mx/Gtr2pbRDaPvG23agIhAM8hw+62qR24UdfDRcEh0hpofDajAUZ/E7Pd0MUmem5o"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.f6260d06.0_1602542079292_0.14730383072719588"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.2d1b08aa.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.2d1b08aa.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.2d1b08aa.0","@material/mwc-textfield":"0.20.0-canary.2d1b08aa.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"ecded3a50181254f2caf9e2d7049466e24129104","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecded3a50181254f2caf9e2d7049466e24129104/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecded3a50181254f2caf9e2d7049466e24129104/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecded3a50181254f2caf9e2d7049466e24129104/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecded3a50181254f2caf9e2d7049466e24129104/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecded3a50181254f2caf9e2d7049466e24129104/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecded3a50181254f2caf9e2d7049466e24129104/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.2d1b08aa.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-q3EvMsMDYroE+d/4VB6SwpASMCButV9S6v1yJBrPPpWrtoiSszJ58Y79MS6E8IzliNE2Uh14/hzkCaxFc3zaLA==","shasum":"95bd85b8660bc6ecbd157cb9aec64cb7f18c3439","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.2d1b08aa.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhf59CRA9TVsSAnZWagAA7L4QAJMTYmiS1pY/ctfKc8sJ\n6TxW8fWhT4j7pt3bQMsDdYA8MBDZneiI3BZ123d9R5OAXRGZXD6FakyivDpn\n0zKUnjPqugrfsZbi8F9a2z1hoPgwDMr2zvtOnu4zyqcV8CJM9I7J92Bj8c97\nkBEdulCV7fC9FwGBcTQ1Z8TcylhZbIImL7mU6KphypXPa4XUqlPSp0R0nZyq\nR9XJ/pd1tdBBw41YEYAmarpEdhuPWwN9jnHw6RVZ+jEBXn8pWvPFuy54W5vY\nwjRDYKyMr9i2diWpi3DIf117Y3OzOFpEVAOdG9CudMOD9BukKDoujAJOChRz\nGaaDXiERalwOdLbuKVqZwPnhe/zEFPogpapGfAqyzGuZBc3CVYrvCbZwUSPc\nNTYWAszsd0JWmsA/WtjTHt/NuvOFVZ4WUGOmqgqBtaG9lDnAgA2gIBZcxPt8\ngneJpe3hANY90mbdf7MbdnqQUrv6RzhmY0YZeaqSPQB9yTwiD7WSijAV14vN\nOLGFdP+ex/5xMQkA748hO0nrJTfqWdzziUAxvolS8hHKiCEisg/2GGWOgBG1\nGHGxhMTDEuSzSMOeksd+j4mGeSxge7TXNhnOYVyZvtlzKro/+4KvB4xFcUXJ\nVaPjtzZJwJaShVlPxxLYr8ttXH5Aa5YMTElrPJ6vcvrUx6+0o8s+uFEFhPVC\nXm6p\r\n=b9be\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1Cly2R/e3l6t8rUAETratzsiLQdI6hCiZObSZQf+MKAiEAzG/fXfFtbNqeIeLbLs5pBMWfz4mdio9U/1RJAWsh64A="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.2d1b08aa.0_1602616956854_0.2648339970554421"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.5bd58844.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.5bd58844.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.5bd58844.0","@material/mwc-textfield":"0.20.0-canary.5bd58844.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"f577a3de2e8463259c7e4a5834fb1873a4bced9c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f577a3de2e8463259c7e4a5834fb1873a4bced9c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f577a3de2e8463259c7e4a5834fb1873a4bced9c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f577a3de2e8463259c7e4a5834fb1873a4bced9c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f577a3de2e8463259c7e4a5834fb1873a4bced9c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f577a3de2e8463259c7e4a5834fb1873a4bced9c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f577a3de2e8463259c7e4a5834fb1873a4bced9c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.5bd58844.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-kClzi7JxfYgY2tm0QVIepxS+Esikmz8+TOF4qkKsgAXnDva/Qk4AHxRXIy+TOpMtQ64swihAcDrifddWZT+I4g==","shasum":"c2b200880415f18c81ac68bafe93031a54d21db9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.5bd58844.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhjxhCRA9TVsSAnZWagAAlC8P/0zQFL4WOaOcimgvaFmW\nV3yOpg5PjYRD4Bo08ThMrcpJ7ml3kQ5iWal2a6jR0AhQvBcbKyj7JBMQsj9H\no0gjREjGZkX62l8zkA33ledEE3Xiv7MftbjyFXVf3iANQtT5Rtuk0FuwGb+j\ns8paRL1I4C/jUQWzlfGmYyu9ifEVM2paf0bHRI02agRGJNH3QXQtfqobGQXH\nG6cNctJUe0uG4Hsm97v31TX4tUJx3wZPQeAK8Ny2dpGQAhN/oZbRMDXdsrDl\nKllMsr0aEXiBx0aCU5yv1c7V/+eVXR6biy7e2BGAJCM3DU0ZdIvcopIBjkOw\nMFbn+rpAertcTC8Mih/f8NgAq0LtsQBaenFM+99mUtLZtpqjcJt19vopJypg\njMH1l6RM0qovVyrRt9aM7c9PS4CJGRMEdEu9XgSqWEWgPqiJv27kf6CO4rkT\n4wktVp2CQRjyNozBUrnJ22l2L4Va+4/HuPLyNCMF6RqNgxJSPx1Rf7hmuiYp\nCbauFHymihje7irCVO+0BlvYRXldrRCZ/Erv/dsxm2p1GwGL1O/ZoD/eei9F\n24sOJwoZG2Qbi5WY3dEHRd2TSDJ3ZyD50wadK8QvKIXFaHHR0ddn1gFcCg8A\n6FnougyQJdJDUcrzjvZqYJ1s2mFMsWWxrW5WkBi/O+SyRWJ3L6EwOjkYil40\nr8Gm\r\n=F0W/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTZWeDHwOsRC2sAWwqD7OsuqriVINSHIkxaHYuxvS+jAIhANbKKwLr3IQkdY3KQUJiokqu4ismRVqtWgaiSOxTSpZi"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.5bd58844.0_1602632800600_0.18792103055186793"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.bc846b29.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.bc846b29.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.bc846b29.0","@material/mwc-textfield":"0.20.0-canary.bc846b29.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"08ef67ebd3aef2e1a1cfc139021dd528a4275f6c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/08ef67ebd3aef2e1a1cfc139021dd528a4275f6c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/08ef67ebd3aef2e1a1cfc139021dd528a4275f6c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/08ef67ebd3aef2e1a1cfc139021dd528a4275f6c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/08ef67ebd3aef2e1a1cfc139021dd528a4275f6c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/08ef67ebd3aef2e1a1cfc139021dd528a4275f6c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/08ef67ebd3aef2e1a1cfc139021dd528a4275f6c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.bc846b29.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-1re2FjHhwLsU34sJtfhJR7iRCWzQH7sDxSjh5vh8oVB+25Jb65WGzZOq3Iq3s6ND194NvDXfB2gArQbOTmtdzw==","shasum":"0e1f7e54c25ad501e9492bf47191e6ef2d33aa9a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.bc846b29.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh0BsCRA9TVsSAnZWagAA/3UQAJBChD0qyZ19g+rSr6Jl\nLrtqkc06eEf0nOSJLlWzolwwJK+60Ytb6m6FYrG0wJn1y6I6jiNfYfLpETEP\nSgFtZkJ5rTDfkgZF5BcLznQ56ek1o0aXjo9Ga5fjmAd9P2kd7rBPZFkZ13ce\n4619XsCsTjs0nEnPVm3GWC8EBHUbtJHGILO2thl1zAT+xgGL97F28ML6Cg9h\naL7GCvXRP0rSnyiv9vcHUice60doi/yX83k02djvAbo9ZWW8USAXj7U22hoi\nQ3FFVo4GXetOP7vXQvuHHKyAT1cPeXng8anypsaBzNbBVqoOvWKqZyb/hdy3\nKsvjiXQ8CwapAMSu7L+8f6Ireia2qB3xQkZXFPWKjnGjnF6oBgnw3oSvK0cZ\nmPnc5mJxdYUDik0nTTucfCK91CY28gwL/FqYvkV1Y/n3ic8RWvXwJPbdnYU1\nfnmkKZRd8SCHjcZWkLQLmRFl23gaUof3A+0Re52MhVgsv4XJtD6U+1ijS1r+\nkd3s6Pa2DUxhAAcG8y5nHt91S24TOByqbPJxXKozEQToLQoiKWPuulmEz8d+\nqQjoycqLsoP4WXZMst0ts4a2s+uje5TUsxb5CZnmQjdPSnAZ25U39u15RsdS\nwYTZiepllfb0o31ACN4Ci4H6P4vIWahr0hKECTKtJ3u6XHU9Z7PUBZDvRK8a\noXj8\r\n=OprX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmWKZdCqLTlnbjNa5MKnVxdYSk1zgXO44vtZOd3lsKngIhAPCXWzfhzKtr4ARiIrTMIh3ixuRglC03xi5m2VlKHDfm"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.bc846b29.0_1602699372060_0.85553334227726"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.3280b686.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.3280b686.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.3280b686.0","@material/mwc-textfield":"0.20.0-canary.3280b686.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b97a59c2fac8d04478f24f297f15106622007735","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97a59c2fac8d04478f24f297f15106622007735/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97a59c2fac8d04478f24f297f15106622007735/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97a59c2fac8d04478f24f297f15106622007735/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97a59c2fac8d04478f24f297f15106622007735/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97a59c2fac8d04478f24f297f15106622007735/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b97a59c2fac8d04478f24f297f15106622007735/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.3280b686.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-fKjYzs1aKWzjL4XFSuyOY8qfJiiDJP2LaMakpdAXHf5mU+WEaZGtcPD1YX3mzRorVOOpsZa/DEV9i3SP/YIa4g==","shasum":"02db967de131237a750ba975fc8305dca2bc250e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.3280b686.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiOOzCRA9TVsSAnZWagAAMPcQAIIIYo1fjd4n3D2ymIkm\nyI+Z5FQL+wbEE3HnURCug8NLEt7qMhMmQH2+A6ECJLPHyeXak0qDJB0RLmxW\n6AS0kIb2L48UkRHqQGztA1ZZZdQkw1IzaCNNgLZ5bM6DS3XQ5scczySPpLVf\nbWUmByvMObhBvXFZjdRNrXwdfUnkmvkPxfp/7klcRxL3Z8xMxIki+0if1Wxp\nCurZ4fTwxWX3BQL/XOzkAWqsVivnRfe/uFJy4lcu810KxVuSA2PG94GW3rA8\nOgVXm3qUZJBqlAsorNqoo7wpjMS8+X0p9XQBn/hgUyvtNe+h5ttgCzoQMibt\nSvKpI6xv7xT6660lUxZrlu8Yy5hwtqVhQNLvElWbrWxUh42tmaURa4hINEVI\nnaaCWH7l+hsaGtfqBZiSJkUZlh+fKjalXd0BFJAA/wwzAroJACAUgsrKOkZO\nlZxICBq24MwS4jSzIi50msWoXpKTky0gBdMScv1X5Z++HfX/2BYLj+MmrXVN\nHI53EiamT2XUU/cpD0Dr43HobpNbTrC92yWpmTLhzWYJjMSgASHW+U1aQ2L+\npegDCI9+2cOaCMnSc768c7JKvhUp/Le+YZwpQ69MDjYOmq7dR35oFYliRpGR\nDA9elFn3Kw5/Yfaezm1OXp8eSH6LLTAAOsYyRU9lJMsSuk2ST+eUtegOVXOK\nGL2+\r\n=w+0i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEQ/r86FyVuOVn5ML5fX8VK61sC6c3It8BfoYyPLAYTMAiB0H4PhSSsnI3GcfZniofq48tJaoxHtle1/31z8x4mGUQ=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.3280b686.0_1602806707574_0.3527260042802334"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.9e94cd38.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.9e94cd38.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.9e94cd38.0","@material/mwc-textfield":"0.20.0-canary.9e94cd38.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"805fad1d9b182d084e682ab7e59a4e45d40872a2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/805fad1d9b182d084e682ab7e59a4e45d40872a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/805fad1d9b182d084e682ab7e59a4e45d40872a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/805fad1d9b182d084e682ab7e59a4e45d40872a2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/805fad1d9b182d084e682ab7e59a4e45d40872a2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/805fad1d9b182d084e682ab7e59a4e45d40872a2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/805fad1d9b182d084e682ab7e59a4e45d40872a2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.9e94cd38.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-fd9N7oujd9zp9xB2qsThlDtZCikudCxCxS+ciZt6/OtnrHKznA3KnVwcas8PqgRbllOi49/5B+S0MPN9Ih6/hQ==","shasum":"96b4171cfc8f35bccf316daeca0d635a24c3bfed","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.9e94cd38.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfig1KCRA9TVsSAnZWagAAVEUP/AsVLz4RZK/ixVDmxaHd\n95f55hukjAz2Vnx6GgAdtBR6KZATDCrzpVG9C/bUvM1+vY7WdEKUj+QuXvjz\nXAsyQjB5O7rLGW6SeFY4yMhxViXI66LwJs4wB42+VdAFrPBN57Y9VHngm1MN\n0GkB7xc6W2w9LZ3Yfz7jsZwqFtbQTZrBpqB6x2wGLrPjBbmpqg1ne1L4IiYs\n5n6UyRyB+Km/9+KZ8BuynTXxP4DR2g7R2Yk5BDos9VCMTjPg53ez85F+g+WK\nSGxHCUlBSHkUrkDMgDzpdmSsyh4L9ufu3CNr1NSK3OW6k15UuZkyyAJnUAP0\nnCtPSjXfhx+TEfKRZyUsyn+nolSOfuTfvkjDHuOmMWcwoZYo475PcwfnuLJl\n7ydn2LLYhuWgkM8Ydss6R8TJCz+NaXGBpNsilDyRIt25bDZiEQj/pP1+iv/u\n/vnJh2l/d1lH5L2blagGZgb4+FVLCZPQiCLFNPBnguWfFmPmJtfqIes7a+VQ\ntBbDy6SQvotb7z2KGH8zJLDBXVt162sxOOkZfpVtDWRJnOZzRoUkL2GVYqn5\nfafJYgtN2S2Nc8wGTLltWpv823rrHa3AuoqC6ms240Kb4yoKm7FpcU+qbRko\nzYbqzgPpnwpLRp6F6zk0ZxIOhwdy8vSh+SBAypJ4szRTBtHofXejcOHxXthJ\nVZGM\r\n=LcEG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFYCQBQ7x5uhjDzjPcKwU779LeUgpqKP0VqHz4MfPrUAiAbXiA9+Geru7wAHlg0cSnhI6rSjTE4NVL99AkY+o3TGA=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.9e94cd38.0_1602882889815_0.9749614059710514"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.4773c773.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.4773c773.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.4773c773.0","@material/mwc-textfield":"0.20.0-canary.4773c773.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"fbc8b44864ae10f0bb46e568b25bf4de49eab777","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbc8b44864ae10f0bb46e568b25bf4de49eab777/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbc8b44864ae10f0bb46e568b25bf4de49eab777/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbc8b44864ae10f0bb46e568b25bf4de49eab777/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbc8b44864ae10f0bb46e568b25bf4de49eab777/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbc8b44864ae10f0bb46e568b25bf4de49eab777/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbc8b44864ae10f0bb46e568b25bf4de49eab777/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.4773c773.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-drdHceaBWyZalOO79KNcPaV/aeWkJHEc8cpoBHNbKMQT5yP/MlCqHSB/ZENJouLhB8yLpdNePasuVABjGuhrhg==","shasum":"45eb21e0c7a09b9244d291d2b1a61b96c847e1f5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.4773c773.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfih/7CRA9TVsSAnZWagAAR8sP/i9hbG8i+3AROGbdNVTI\nx3dIURjiGJ8V/q9NzfIXi7TRwM2NMnbif50w1j7KgpFnKlMxTRmtV9XTzLf1\nswyC3/3L/72Dddi5hRe46fUOnTQ3kFXIk6T/umwAUqPX06SedT3rlVSGlaU9\nxXHvXD91oUhYursT8icXqPDukl1RBTtMgHqh0Jf0jzJXuDweD0hQpA9AA2+3\n3CftVN7Z8LGx97VwgZ2V6zxnpG5FpjmAtoiYO7gJQ3aDsub890D9Zr9mZuNH\njTJouxi15uyUu4T/AkDHN3xYC7PwhbU4/Tn3T0knpK4mmt5KsoKBBmvX3mOD\nEC92stWFfuWSn7haFY2SWT2JsrXqNwqwFgZw+Qyt/IFs8KDJSWWXGp36xmqb\no/4JBYQMAC33lfE/y07z2lVyywRM9PA68mXlCOAfNbqMOQ3FiaEmMXDirRLO\nLj5MCIFUKBGCKbhbv5vZTDl6kx7Q8pvE+l0czP/i3vRpTiqu9IUBmu8miKe/\nvO/dtveUJNn6MePDcDIZjp7lHLZggyJHT+HqCuLxs4mxkrFYR+q5LtT5+lTN\nBOzCDjQnfEvjHceew6IeZYZ+mmRInrFTtYyyUQJ+fCBBgwM4c9/9oifcyIhj\nscRB1WUj7Hf6/tAE1zsWJ9GvhdVIGEcW/e87+eyvjuc0IBVkvy4ECFbTaH6R\nnO18\r\n=DqQ8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFawkYgcGLfv0EkpOhoy+I4h9hUOQAg7dcJJQbTruOMxAiEAwD04BSnvRyFAVngOWiGwb4YtDAhS7QlaA18WTV6nBAU="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.4773c773.0_1602887675253_0.9982874808894546"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.65787913.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.65787913.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.65787913.0","@material/mwc-textfield":"0.20.0-canary.65787913.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"b21d55977da5e0c291e9fcf3fb992ff4c683233c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b21d55977da5e0c291e9fcf3fb992ff4c683233c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b21d55977da5e0c291e9fcf3fb992ff4c683233c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b21d55977da5e0c291e9fcf3fb992ff4c683233c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b21d55977da5e0c291e9fcf3fb992ff4c683233c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b21d55977da5e0c291e9fcf3fb992ff4c683233c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b21d55977da5e0c291e9fcf3fb992ff4c683233c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.65787913.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-QNCYQoHzQRzeSsu8SCJNGbJSvNbKsmgJ9EU53gaQub4W8fRWTuui39q3c94s0YXHGH0+BEWJ0ThTzOMEJUJKdw==","shasum":"4c3a42bd28d365a7d9b18f51f42a76961010fadf","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.65787913.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjeAtCRA9TVsSAnZWagAAvtYP/Awk4MJHNAvX3RWERfjC\nOikjfAuINSeZazuFekQdTHuBye4dBj44AHvK1DA3mJQ6x0xoY3pSHp4u73qy\nyRH352ov171WfpZN/LcFf1CyOnbaO/GeCqCL8uw8agRbR4BQZ9yMlSWlNnKc\nZQw3Dl9IpuiXUdLXTLxouXfsx07YKvQ6Q4EUeZk2Sz6Fap1XnT7R7DJG7KKx\n0/FXOaY/Y3Y1SDnsOOzol8f3eOQ5m7pYqjv3FiKtNEU5XmWZiP53C7Rv/ksF\n+7rxEQsUW0vjwbOoWtq7LHIpHCAHUTsgAK8NEKWiu4PvDzfoxyykIv+vjf/J\nHPtoL6AXVetou4QJhUmShKrKJx63gOcfSVWfIz3AbOBDtgvkGAx2cRbkNzGa\neIRNU7CEPOJ75aIXCgeK0QyoRkc34p4QKsc+eFTFigWkG5PbZa39S3Akp77r\n5hXESJe6Ytt8VHiUphCPXyJaNy0UVbSjbIYeYGGcmjW/kXjMVDBf+JS41aiQ\neaWOnzbgBG3yY+BMRu0cgCspq+sJ/k9Ef5J02X8683UoIJDPfWD6/5NkoucS\nzOmiAwmJvQ4o+9Kr9YJJVYVB/tef16/xJsweJcBuQZTYAfVhYL5vvp2I9S/+\ni7fUN4b4gWbDX+zio+upKjcXxLCmTwKXDKK+rNNiCywdlVomIfXdIVSWKm3O\nQ4Yh\r\n=pm5c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeBynR1ofM5yr4uJ8UA6dXOMybmKY83GG8sMRW5mRN0wIhAOeW+NpbktyGZpSNPJP6j/q1/2Gni/50uyGaZEJsTtsy"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.65787913.0_1603133484786_0.25993488003646803"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.5485fba3.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.5485fba3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.5485fba3.0","@material/mwc-textfield":"0.20.0-canary.5485fba3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"9648298c6a3406f312222d0c0949954cc1e250e4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9648298c6a3406f312222d0c0949954cc1e250e4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9648298c6a3406f312222d0c0949954cc1e250e4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9648298c6a3406f312222d0c0949954cc1e250e4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9648298c6a3406f312222d0c0949954cc1e250e4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9648298c6a3406f312222d0c0949954cc1e250e4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9648298c6a3406f312222d0c0949954cc1e250e4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.5485fba3.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-lLBS/Y/5nH/TKlbIQ9Vxc+EY0J6Yj6RSYlCQ6m6ffO+qv6Ab2HZ2sxCnELhL4XjTQTPpMrLcvaBg0yAyJZzjMw==","shasum":"51af96c558a94277ba86640338a932add1e5918b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.5485fba3.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjgQkCRA9TVsSAnZWagAAyIEQAJG5wtz7CznMOaNbF0B6\n3469ILe/ByZr2/JK0++ZadChlSDrAgrqHThC4e01WlKkRyTrkGcHMfWdut3+\n5Z9i9BwLbfP/OP/hZdVAHsAdy6xqOj2iZ0ZUo0nGdHtRadUPnhTSUKcSJnUo\na3uP91zousmq5SUbupNYH3D3N/lgzt6Qe2QPq+jGrh9JgHTmupEaLcRvBn1V\nfKPAqKQIKuf/86e+poR/amMa7oRACFSt5WdzQH+3T9CbhPJ3GXQGMp5SC4oZ\nRKhHOFEIHb5CiivYXnfJ9OvJDPiGZ068Q/ezIYZSzRYZUAAvli/6SpNZzNBk\ny+HneAyY7FvqLU3VdKP3Se8vQgXhGlQBMlHA1fnJmgZ/kVnwMO7YhD5qkDDB\nAGYNFNPXY90WMcx2907XeJFC+9kylYlKX3ncak1sH/5tP7XOp7r7H3DJwW2Z\nD+Co4bR5gF4LlPdJbklPfK8YLkf8OlCPMLNn5I5zMw0oBxo1kplLeNxVFMTL\njXQyUWw7xyG2wRSsNs31/TZ6teJ9ruzL9UjlqVfK60IG9EXZManv6Dd3KW3G\nQzZ8zZeBpXkPOuHF5yaQsLxZRrqf7/xRwTDbPguhGuDOKE054IO7oXu30Ei/\n4sD0p62bDmBglbM3aQH4mkPDETCL/H5nup7iQEK+idIe3Q0klI1uvp1mJsGw\neJIX\r\n=u9ml\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICdtVushsWZoO7+fgK2Prx0yrziqb7DaXI/SNCW8tWFLAiEA77oTodhI9dg3CEEqqmiEavw4BtvRUe4jHc4XVz5tviA="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.5485fba3.0_1603142692334_0.7840170162132485"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.a39d0a92.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.a39d0a92.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.a39d0a92.0","@material/mwc-textfield":"0.20.0-canary.a39d0a92.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"c523e6fd9acdd92ef501444da567a8910ed478e7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c523e6fd9acdd92ef501444da567a8910ed478e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c523e6fd9acdd92ef501444da567a8910ed478e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c523e6fd9acdd92ef501444da567a8910ed478e7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c523e6fd9acdd92ef501444da567a8910ed478e7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c523e6fd9acdd92ef501444da567a8910ed478e7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c523e6fd9acdd92ef501444da567a8910ed478e7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.a39d0a92.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-AOUBtm6+aDaccNJ5Pc80iWX46AZBfZaciCUDUl+c8T3qzpQTGrrE2HmUIaKsWAl/Avt4dx/5y+Xz8wjCkN7YIQ==","shasum":"8c9b664c4c796861749f982f57666c57530f8bda","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.a39d0a92.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfk0oFCRA9TVsSAnZWagAArewP/3LxOruxSbQremPArhKq\nWzUMuqdvH7nod7UlwSBJJMTZcFePozu8ZhhqTOROwuxG/gE9zsdhMRQU7T6p\n6bRwBhplG9OLAIaCFMy0b2azMPYxh6slkEGMkdciwkN0QKXUGvbUFehKfLgl\nN8HfYg7mtbwajAiBlqNDNwmsm7yqYMrYLDZnT9my8e1J/n//zvkQENwj8gwd\nM10Ac3B8U7Mm95HBHEKSUsJFhboUGK9wvnDfh1GCsmrHGkyC/0uTb8hD3vy0\nfk38fYw3PFlu+YmmylCvRHlRFL/f2O9MOP9K8krin14X61D39ZhoYSGlr/RW\n3n7ouRD9U3gLFPliaXjXR9JwOqRo+67rAtdm729cOtIrBgY2shKlzPf0vL0w\npHZW0VdK/wfDb1PFcegPq2AcWn42BPUe9Z2XnbIVRzqo5isyeCpg+M9HKGkO\nwRFA+vFKO10x9HZ00amImRmk4wRwjUdGRodQ1ei8mdOTnXNJ8aDCx9z6hG0v\n96fxwvwlK99raMF9ztoQadASPCh7Ci9u0bb0A+vOBzufCji+T6EbLaDdkpvi\n+1r92iaFlAwplD3a5VSi0lKLCssOsvWZiJQl4uoEV8BAuKYaIsinc+XPDOSL\nlGA4/Q/zTFO/5j1nMD2hpsFy4ya2TFaGkN0cPbw+KbNavy6xbTK7rPibqeCc\ny2Mz\r\n=a9gO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHdodSBnjcxDefB9h0hkfUeZMpSjPkeNAaAdMmCW14EPAiBGqy2tJ0VKY1i25sWDrM/Mp6gM4ZahCFYdipy6Qzyphg=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.a39d0a92.0_1603488260661_0.47609200488074577"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.4eafcbc1.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.4eafcbc1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.4eafcbc1.0","@material/mwc-textfield":"0.20.0-canary.4eafcbc1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d5be869d7cb28aaf425a4fae37a4f61d918dc1d4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5be869d7cb28aaf425a4fae37a4f61d918dc1d4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5be869d7cb28aaf425a4fae37a4f61d918dc1d4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5be869d7cb28aaf425a4fae37a4f61d918dc1d4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5be869d7cb28aaf425a4fae37a4f61d918dc1d4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5be869d7cb28aaf425a4fae37a4f61d918dc1d4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5be869d7cb28aaf425a4fae37a4f61d918dc1d4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.4eafcbc1.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-4xi0seEi1HpAGe4ZByLz+yUBBcC/1VfsZLIxrdjaGVX2rDOslm8QLeC4f61j2rR5DWOrjOGBosaWkXBa23o3nA==","shasum":"bc031249b85727f7a3a538001a76617acfe1f08d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.4eafcbc1.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl3YUCRA9TVsSAnZWagAABNoP/0sW7nTw3kmiZEGtB4hK\nQqiHPGngiakQxZr1g1ii0gPb+mYAPmR/moscG+KIVBLX5ojJWk5kUkJQypst\n60d8sO0nKCzyqqOaZMfQ7jFalbsCnpe1U8TJxsnOWJKLfVigyz4lY7sw7I1b\nIu9jgqAZR7BubHDs/0ldYu7P6RJkA9eBRTIMFikAq6b2RxR0TTXJMICztzY8\ne3TICPRYOMsvKqGn/gAwCN2v86oljbr1SOHdyExaTt0OeQMd0Kyt7GT+vr2V\nhIuDIyeLiPDbhCh2GM0bhgrNytPTw0sFmXL8Qewbp0L+MCjmZNV2dv/zTGu9\noVyTBnOZ4msX3pJtayvYb6ZIUvSg9m+PYLlC5xueb2v89IpFATnw4x+8xRTR\n3kH31eJZyJyJ28Yo3rE9jRtoRSU4pI5C5cxwr6W8tvbAQVA5M4bP6AHWLHtF\nxvHiVFqynlTK3cdLP1C+Ea7Rz/DUfdu3YK85hbh72/wqCsnzWR3nvLcj/J1M\nSynyL6ug+sMbbyLiK+9JtPRmwdLP3pHMEoQKNHuE0cAlBDmJwZ0bxJ0K6LBg\n8XHKDY6PzVoRonaDBTucgQgnZvJQT6SkLTWMaaDrrXKQqZuO7hWQtJ0qlXhM\nZrail94npytJ74Nr2NpUgxqXju28CdRTE/6h6gQwxTFqo3sJbKFpyR+2jqoO\neZyg\r\n=1xE2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdh3oYn47FKU7BYw3rkHTA0nf8Agm03c1UvL+948U/8QIhAP2NA39Ia/8roFiYxEJ7HKk8I/k9WEqXHGelSgCdTk8k"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.4eafcbc1.0_1603761683545_0.2742924976390335"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.32961593.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.32961593.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.32961593.0","@material/mwc-textfield":"0.20.0-canary.32961593.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"af0d60d5c2174ff8ae5098ea73212398be59bc74","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af0d60d5c2174ff8ae5098ea73212398be59bc74/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af0d60d5c2174ff8ae5098ea73212398be59bc74/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af0d60d5c2174ff8ae5098ea73212398be59bc74/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af0d60d5c2174ff8ae5098ea73212398be59bc74/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af0d60d5c2174ff8ae5098ea73212398be59bc74/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af0d60d5c2174ff8ae5098ea73212398be59bc74/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.32961593.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-9GBy+IWgSdPGZg7lxa3Tsr4ZnyZLDQWP0FV1JGwbbxoy95OdU+oE69NhpHWj2OBDK6M8sQLrE7xiovs9Wmxr/g==","shasum":"aaa54390e92b05694b455dce7e1a4c7e3abfd59f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.32961593.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmL3ZCRA9TVsSAnZWagAAYBAP/jfZAlFks8d+TiMhAsjO\nevvAID1xvp+7oZHjzfGgxVALbF+28tQ6T+uU8HhNZEguyoFElp8YFzLSQNZp\ntHXHay6QfBRMw9Ip7oTs+3hcZdV1ELzvetZvm0cQ17u9N6w/fm1LOVr0BPas\nP4/dQ991sgGwCvwEwLg9t9+YqnT4eSIR3xseJzGxkILY49puJnXFqM5D2pEv\nKVmrPulo8hP6eIGNxVvIdSUTAlI4J3gfIfNtA3Sbx82nsYRJEO2/UUo9rlic\n9gYGUYl2n67Cv0NXE+oQYk0ebiybUNc7SkcJFFY9fIVKLADngNlipUHeJ7wK\nL/LwghkGsLfut1CLClft0qWYoY1vtYnlf7O89cjrZic4O1dO/86UCE9zUIFM\ndbn0E44sfh5vojageO36TgU7s0hY72KBp/0RZ4F843sdvkZ/1JuKG3xCB5RA\nTNTOiEXEea6CcdeKd4ZQyy5IadWGlheEz7GaolMaLeP324/Kel0jf6AFOFwF\nQjE+cpBlGeFoNn0MJ7VG/x8jLyjSUR6fSjBYxEvqvAc5yzVUCXNCgOqE3ufq\nd2HHgrfctQITOQMdHcbUnnvJ/i/68waehplimz4pOQqWdlI+98ThsB35lTxk\ncRBTXULeRmyPHQNqAHNAG0xWwrbPNDqM1vZF6dikEWcmOjIonNE6Y4HvhplE\nltSH\r\n=dw7n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZnS8sMFVDUQziON9qUHYyLLg9xe6GAxXgTJ6alRTxMwIhAKgBvwsjZ9o0sDlxyF/XKCC2exmsjMLUfKKFT+CMQsd6"}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.32961593.0_1603845592796_0.9578936807336305"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.8e3a0601.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.8e3a0601.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.8e3a0601.0","@material/mwc-textfield":"0.20.0-canary.8e3a0601.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"a21493f177ef3992fcd667ec3ce774d4fc926d7a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a21493f177ef3992fcd667ec3ce774d4fc926d7a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a21493f177ef3992fcd667ec3ce774d4fc926d7a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a21493f177ef3992fcd667ec3ce774d4fc926d7a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a21493f177ef3992fcd667ec3ce774d4fc926d7a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a21493f177ef3992fcd667ec3ce774d4fc926d7a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a21493f177ef3992fcd667ec3ce774d4fc926d7a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.8e3a0601.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-mV7yo344brEy1tZkODLSl1/bbKFB/feV8dTqIyyYEqHFZEwyF3moRpo0krR5tSMkgKQI3YYf9UCvAREFKMSvCQ==","shasum":"bbe9574b022fff9850b78427bf7fae985f592fef","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.8e3a0601.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmzYTCRA9TVsSAnZWagAAmKQP/2Ok79cjPxu344nr2BBQ\nAoPLBcp/dXNPXliY5h7RsNzWQojVQMot3QG1Jst7BAoV4S/hWB4tSMSHOH/w\nZQooiUtqXhp2KkOl5aUxiT8fYy6+aTCHEHxUEwScKne1o5k9gD4D+BvkDMhc\n5o/0oVd8of3kaskg1y/Bt+bZmClluXbnWrHoB5RYPSnWEPTIXjWfZtYUFZ8B\nY4RWfKVxBqRP0MC32jZkCAfMeNoEvs6sxVNObYVX2Gq/Bb/Tcr/9MAqyCNrk\nToSQObrDNh3RxwaosAXYMycGP60kE1Q6S9cS/2KH/QhWhmw6Hf3+2qQ6dQHv\n9enJaEnKrlC5gnAo/xOqpLwxC08MoZ8uAgy0Q2sk/4dB6lCU6JaIIPIXltXP\n5yo0QNa1Dk6m1DgikP/b7Q+JCLZa434lqoz8tJdTbnID7TJKtnF6QS/wXFIj\nOTX4KsNTZK1xoNwV+rFsVFmODO5r6t+IlHNZf7cnaU9AwFuPASJPtXAXhheH\nve5CeMPFzMItOKfI9h94j6epRNSnnmUv14DzOgrJKawO9phI3DX05/F6nGMV\nFdrvHq+OiEMwvV8PJq13o4IWQP4Jx0WiSIh8M5AnXbp/74IF9z8u5rqzc9ql\nJQe7kMDNrxJzVXPHg64xIf+BzUDaMUdjqpltDc4774Rf/72mxNROKoZKfAAI\nYQRp\r\n=a84K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD92fYRQnWvBIkCawmwAkFlciGSjLkp/7tofU66abEPtgIgbWErWi9ALZxn20rhi8VUDLkoCq3rptcZs/HFEA1bmW4="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.8e3a0601.0_1604007442982_0.7025404508479602"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.178c25b4.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.178c25b4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.178c25b4.0","@material/mwc-textfield":"0.20.0-canary.178c25b4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"80850b707414fb51c8072422d293bc7fea8a6d8d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80850b707414fb51c8072422d293bc7fea8a6d8d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80850b707414fb51c8072422d293bc7fea8a6d8d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80850b707414fb51c8072422d293bc7fea8a6d8d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80850b707414fb51c8072422d293bc7fea8a6d8d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80850b707414fb51c8072422d293bc7fea8a6d8d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/80850b707414fb51c8072422d293bc7fea8a6d8d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.178c25b4.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-fp9FB0FX6JtXav6miXH0s1Rce65SULdbpuByrZLm2fQ9WSi0ITLLGClvIFBzyojDkSjl9FIWAdJmFMiacDXnIQ==","shasum":"90eb795f30936f7877b249f3f66d56658ced5d33","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.178c25b4.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmzlICRA9TVsSAnZWagAA2egQAIed0WkRW1irvX+6L3AY\n+XuYOK1lfrQdZFZC2z1pofg6gIqDlUQ8U9RJkNxxW7NQ7eEFUNN8qkYfjQhQ\nASyGHfbn5onix9J44tEbT3aBTb7a5+MZQfWKRJronKf8C1nmmyKUubkDFoJO\n4B/TOoFUWLxvBy+aGPGZuTw3jRCpkTmjSitWYTBKkIKmXC9fSSwNEv75Dork\nVlu3iXlRLHqkeoezQgWqRpk6QQVRHj3H2Pini4j8YUbeh9ev5t2Wlov44ZX3\nZVEy2STIum8VNcLMBSIFnmsbtuS4dvKmV7YU0jxlr64m/15kBoF6MwOXCSdv\nVY1ELscIduNR+zV7snkKm30YWbBjmsKWLosmlHB+Twpuo9QKSLv4ypnYfo1p\nDuROxYXlNYKe8smJay5Po/p4+NI6+zprLdilsXH0YtldbnrsffIZNPDwun5q\nzzgu9Fcr1EYIBttOhbARI+cRuxErYXmohZEsqHaw0peNTojGZnbexKScewG+\nVRSBW600bX8Xyd36Er2oYNATW7RVCFMqpRy9/gfbYFebzVbVkECWY9PBufxv\nMDOkg4TX6PbHYTAp6wKWkC7rAyVKtR/I8kaOQnp3KB4XlTZXKsojesxcw5Nq\nGmA5a9x1aT1wxCCJBMgXcULw7w5ajL4i4RdM6j4XF6HC8rHTP8uXTFjjnANa\nWUH/\r\n=gEbr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFi1WqsCi3PkWW2SY+o4xiFglWNT7ZHQzx2AnGpMne+1AiAgUsbqsUTpOcefe21dPHrO39Hht/7znI/yR3d2KYv1qg=="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.178c25b4.0_1604008263838_0.05811567504200399"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.124beb49.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.124beb49.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.124beb49.0","@material/mwc-textfield":"0.20.0-canary.124beb49.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"8d314226afe84cba75086ef952556fa1fc0c5de7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d314226afe84cba75086ef952556fa1fc0c5de7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d314226afe84cba75086ef952556fa1fc0c5de7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d314226afe84cba75086ef952556fa1fc0c5de7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d314226afe84cba75086ef952556fa1fc0c5de7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d314226afe84cba75086ef952556fa1fc0c5de7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d314226afe84cba75086ef952556fa1fc0c5de7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.124beb49.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-3iv13ra8UUXfazCESqNHXEYIUqnr9EkkP8R/N2E6YZukOtJaLdZWCC2/ul7ErYED5wk1DNLLuSCqeAFtnSk9Ww==","shasum":"0e67e6e16a9616a80ffdd8ad93ccbc019dcaf294","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.124beb49.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnKqhCRA9TVsSAnZWagAA3H8P/139pfbIwa/b9yPFmK9w\nBrCzNbUEyi2a0rrqJu4AewDOJyg80yOu5rY6s1IyqMHOfAfueCsbzzA6dE4V\nQZKVNCRIyhSzxdX6m90qcXloCcK+4KPPEcjdS4qBFJm0wIu4CKh1mDrR/6hf\nHs4wNPrXOvvwj8dMhsB7MxV9MxjNj78RQQAL5VUsWFhNd8JU4IckmrAEL0Qi\nwrxvOZiSwlaHOF10hL14VyYwKOHB2Gyu62+Jcmrprde7deIfEWnkdT34jZ6l\nrimenP0nTKeGuleX5TLTfqft8PCxPUryZ4W8KeyHoGlMZaR7GjREFqZlXR/U\nmJgDNFVsAoX9R5j7Sm6sAibzQgnZibvcYCiJoRHgmCCapzLyB40tRQVcvg4A\nLN3JjSNyfxGl/xiNM2rgQbXFASyrLTQUYfikSThpdKlmaMBBH4QGJp6nIiDe\nteggwi6Fk3B3cjGvKpVxgVWn4CUNdCd9KwwCEH0KvwyoBdaqbdlpdlqqHSHn\ntlRe9uA5s0iNybLMYVd06PyhN6rWUxobKhUbjEno42B9GgIlv2iUnSG1TKyK\nyVUQGp3a2gcLUFunaReLeoi7JYnAhSDzkNq7+LMNh941AjtpBou1RFbEZ6kI\nv7UFsqBCIxT8Q5IbU6USvAhrBVVB6sPxGj5tEVu8XuNGZTyFUi6bMgS4RVeM\niIcE\r\n=iMlp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAW4uVX5cFgplG1Y+FTLG5D3W/KzP2OAIG2Nk7HdumzcAiEA2PrjTDPtsjhsnrqVECKdhVP40JiM+Uj/7aOeASWOh+4="}]},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.124beb49.0_1604102816971_0.6402529056797399"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.5937f468.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.5937f468.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.5937f468.0","@material/mwc-textfield":"0.20.0-canary.5937f468.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"d1d2934f5269407a8c0f85d5112be5354c17a971","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1d2934f5269407a8c0f85d5112be5354c17a971/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1d2934f5269407a8c0f85d5112be5354c17a971/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1d2934f5269407a8c0f85d5112be5354c17a971/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1d2934f5269407a8c0f85d5112be5354c17a971/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1d2934f5269407a8c0f85d5112be5354c17a971/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1d2934f5269407a8c0f85d5112be5354c17a971/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.5937f468.0","_nodeVersion":"10.22.1","_npmVersion":"lerna/3.20.2/node@v10.22.1+x64 (linux)","dist":{"integrity":"sha512-uDuvt5ufuuWu+tMUv6IfCAW4SW/rPxvoGssDM6+HaZkd/C4dfyKsKLE6zul+gp1R5/mmWCpLaCu+vIm+qhplFQ==","shasum":"5b3433cd80d0f15016c5ea5cfd331e872b41b1c2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.5937f468.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoxfYCRA9TVsSAnZWagAAmgQP/iVMzEXp0MIzq4QtApRs\nKuluCdWr/vks2Y/XOMBHtEV0cORnDCk1zDmcovPa1zBEZn2vG/6ijhdfKCzZ\nAmRPJ3JYl8ehdK7SAjIKbvdilZcfAuIWgjWYIRbbmyChUF8hvUGCWZ/eJe1P\nLVnMwPek3Tgtg4s6hWSd8kxFK+40XUQ9RPdxHB4NXIl9ikjMbtIgohu9fFRF\n9sOvrg4AYDCE5XdJ8UCsJd1f1nRhE95J2PyQDWs//JawQgMqmp2R9liB92Ep\nCKn9ZHHtXQx0N5Mufr6LtHRb33Fb8IQmP2s8m9UxmoKti0sdJq97XYO2lwaq\nitm4hsAkcLftELuP5zDJnFoX5lnxGWjVz/7YZRs7lr/Z3dif6GWzyBZCA43D\n1HkQTgVdiaWiy6aKVvOh88ysG54TXBIqyOZQFVaZHsI1Eqmz5G6yC4W/tAkZ\nkZRj4iQpT7vZhDn8Is/NvQecXyg5ZbUsvsrLzh1p1NrPbuFOcNf6ZzqXjHKz\nTc/yPyzigDvKD7ZBtfVxL1LVNPRAoT4r1iq1cGcnJ2QYl+lIJ4KgzJexFqsP\nFBS7fFuEwCTznUwH9807hZV6m9f2IGBp/V65FKmlZ3szdjTv0YROiSWBZ+Bh\nX0vJyuGeX/WnZTNVovJIl3PeZfLyZ662R8LfyeDOIMg3XzDk7VqT6XANYZ7p\nZhDI\r\n=Zf1M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNPalQYg46YlvY+gNdg/Dgg6Qm4jaMjUef1YKN/37t8AiEArk9Rdp7T86dAfP11jrMelExvPCW4vbhJzXbjb3MjYxw="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.5937f468.0_1604523992382_0.5660779947387506"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.a9bafaee.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.a9bafaee.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.a9bafaee.0","@material/mwc-textfield":"0.20.0-canary.a9bafaee.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"672dd0ebc89e93768abf9e9fb4a31fecdd7873ce","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/672dd0ebc89e93768abf9e9fb4a31fecdd7873ce/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/672dd0ebc89e93768abf9e9fb4a31fecdd7873ce/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/672dd0ebc89e93768abf9e9fb4a31fecdd7873ce/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/672dd0ebc89e93768abf9e9fb4a31fecdd7873ce/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/672dd0ebc89e93768abf9e9fb4a31fecdd7873ce/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/672dd0ebc89e93768abf9e9fb4a31fecdd7873ce/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.a9bafaee.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-GLLybcOvwq2eEvxiSzSftHIH/44woYmqbOhH0VUCpElVDXdaCqTOTY6F/VSzvMzmMfaRqHztS3RXPFyHV4bUvQ==","shasum":"c399239ce5a1695d90e6efea56d307c8ee3f23ad","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.a9bafaee.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpH0zCRA9TVsSAnZWagAAtpMP/i1LdN3hObi1zdP1aQ7P\nwZw20+5bDWlcsy7gZmeanGvDWQzrTwQXJqf2FPBs0cSn22GxNQAN/a88hiac\nUSm/vvaifnjLNyixWMTXXE1WSr/Wrr1F7lPSZBl+z9jw1LWewKxB472336uf\n30ec/EIsNutF97Fi1TFYNGO3IsYbICZZhjufkTREjOFH/LiXY9e4WaCasBJL\nthkttVeeCzV/kR/vKcJrsKSTL2EiiSd9d0mioHse9/aF7MnFubm2ngK8oWBr\nfBmF+h7r3OU6rvcH8HFAYYd7iRf4HsbaDv2ScRNfmtc5PB1dY9SHdOSBJjlB\nHJg5wlazic9/Owqyb9pY3nvWZZuiUsuA7VswtmRNnRAbTmQbR7lK7fK7R869\n8fH8Mgh0c7z4o6p0s7+kWT0ifRevqSCnl47pEFb6eBhN+YsN8NOv/NWs1mUj\ntRQGqCHH9OAVwFxHg3hFflduxCW/QdW23XMjH0qabjSFXu2PnVDmvZ15fCPU\np8XrBq26cIUDXK0HmWUOd+Fd9UJGkb+yGRZZimtfEGi/d75fks/7hzsh6M0F\nKtwPDQ3plJzzJ0u8fLKbTUymcld/NNEV+j1Hh3a9oi8qsZWrg8bQpIV1FqdS\nns7f6WL8FvkznZnndnaqOXrn8VhV0LkpXrceRg41j1bisM077WWMXsQKxS3b\njUvc\r\n=PQoq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWtp8ZEg8N06FjeDeAukEmVAp2Qu/nVSzMzURzpqd1cQIhAJw9v4W029xxnjLDz+mfxs1BMMSY1BX9H7XX/HC7E1Jg"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.a9bafaee.0_1604615474828_0.2989113839241211"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.184861ee.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.184861ee.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.184861ee.0","@material/mwc-textfield":"0.20.0-canary.184861ee.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"292f005e510c59c9b761c4120c56e8c9854e4595","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/292f005e510c59c9b761c4120c56e8c9854e4595/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/292f005e510c59c9b761c4120c56e8c9854e4595/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/292f005e510c59c9b761c4120c56e8c9854e4595/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/292f005e510c59c9b761c4120c56e8c9854e4595/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/292f005e510c59c9b761c4120c56e8c9854e4595/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/292f005e510c59c9b761c4120c56e8c9854e4595/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.184861ee.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-j8qToh93+lyTZVnP0ihXInMza+xjqMDZVS79t2OM/k2GGFXPT+M3Ao1ZyB0NjNLrmyd2lnsxpgU1xlAa+4zrCg==","shasum":"d3297634ca384bdde9453776ae793791650c424a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.184861ee.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpextCRA9TVsSAnZWagAAFmcP/Rpuegj0dqnosVKOGzLn\n419FlBqUd23U6XsrkonjtS6UhlJnu0DxL/Y4sh/gWUx5QQ0VMwUwQLfRLK4f\nWYsEOx+GlgEU82iiJhBI487H4eTG/kSIA+6Q42ysmm3sT6gy7Q0SmWhxF7gd\nlnvjaoQ8ttZ9bbtTG8DBYrbpLgIITtYIb15RmqYvD5jNWp0EIvEDhl/z33su\n1mjUY0BKsuXdHLfns7nwuauJza89fCkIIjqVBY8AoQqzpY2jOakhQGBUSMtv\njdXKhMKb6RDvfTVLG+UMmQP8MKOhIlgCP77W6t0/4eWIGUpuXFuXPqEU+xFU\n7HpdW3GSlH2AOnRJDHJP1u+gwPj6CR7plVMhTt3jyR68RV2qgwwt8KPMQWU8\n+zQBDbZaC9l9eWwcFLgtYLh1JI6uJqSqbKW48JUGWHnXP1t2N/ixDpJkKQNL\nP2qzuNxwMGL80NE/GjZHPawWZKoAGvn+uJo8gSg5zJz8SVdWAIJeG+5xZ/ya\nA/T9ruR0+asroULba5vvQoSguvlc2FjLx/mxS1ibl5SSd9HPWYBh3l+M+d6d\n/wgnIcykgeac438n/Hsju6MqaYzE60Rs0xpocCSZ7B29MKT3TXMhZWoKJ8rb\n0k1XzkGKlLhgiADmCjENoDKAVA6aAYJEPUaxiXIl++xm+x1WJ901AWOj4TGF\nK9ru\r\n=1DrE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAE5zziteoblhRhot7TUu/Uo5UbjJ3aXPzBCTz+DjoGeAiEAw3A75ZmOXgtldJwefRB/YjuZvXshEelbnb64mmSonRg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.184861ee.0_1604709485283_0.4161335202190459"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.6c6ae2d6.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.6c6ae2d6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.6c6ae2d6.0","@material/mwc-textfield":"0.20.0-canary.6c6ae2d6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"38ecce3da3f921a8c45ce342e47456c702623761","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38ecce3da3f921a8c45ce342e47456c702623761/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38ecce3da3f921a8c45ce342e47456c702623761/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38ecce3da3f921a8c45ce342e47456c702623761/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38ecce3da3f921a8c45ce342e47456c702623761/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38ecce3da3f921a8c45ce342e47456c702623761/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38ecce3da3f921a8c45ce342e47456c702623761/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.6c6ae2d6.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Wa56ReclGEcZGA/YVT/9zoZeml3/H8MSn5bqrJJTDXbaQb9wck2+1lX7eD4afND9hwgYI2Pky66Drz0v2b8UFA==","shasum":"463b8b40d1bf4c743971e0ae4fec546953555cc1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.6c6ae2d6.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqT7ICRA9TVsSAnZWagAA+mYP/2+Baywc+KtR2zZhtqgu\nDh0xXF/m9j++4YsOC795O0Q/DMWjMK3+W5KXgCHt2h31p/sMiB8nixAkspsw\ncbmVqqcanYP+zz1Ga/7U5faYT5O6H+2DcUYtBdufGEp0uzzSAExOhqFBqBxg\nnIeN+/yXT2Zr/pwLgfnmjdI9Xv5fjOQUDBnVchUv7QWGCId7hEUq6aRBhH39\n9ejz3kW0ssWMvSxzqH6EFZQjyCP7Mgy5RAZpjWvHuof8pgVATu4YJCCCG5Z6\nenJOmp3s2EvTI+m2//fvaHrwvkR6EXQl8u44nXTp7+BOFYUmxff311Ij5V/2\nd1c7D9PmPlUeMAu7n9Nm0TEh7DnuwU5dl1qbQM65JbxzuX2KnB+DcoMcTxOo\nFn8Yq5Ati5p3GW45z7ZOn9N4MkE4x0qeevE2u1pHHKgvwbLdKwvTgUdm8pi0\nmgWxiyBDkbmYRD3Bf6IsLbHv2hMw5rA9vx9DrTIT0whd9NhTTCcSn0apLki2\njSppaiHnXXOD9atvFuOg48ZcWB1g3I2Zpg0AMRtqOZ85+hp8m9OCYyNuMsJH\nvSJm0VyK6L435OO87sv3ypl+GUp668/fS3VBYStOUAMQQr3lULiqb0rDOc0c\nVgxbaGfgwviqx0ab29INtoIFpFBgTpuYyjzcVE6OZA1vkF7zu/B49q3iqhi1\ntYKQ\r\n=W873\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSyp3ntJW8oxZOdhrhMr8jJgi7HpV0/4Q3xCk/jZu79gIgR92is3IvOZ0VVFhO3yOuWxYUgNn6BKuusyWL9XDSyw4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.6c6ae2d6.0_1604927175897_0.3155576431084428"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.ea2aa477.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.ea2aa477.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.ea2aa477.0","@material/mwc-textfield":"0.20.0-canary.ea2aa477.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"44e884f1fa66508713a0632b0fd8052b5a88aa77","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44e884f1fa66508713a0632b0fd8052b5a88aa77/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44e884f1fa66508713a0632b0fd8052b5a88aa77/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44e884f1fa66508713a0632b0fd8052b5a88aa77/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44e884f1fa66508713a0632b0fd8052b5a88aa77/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44e884f1fa66508713a0632b0fd8052b5a88aa77/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44e884f1fa66508713a0632b0fd8052b5a88aa77/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.ea2aa477.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-hFpIF4n7LBcoY79/E0QXw/ofQoBgn7eosXiSwHgX88m74blfsGqqYhwldW5AfJZqVuoalMxfRcv9gt68Eh6N+Q==","shasum":"8400391c730f0070c013a4b9116a51e1b8b83ac6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.ea2aa477.0.tgz","fileCount":13,"unpackedSize":42442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqdetCRA9TVsSAnZWagAAXxwP/ivur28/bYctfQTPr47G\ng7iwwOV8t9DW/sZViA+1wMf6IMsTSCLPbrioGT9zep5XyYfbUoTsXZBXucwj\nYKO+9qNWCPq7A1PzrXdzn35JqzptCDmjlBfuBqy0qmBlsLm0ZpJ8sx0uRXtz\nzQFDRy+nnlOy8rnvYuHN5LG3kNrL0WfZeGGOetUJEgI1Fv1jgvHPMfgeqRA2\noHF7nWcWOPxfnp9Qp0CMZq0qGv+kytni2dRQ8L6ge5G5kPEO5FdVC1O8bXQ5\nrmKlt17u0VaSDutYSdvrBEuNMuWTe1kP9Uu2n676AZ0DVoEZVo4dsEKbsS7J\nTxUUDg6Ir2yr7vbUcXfiMqDTijlE8OTsD9RZtG64dW/UkCcgwd4scHbCCUP8\nVGmvuwZNP4ybbLnW2Ju4Qni8n3YsSOglCMKcfdBddYN7NamagQsGXVHFGVeZ\njhYHBDb3VuXjCJUwkwS6U5DB9mJrc4oMJ5umu/dczyuN7lvrT+irFo0eGaOj\nDDjt9IVFkGX3ZpBjeKbjE7bAUJH8+R2MC8MoMZpSEJxH7cgOp2AcclJqLRhu\n1yyr3oZRPEoQKa4/Sk2zV5JLi1xpjrOAekBYlteaU3rdsHo+8SIKLz/agC3K\ntcvC3aGjpcI07sCe+HblxrboFPN4QCmiwIiivESGcWk+jhCNCpSKCFApypru\nw1is\r\n=jdjg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo8EWetpmMJ6dzsvx32qlT/pwYmzWsVcPrd7u+HgCAlQIhAMT9eV83NJmvUQ02KvVOZQIg/+ozLKdVYqMGmBH/a1nx"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.ea2aa477.0_1604966316794_0.051417811944270975"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.a2c088dc.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.a2c088dc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.a2c088dc.0","@material/mwc-textfield":"0.20.0-canary.a2c088dc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"60aecd658763ef0aa8ea8055ed91f03f6d3697fa","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/60aecd658763ef0aa8ea8055ed91f03f6d3697fa/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/60aecd658763ef0aa8ea8055ed91f03f6d3697fa/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/60aecd658763ef0aa8ea8055ed91f03f6d3697fa/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/60aecd658763ef0aa8ea8055ed91f03f6d3697fa/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/60aecd658763ef0aa8ea8055ed91f03f6d3697fa/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/60aecd658763ef0aa8ea8055ed91f03f6d3697fa/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.a2c088dc.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-q8Pj7uWryZZf3QAV0vX1DSbX2vj/kfCwMeLKQI92gPMq1N4UoMIeXftK86utk4aqxCsR4rRzoBbqJ5qylYNcdw==","shasum":"dc11ef4d3be94795f93caff459400d618307f3c8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.a2c088dc.0.tgz","fileCount":13,"unpackedSize":42310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqqKcCRA9TVsSAnZWagAAxFUP/A9ry9im5cw6ntiJa2S8\n5t6iOuWiirIMTBnwGPAePRRJkCZQt8yJZB2jySZTq49y09XSmrmG7Gmgn9nJ\nTZUoaBh7XpzerV96Iy0OdpByxP++K5/Tl1Tfmye/c/QZzvrqDtzqYGYgoLrn\nLz6KJbm5ifLQHXgR6yLfIAmDuMaqXOdQUVRLeimglPpFVo/avJO3WzGBnWjx\n0biedK/5kWgOLJdC+JQ7tHFuVgMI3sTBRHEoKdxGYuAfV/6ifFqGtielarHs\nNjLkQkMwCOZGIJ6hfYCBFoOUym1eYylzPWsy9yUTf1Nlmzg8OL0bzp9Xurrx\nht7Dr75duTg9Y2PgIFazNNvkf71jDyG+jYl5elHDAqWhvE72+Rb//D37aHXA\nuhXHu6ennrCzQrY99Ztlu4Do+E9uGUnQYl2Sf+EVVTrQ+9ppFRsJ1+GM1GJB\n25IQHtGXB/qfmWbrBSEkZ4YtYJc3VUi8QVL60aMHw1d+plv26vEIAWIBZIlF\ncQ3Qpea7vXmlANZptYO7Dv7sR0tx+byFTL5CisUABbjBfruaMPGJPRuX+LXS\n02VPwxDFCMZXSff5TxACVs3SgzWHPJMvCn1Ubxl5uHjmDSsJwzNTz9KbkkOY\nEBfY6dEPqY58W7pGM5lSWX34bjtt/sLTfuWeWW0S5fvRbI98ryuvHSawLg0F\nDyZF\r\n=yuCI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF64Lt8N+bepDnyT6ei60cEYWEKfbVUHJSMprpiBUTM/AiEAm5rrta8yW++QqAs8TTbo68EdBR/aJXAuuxhotHqEzjM="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.a2c088dc.0_1605018268024_0.43340334362553934"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.b04d71d4.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.b04d71d4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.b04d71d4.0","@material/mwc-textfield":"0.20.0-canary.b04d71d4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^1.10.0"},"publishConfig":{"access":"public"},"gitHead":"6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6c9d3a1dee5f50ad7d82b0f0e59f7c21d9524452/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.b04d71d4.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-1QcITRFysgMXo+SSsYX/UKY9lxxr6NqvhW1KuVd866M6mkGB2ZVdDjDokfrdf9CfdQgNCm9Fl6ql9uYLMOZ3zw==","shasum":"c1665d8b4ceb7ffc3908743c61cbbd6cea430c3c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.b04d71d4.0.tgz","fileCount":13,"unpackedSize":42310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrRGPCRA9TVsSAnZWagAARVYQAJ+3/6AWeXAXGxK5rtVW\noZw8O65GToUyBanyI+xugckXtrvXjAMNu24IUmcsRgpdXYRDCglUS3XfbdAq\nIgtv+UZdQInVm+CdpQQ4ymIceshnRaaK60wNXvuFpdi6HzF3FEmTNCvhw8d8\n0P4RBrECkf/5a66Yl1aU1I03mYkKmKFq7KFP+7kSgr55fYkpyWd+ea6SZYyd\nRwdkNtj0D8lwLwzmxPSwDNTrzTJeaiPLriI6mdOLht+kR4KOv8qnxhwFBPGf\ngZVbsReXvprybFzNe2gZGHpQ8TnTwWRh0tYvJj4irIUsSHjixDiwnlsJ8sqM\n1meelBRrsUuriMndaGAobjn87S9azXeB3yE8zdNsrZ6Y/44BvxrOp5GgBRSf\nB/3BsT0OwPg2XFe4cXUjXQL+otJk/oQlQp9o3fIRYpdAtYixjy2qiy7sf7yE\naPF6Ahq3FzuMQOlxiuEVhzoVphiayQvDlGlZFgexufeCKvHSzfK+2w805zLM\npC/aWb1u8VJQY2jQN6wWOHzfaQJBkZ1aSXJGIQP71E1BFSHcregASYbQGX/r\nDh6TEenLCmT0rb1SP5RwjpgYHJaAWrGJeq9kiCnHUYKeJywl76RYCx597gFd\nS2xCk3YwsSf2ijveP4TYUnel5eFfU//BO2cR28e+j5r95NIjdjP9ZFTZtHmC\n89Go\r\n=y3eK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvVEdmHKCV5xZAA2EO4ycTnjeYbFEGVfk+BupCnnF7ZAiEAi6v6mjRcKfBdjWQua8jhVrNe1UMvdWW7ofAnMmIAnAE="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.b04d71d4.0_1605177742637_0.5101409433848834"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.2c553352.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.2c553352.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.2c553352.0","@material/mwc-textfield":"0.20.0-canary.2c553352.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"7a02baa2ba85467edeb67014cb8c6e5bba77edec","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a02baa2ba85467edeb67014cb8c6e5bba77edec/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a02baa2ba85467edeb67014cb8c6e5bba77edec/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a02baa2ba85467edeb67014cb8c6e5bba77edec/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a02baa2ba85467edeb67014cb8c6e5bba77edec/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a02baa2ba85467edeb67014cb8c6e5bba77edec/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a02baa2ba85467edeb67014cb8c6e5bba77edec/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.2c553352.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-E+hvD3F5P0APFFEcrFiPTkYGByOIoP6P5sLPFVweepIfdq1T35HkUoGO9D/sTHvZ2s3YL234vXWNW2uAxAmI6w==","shasum":"142dcd9ffe7fb4111f875704216ca9c633885d04","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.2c553352.0.tgz","fileCount":13,"unpackedSize":42309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrbp+CRA9TVsSAnZWagAA+xMP/RScMXF7T1IAvuXkpk1p\nooM5pi4zRMgUGTdJ7T+WX+OnFg9mmePXLKArigXrm/0Rsx7tAYZ4lh4d/t9W\nBRZJFGyp06QzvS+Ht+P/CWw/AmexzvP4IbLSwcwUg37LnxAT7ayTyXxdVcHP\nz18C/PCDN2mtO+D7Xma3cdsbx4a1TwgqFdkW4U+7G741fYrexJqdfxZ5olCp\n44jhtx0YOVDQDoBEo2ej1wTMXzxr3ldU3C56ZgA4Eb7fd4vrao1+NjTSr2iM\nRDp8wQ4Y4JdTX2nc2vdWn9QaP/+R7/bUrk6kvaOdQHV2pDYipCdj3raCRHlq\nXly+07KesaEhfXIS9zonA5FuXNA/wHYHGCe5mbLxddvs+vGvVmColWfD6O9f\nGNTEY5r06Yh1g091/O1SPP2Stc/XVJuQRO0jDJ5QPp/rmcFmQ2RdlJiNdNdE\nOOyudR28z+7nqyuYnzcHB7LQ9Q+D4IdOKB0smtT6n3XBbb+jPf0JK4z+RtKa\nDG5PsjnZhEhcGdWT6xvnTDCNZEoAlcPMNqTiAUcty68ZrVV5ivLgdJ1OZ3sW\nQSaJt1EQRKJTvPqycoINLYvqP/nq9DP/m7VYVaHbW9GYZowtb65geobSzFmR\nGnQLzjrg/oXg/LuZRp9QsCR0VTClqpImQNAR9jvRH0Rpe/ia/bDBADQANU/5\ncMLq\r\n=LyfM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUunFk0jflB7QxzFkn+xw19dGZKTwCL1ymP65wvqtfcAiEA5aZpmskowMBRWHGD+RbeMfxmwS3Qkkz/iRaopKv9uAk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.2c553352.0_1605220990031_0.054975870179624575"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.6560d19a.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.6560d19a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.6560d19a.0","@material/mwc-textfield":"0.20.0-canary.6560d19a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2b2093b7a8ece484614a94718cdac5a72d7e9cfa","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b2093b7a8ece484614a94718cdac5a72d7e9cfa/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b2093b7a8ece484614a94718cdac5a72d7e9cfa/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b2093b7a8ece484614a94718cdac5a72d7e9cfa/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b2093b7a8ece484614a94718cdac5a72d7e9cfa/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b2093b7a8ece484614a94718cdac5a72d7e9cfa/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b2093b7a8ece484614a94718cdac5a72d7e9cfa/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.6560d19a.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-tCaawPStpBC9OKVbZGDuYJoCvc8Lb1crb7NbaFLYeYHrKIapZYdxv/aJ48sY9Gmruv+XbKKDlc0UBAnUfjpDvQ==","shasum":"00965a9908b40452645866fe54df5480b42b19d1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.6560d19a.0.tgz","fileCount":13,"unpackedSize":42309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrvEwCRA9TVsSAnZWagAA8icP/0h13osj27DRut2Qn/1y\ng+i1se+LVvK7ExghmyvJKBNzROJdPfainMKnXTrybT3jwhmzNaJHuEI4eydB\n1iolkjCIfhf5vJQykE9yfDkIF6a3FGbXrPAaRpAu9GUq7iepMgfGn/jXry96\n42R/OfRYzZICMkI/jPouiWBuznvT6lNgCkGuNmuGT12wSzm6WnAUfJfWnz0d\n8UTlHm7xn3+JI7jm/kT9meAgZ/RBKCVn5A7XG1/CukPF1lRxx/xCekEtmzZA\nizLSBoLIkQWXklvNQ3ricIZ+cSxQyuGBvajkFLdDY5Mqm2BCBYPbfm0Qf3j/\nbCW6wD57nVp86gwaU2ZlvdPwvHFNXDGmX7SAJNYYr/hmkE82ZooYB7vKfRZp\ncZEo00SJ1WOXQUcF4JpAmCaJhI2G+puQM+ZjPAyRl1fud9Ad4lrr6tr6koAI\np0AS6/qCX/AHZ1YJrqplXiLfoplqqQ+FB2pkMpTHQhJQEBeioM5le2RCVo0R\n+UOrZMT6Fv3BM20D6fov1EwFUrlYokR6MHVJU33p0iB38R22IAPpZsnhAliZ\nK/sRSnCmM2kbo2aRLtOsFDDRqf1SHOgoMjHwMIGZwPJCeja2FVWMjZs05rVu\npUYqOvnlKiZIdOaw6qmOXAvqRHupZy/Vlfg59sRQHg54tkY5LNx6+QYhFmfI\nb/WQ\r\n=Grpn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGvmQuust3hUpv/I+NrUNNel63aErn3osgNc+oRX3EGYAiEAjIgmpK7QmA31zeeDgqL4eGP7Wsn4kc7BaTC6I2hLzpg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.6560d19a.0_1605300527814_0.7417732572945384"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.a28d5ec3.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.a28d5ec3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.a28d5ec3.0","@material/mwc-textfield":"0.20.0-canary.a28d5ec3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"f24283a75330ef6de8cd16f8373ab1bba0eabec6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f24283a75330ef6de8cd16f8373ab1bba0eabec6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f24283a75330ef6de8cd16f8373ab1bba0eabec6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f24283a75330ef6de8cd16f8373ab1bba0eabec6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f24283a75330ef6de8cd16f8373ab1bba0eabec6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f24283a75330ef6de8cd16f8373ab1bba0eabec6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f24283a75330ef6de8cd16f8373ab1bba0eabec6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.a28d5ec3.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Z+A+9619pikL6jitpMgKF8rD6faTEglZEMk24b8+gIM8H9ZquCHb9sHCzsQUJwIw71HyDJxTiHPObCriQrGPgg==","shasum":"a3d2f9f9ca313d6d032c8324f505aca1a2ea0197","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.a28d5ec3.0.tgz","fileCount":13,"unpackedSize":42309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs+srCRA9TVsSAnZWagAA4xoP/1QyFel6v/6I6K38kJCH\nARh2h5VC1r3k2jbdODDddOnTKBQsJakGSnj6soir+IRAoHLURqRmIQwJ2I0m\npPfFgG64SfC+WjBeSDaR7vTOQvkPEh/2Ufu+/SPk4wnDNmGtnM5kXbGU/BWW\nsS5WhRLqVFViQ70eAT2fOcejrMFBQ9ssqJ0ug7sxz8WlUeUaw1YK89iXwLYJ\nDLerFC2ArZSN/FNHZ9wvKfWvLDymhqWymhbLShPbKNnJCZwB1VEKw6s3Wf1V\nbSib8JXUvskwQbmKutE+3+QbPJRMsnXDHFhruQ+4jieLgzuBEFSLqd0RkYSb\npn2cweX9iblbOJCG605NiEfKiZB+dXLbPhvUJs/bdeDY5pEHMHgEeqI3r1c5\ngNwYZf5slT+URvpJOpq2rnBOLAZoHmwckEvu5kSOqAIk0yxD9qLTSwbRMyWj\nOI4yZHoE2oWRax2NeZCaagBozfQrB10mtWq87nM6lTL7Lt0tMhBFXTqNay+V\nJF5K09qfvq8Jt0rha1nK9YibfABVqYRcKX1oAmC9/r7S2uDSbHmZUDViyZaD\nnE/fT4HWOJlTFc2iqFF5oWcYEGNQfmhUf/IJtuEkg/TFtgtV7sq6mG02faKU\n0TeAoMAAvMv9RSmQgNHASi4UVvj7SPxAJ53Mi+QKljlVkIIiUecAeg8lXom9\nijvX\r\n=0aaj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhQTCsIv20vgsP3Wu3T2XHg5Vso+MDtOGG5ce0dN19NwIhAJxo7kvc0xo5JzmOkdnqb/vkLdombztgYcoWFZMTmo9+"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.a28d5ec3.0_1605626667111_0.5070324208504571"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.03e7e778.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.03e7e778.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.03e7e778.0","@material/mwc-textfield":"0.20.0-canary.03e7e778.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"b828c4befe76e485a57dc3be64c348c56f37f89a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b828c4befe76e485a57dc3be64c348c56f37f89a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b828c4befe76e485a57dc3be64c348c56f37f89a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b828c4befe76e485a57dc3be64c348c56f37f89a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b828c4befe76e485a57dc3be64c348c56f37f89a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b828c4befe76e485a57dc3be64c348c56f37f89a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b828c4befe76e485a57dc3be64c348c56f37f89a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.03e7e778.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-pWBnjF5+VyoH/vNrj25QPNqZ9YolRp1eAohRtQ6pYHMQ+5iyTqySWRi6Fhlzkg+eRJxeMpsgWGuwXE0MvhDhTA==","shasum":"65da9e8d1368cb8e85d2719917c44b7e7f5861a0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.03e7e778.0.tgz","fileCount":13,"unpackedSize":42309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftCPwCRA9TVsSAnZWagAAKpsP/jhE+iC9XXdwKf3z7uw1\nK+d/G4GtY9X4u+P0Qi5KRwGtNp/eYKsE0a1nwmixIFVS/2vVzcDF98+7NkAw\nYynWteGmWp1b8nNdZDFNrJv4iLuJQ/7HcC5TcY5npFc7YDTurKuxgsPMBuXT\n3D4vgc2HrM0S7aWkMk9JTAkOHLSaAtZY+zTWek14B0JvB/ekRkH4kVQA0crE\nOeZWg7WIP7QaVTsQTP6p/erJFGVHfR6E4NumxBuyrXnExBFrWuzO7ig3YKhf\n9tPal5Od5RahDaLHzbSDz1Ty6HBUKSJn4Hfc9P6tzjJPCEvZkiKH9aKTlbW1\nO+j89NjU/BXXxgRTMLA6avUEYymy5nGgvlQE93JQh9MzVmf/1YyHMp4X7BFW\nATNTsuT0W78dBPwqK/tVz6oo144sRK7CtBblwYvJR4rkwpwm+tQ690c+8yaN\nERv1NQfEzINFSzolZ9ngclRKYv0IcNEhgOANzOdxApC5aWLyBFnTwVE27bIX\n6D4+0tmAAVpm+EvBi1cAcOEh+wQ5ZKc+YKjMmGLk19lNT/NOsA9E9rziTeMQ\nxcnMBMVk3PQuqw480/TD7HWO9cS25Qj1tEwCiD5Q/wIlydyJ7zv9s4RQRsUX\ncSMJwet/5ZvPlqgUDT7IdGD/EoLwU3zwkbiJY24RJST/INxWA0oSw2u3Evyi\nFjVo\r\n=DBiO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD721iWjVkSdp6DlQFFz2eojouQ+INFqdMzbX8DVDSBHwIhAKI8DP2yqB4hP21m3bwDUt+JvJax3+lkTSFi/QHWYo/F"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.03e7e778.0_1605641200604_0.9498227832765702"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.ac8ed597.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.ac8ed597.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.ac8ed597.0","@material/mwc-textfield":"0.20.0-canary.ac8ed597.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"324571445f4ed0575cda7f727c54e156bce8d624","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/324571445f4ed0575cda7f727c54e156bce8d624/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/324571445f4ed0575cda7f727c54e156bce8d624/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/324571445f4ed0575cda7f727c54e156bce8d624/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/324571445f4ed0575cda7f727c54e156bce8d624/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/324571445f4ed0575cda7f727c54e156bce8d624/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/324571445f4ed0575cda7f727c54e156bce8d624/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.ac8ed597.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-KytvTK4SwxKc64pqWPgHySKAlQto2oW9TkeKFVKhxz30saLk0xmczok/WMyccdN/0RpYEcWbwY43DX5p4TEBMQ==","shasum":"12106a5d43f61a3de9a2d61165e17a2ea1f3172e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.ac8ed597.0.tgz","fileCount":13,"unpackedSize":42309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftErACRA9TVsSAnZWagAAQ/MP/jma0/JzrgqvMNy2rjtz\nYRRECRh6ZX3/iihtYHheONRZZBkRGXzBYCzAiix9UfiKyBwrMktVna5HkQhB\nDZq+0bQTTXzy+Wtq595yt+oITiLEfAY648lZbDZrQHRlUWOKZBLKYm69ILTO\nVrAvSHITb/pfNYhm+TzHaWWQ7F4UkE3+45d8EhaBrjw60zgbf2NM0EtgRKuh\nbDKSfJc2V/6yfSu+9sRgIM+3aI9JCteuZRNsbh9RxaS05Ji5bn0s1sNVfqUh\nnkRBb8k+VlzQnD0eU60ywofc70EVYMA5bqEsedgcJYjV/bkoIbZRwXH70QsA\nytPq/JDH14hauzD8GEY9JMu1MxzCz3qnsMakIdU2WwtgBSsshOnFNDsrmfgh\nn1YVIPmfrAn+uC3L4JTaGaogSrMZa47j5ZSUUAR/8708KS8uPW065HVf9oDr\nelnAdyzu74Y/PYgIr2MY7R22VtrzFd8mdpIPGMxxV0iMF8sgPzaFyVlPHzhd\nHHbo4zwBqvcEONDUFT3p45mXg+lKn5OgSyMZBcE9ncQHAXKIQPu0DC8iQWqI\nkyBR+E0EbdgaR3kUzmF2aIQ00GdNGcOWNcguU1Upl9nEv3VVsM4W1ifYfhCj\nRO4T/+6gA358c+CEj0OeyamFr4x0tzqkGcqDfKp8zDxnhTfSFjQSqO3mXf9i\nn/CG\r\n=PNLT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF6gwm1q0TzA9oHOk0QkiBrl5JeZcX/yy4YGWZVKncT1AiEAjkb3JXVihQRsDcrHscQrOMcPHs3K7pfdywqIUZI+Lro="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.ac8ed597.0_1605651136196_0.201442670178682"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.b6a60f60.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.b6a60f60.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.b6a60f60.0","@material/mwc-textfield":"0.20.0-canary.b6a60f60.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"423d1aee62c72c8c88e9e5e792712bc5d4d10b13","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423d1aee62c72c8c88e9e5e792712bc5d4d10b13/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423d1aee62c72c8c88e9e5e792712bc5d4d10b13/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423d1aee62c72c8c88e9e5e792712bc5d4d10b13/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423d1aee62c72c8c88e9e5e792712bc5d4d10b13/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423d1aee62c72c8c88e9e5e792712bc5d4d10b13/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/423d1aee62c72c8c88e9e5e792712bc5d4d10b13/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.b6a60f60.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-hvhlVZJKlV72uInkvLfBIzQfz2BhQ+zS3YvP5RpZwiab9Uz0k73j9fyvoRCwrSNQ9f5PmcekOEyW/sdMN+79Qg==","shasum":"40733f6d7692e1d56e48e7da622eab0cbeb613ef","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.b6a60f60.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftFQyCRA9TVsSAnZWagAAauwP/R1GTElN4Pm9t8xDrp0H\ndth9EQt+p2WdJHYhlEsay891oxa9SU26rThGOW/zGDgZZlsA2zeR1IBg3CrC\nmnirKcRgPNm1lG69RNabnVhxn6L4d8czoA5vDtYGDJ6bRPTBlvLLwsSeOM4s\nn1epws4wq2MWaV4+LnBI2azZYkJIbWhCfBsKzgPpYp+S0F77mXtcPtEXpjVJ\nSryNttw7/T5TtnkaLZMoBKa0GnKmYXjnFPANDongoeh0VeVTR1HQVcufQ6Nl\nFDAYuV/Fd+MKurBdzMXxzp4GUYH2HthUmJZDeKaZ5cRe9+hDpCvpvV9emU24\nGwUSHduQxeFaen+atIs1kPSFo8jGPcSMoPimHm1mVDbJQ6WwystIgGc16dJP\nISM65VCGgEuh8t9/HQnpw/ls+qQRFSyZhIQ01TXpsywp2t4/htKRD0sELUa2\nbkE6VTSdTMKOZ5cbNTYKXpyuf7UdMmp/JY0SeT1XKJsR2ZtlOrGazTC52t/1\nBjOVjlWRtITOAfLo+5Q9uJPz9dlDBzh0ISfiZklqUtlQNN12AXM32Lv+4qTO\nvcZuhxIOA23izVDTGdYNyL6e5j93717Eoy2YiAjraJ9sgaVXgVkai2bZMBcm\nqhXOmlJO8gk8k6Kh1SZ9XiFf3qQvLpImdI8AxsH8I2cfJdkGi/GVH9H8vHWL\nBSIe\r\n=FnLP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmwQnB+JcvqjCgLIgo3Hmkdv/593wP1ZPAPvuNOygQnAiEA5286Gj+1tbUYbcWY19sFHw7K7NdqDTvaTpI+ZKB5A9Y="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.b6a60f60.0_1605653553747_0.6903147905830491"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.71cc24fb.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.71cc24fb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.71cc24fb.0","@material/mwc-textfield":"0.20.0-canary.71cc24fb.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"04fde8dbd7934f14927b0407ac285d7396fe68e7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04fde8dbd7934f14927b0407ac285d7396fe68e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04fde8dbd7934f14927b0407ac285d7396fe68e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04fde8dbd7934f14927b0407ac285d7396fe68e7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04fde8dbd7934f14927b0407ac285d7396fe68e7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04fde8dbd7934f14927b0407ac285d7396fe68e7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04fde8dbd7934f14927b0407ac285d7396fe68e7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.71cc24fb.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-awCpg32T0NKLTWzMGyCPUPKYGSjgKU5zWNobbf82jgsii2HDIEgB2YYMkHKujjCsIWtfSigdm7NBIBUipKK9KA==","shasum":"2c017b567f96d01618ee99857475e19cc8826e9f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.71cc24fb.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftFn1CRA9TVsSAnZWagAAC4QQAIF063UfjdzfrYzmOZ8j\nPUm4mR/pzCWzjSKqWp4e9HnMZRAkLAMJca8L16YpspD/J6XlNmTBNJJde5vv\n3b0TH11xD8k9xoSlcbJXlO04VrCDIkHC4LZ8BeKTHR7OxI9wfsUOJdRZujoR\nbFTreOQ0X6ickUvTlSoR+O0B4OU9vKf1ACtFcla/yeK5x74CFdlIH+WBhl0Z\nAUnE7aKDwFLZNpXBUUs+QOD0jpD8F0J8vg26D0tE/RsbogwdgjYu/eEp1YGi\nTXupArTaIv4kdNJ3IClHpn3JyLQzHMtOnxjNtxbzmUQRM0ICKqSvlWOMKD5y\nFol8y2MbSmhuKxLXbAfLeZR5Y+2qI8/yyNNYV9HXWd6aqZxSAAc8kJ20NVTU\nVVJ4kNcw5+XGz394O1sRAPLEUNlkP8lUCaE0CYkDz52mIcnQ5/fmoWwxST98\nxdcie1o6g091dfTideV8jAK4d3YRFcGIWXLOE4eNLgAarW1pB+lcW32H1Lzt\n5q/5v/eErX5GEJjKfzvxwxiQIxXMZUJh4O4qYI67Hmuq989GKQzjViqFrMWu\nXRYR6b67x8xUOppiueawpffxpxA3gqJ/V+6H2WAWyOyx+IDkw5Kmo9IOM3tg\nqhThw6mgdc8KWQmxLng0vJGr30J+HdRWcIxB2E+YhiKglrOZqx2AX8sxErx9\nTb9Q\r\n=Qap1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbnFTa/AqdUht5z7+/EQy0MSo7q3oZk2GPXBJrb2Nl0gIhAMM7UbDec/K8E6AcLAqf3Bt3iKCO4aCuWH8ploTlxNPF"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.71cc24fb.0_1605655028607_0.6442592086243544"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.761027ff.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.761027ff.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.761027ff.0","@material/mwc-textfield":"0.20.0-canary.761027ff.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"eef81b2f51aebd88194386f191f7a40e504b6a70","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eef81b2f51aebd88194386f191f7a40e504b6a70/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eef81b2f51aebd88194386f191f7a40e504b6a70/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eef81b2f51aebd88194386f191f7a40e504b6a70/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eef81b2f51aebd88194386f191f7a40e504b6a70/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eef81b2f51aebd88194386f191f7a40e504b6a70/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eef81b2f51aebd88194386f191f7a40e504b6a70/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.761027ff.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-YivLpV9v4foXtwem/YYHC7p9O2kvTX3fz15txNrdGB8ItrrtFa5B/g2Hkxm3nGWn0lMlh6RH37ZysCaHNcYSGw==","shasum":"7f11a168165d595d7e0c3ae965367abaf50219a3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.761027ff.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftZzKCRA9TVsSAnZWagAA7+gP/3f/IRVc8U7hj3KIY9f4\n3LoWX1oCl0Sk8CqNBD+o4m7Zd2qZUf0aQ5gMduGc9G7SsPQa1bcsr1jtqRto\nIJLz9OBurlq/Fl7WL0QI5RTHHKFpZomUoFBDvhKliLO+py+OpPoJj4+2cv8L\n6phYnrUj+wTOTFuIRvqDKJG9XOQZTtdgq8co++TFGNN/tMiQMtx5qCvib+AQ\nUZ7WxdlJyrpvLmT72bp/SzwkFh9lWGWJxs3TbB21DSik0kU0G9kvjBm89gBD\nATotexTLJLDkoGoUv3AWjnscbMoKv1BoQmKg28TneffomwWzsIi8vwZW3LNu\nxNe307d8i6BaCLZENIWHq4+LvvjA/BzhmzrJpghTu4zQsuZUaEwgmELBcjJT\nYJbTpOcn7Tct9WyUBZACAq1/5WC9LO9vF6+LQGGvdtzvRXw6wU0vL/5kkGP9\nbUpBg1I2FVy8tRTn9Ve41s5dkLN4p2fHkXryqXxCnC58YvXvCikzp81EaiSW\nThxtJ0taWlnOSdOuBiSWvrRLDx9nvWtIMycQxdS1YVhRpesijj/S7nZYEyST\n02KMtIftRdKNVcRJa8nO60XYDslsMjeUijfNymFk6XocejZ04/CvPQxNI1JO\nDQbF4zmuVPvCxBzstspHDn1jna7GWqq5Z+QM7c4qfOH5F4gzXYiolWLJhUSv\nxJQv\r\n=nHtv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsJrAEA6dInuWfPsDV5yi0IQ1Z88BkCRkYfE9ewez2DAiBBrScM7w4Qf+86ErlUJWgkRX1ZhDfooBIR6hufNaesQw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.761027ff.0_1605737674132_0.08550229786675945"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.dc93d04c.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.dc93d04c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.dc93d04c.0","@material/mwc-textfield":"0.20.0-canary.dc93d04c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c3e20c69c9dd47eb0b31f0ff51e8150d8d27ee3e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.dc93d04c.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Ot0d941ttl8+TmD4B/IkUpIo5s1fhz02Il2NG0uJ+JG1FIclv2gb+k3F1x7U4GeotExKAhWjjIoyD/RJM8aUXA==","shasum":"4bc94cbda82325244f006703420152883e64425b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.dc93d04c.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftZ4iCRA9TVsSAnZWagAAUx8P/j01uas+Kfm4E7uHLc6e\n1grMtSCUHIgWdTwF8paIfrvlk+R59dlnRBSodljM6vLY6UkU/1EbChrj4fQu\nOD63jVm0mEe4Rf82RNYq0zStWwRoacJtoj7hdgXpiY3RhhJgYuIIpU+YFDxb\n8E+/m840CxnEJuhr5FKAfdMhHut6OonE7Uu+mgfbauFFN/3EHI0T5Is8FXcX\nWJYPGTvOOT0GAfDg01TZ6Upc+fp3l/ZPVpsQYka8DajdqROlejYtTW9hqQJF\n8rZzVsGbIFw3NEZ/njTFTDUFJjUhj5jjVV587ful78oT5P76e7MGbYvOgGVU\nEpnZCqbFzsYrgw3SIk0hrt6pqf/HnwvrFbMATerZ8GlahDVdi6W36sIrObR4\naq+GfWP6DqBqozWh/ZGunroL6NQQ17ynUNdHrOIbpsWrpMD/H8q/s9lGjyJv\nbFqwrUhOOzOPq0BDwqi7A5y4F075ls+ETd0EIxQx4cVLxhAWR9vG3+sZo74i\n0l4eMLje5r9Wy0GmWs+ca5qxP+gUYOR6dFdz8K6JsPN0O/KkM/ej0wss23PV\nJMN/O5AqXYaxQfGIWxmETkAHiv4goP+QlQAuw+Gl/XdZZjkAmzfQ5F+u6hyn\nSUY83ubBtg+IaLkoN/0oMFCvtRvrRm62/KdWJ9s2UwO9X5QyLZyYVRimLxXh\n2/f5\r\n=1CVb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICaZ3qj73y7kzbu67IvfR8gKmxPezd5o39eVRzi84V9AAiEAoyuLH7ekb7qSgcTgmE5jZ7ABwCj5t94Q80TQGVgqQ2I="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.dc93d04c.0_1605738017757_0.06460490235629357"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.4a5d4eeb.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.4a5d4eeb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.4a5d4eeb.0","@material/mwc-textfield":"0.20.0-canary.4a5d4eeb.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"6b9b0de3adf5b550661d63baa970642b71da5fa5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b9b0de3adf5b550661d63baa970642b71da5fa5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b9b0de3adf5b550661d63baa970642b71da5fa5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b9b0de3adf5b550661d63baa970642b71da5fa5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b9b0de3adf5b550661d63baa970642b71da5fa5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b9b0de3adf5b550661d63baa970642b71da5fa5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6b9b0de3adf5b550661d63baa970642b71da5fa5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.4a5d4eeb.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-v1U/pFTi1fP50SAQYUu5wAi2NJrQ/kHMinT+sVLlP8r1dGf7ZbVu75hqjWxdF9RHvcCo0KtYskR9BR7pSHhXBA==","shasum":"ffc74676e8e5c47afc714c4a7bcdd1302222ac35","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.4a5d4eeb.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftld4CRA9TVsSAnZWagAA8d0P/2sRER8jdzMgXc6ATu9I\nl+EiTFDIi/WSwA2CBw8vBSG5/CsAuyQTsstnT41kxNHJHuJbF5JxIYNDNHrA\n/oAgvzDqqO7yZJnujP5UkuR57OewTkAg1o0x4Ha47XvTY3G9tF2UX268E8XK\njyW+tVXEc2v0glpNSbZf5ywKpSpdkUSVxWZAov2GxNPI9XOrKmhLoLM1wOxq\nhFwuNW6NfXK9DEMmNvOSAAF+QiwUQR36jS2+KOLcu78GlRorNu5JhMwuBbiR\nnkXEz023w6rCstOxyovwZCVRfcOObD5QvP9t2vJXL/GKc/HYjIn1JebZSM7P\nn0UqPdgmHhpyeGlcX6xhNgmwP3hCt/ZAs8Da+KlI9ORZMf1TkOGMDx3qtcf4\nAEcT40W2220PAfYOO50JJN+kjqKnG1DtNPcTlkjBpIrFzDmi45zthh4/Xems\naiRjpKMSQ80wKyiMsxlOMuJGh1kPyCHx4Uw+7uaktLftTB91aT/YVBBD7nRI\nAh6k40X02JFGT53qvXnAXPA11YBvbk4STIUvIOE4QxFUh3LVfw6qb9bAkxKd\nnM2PE+Y6ld9X9tOMi6j3XwwSMP6JqHAidV2cGN8StknW3wPWnL/ANVNImVsR\n0199bpk+FSawtR6/7WDXtgqLrvsuK6gIt4h2Kp3iX+4PBWYplas8iKB6fFR4\nXZth\r\n=Oasg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbXEqOJTf/UZ7HyvRC3J7VnUXaswEaIdqyqROPZnZOWwIgYe+9kA/6j9jPtO7RGR1/LEhO5R50IFqvbccJcgYDhMU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.4a5d4eeb.0_1605785463971_0.06368819847131713"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.bd176a15.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.bd176a15.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.bd176a15.0","@material/mwc-textfield":"0.20.0-canary.bd176a15.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8c9d27b834d60d0f197616dd1acd74cbf2cada07","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8c9d27b834d60d0f197616dd1acd74cbf2cada07/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8c9d27b834d60d0f197616dd1acd74cbf2cada07/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8c9d27b834d60d0f197616dd1acd74cbf2cada07/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8c9d27b834d60d0f197616dd1acd74cbf2cada07/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8c9d27b834d60d0f197616dd1acd74cbf2cada07/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8c9d27b834d60d0f197616dd1acd74cbf2cada07/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.bd176a15.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-5aR8Qh1qZjFr8lhPzAnSaApltQiUFpW964wD4Z3Aktf/h6mt1oD5usOJqwqrpIf5fH3wM02t6OuXn2d0UAqg1g==","shasum":"bf37d141700e389bd9f98ad9d4653e49d0443774","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.bd176a15.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftsM6CRA9TVsSAnZWagAAt8kQAJAXfsijw1YUaBkVS6DC\nQNf1pEh2un6vsT3uPPPv0RHg+iYKCU2BWr/jh1qPgKP1sFMPDNwNAkq5SsGe\nwNV7AhGJu9RkjIf6UQS58vNLxeEtNbFhAtscyhdWMyPWAdjYICJoPM/lh3j5\nqbee4HPycCt1jbC0+Rit+1mVdzoJ1dF7F5av+QlTBZI4pAwF5tga+02Vs/zr\nc1Lat3x+U71ogwv+BhqMokZ4kYfcpO3WhCT5tVhv83nc6xyWYbLEyX7VdPEP\n2xkRowweB1gXR4IJHHqrpDgfgTzKlYEANzpXjrQnREVLniTDu8/TVJVXZQuy\ngpZTJ8QEWqRxiE3wAiIXSEhsmdJNBn/8h8Fc0WxZKxBrOGpKpHQfqQnIBU6D\noA+eRwldyZ5bzU0EymW7KKxgKs/cN6F3dtJul9yq1aKY9Qgbb6P3z4hpPM75\niDph+whKD3sRjP3hr6dSPlzy6sEEE/byDllDJpjbUEegUQmlyC4ao3jx8XjS\nX/kB5tmXfjVR+FFQlsSZPZrsrT+l7X+NWwfVRXTo/68SoxI7bG1UctoBF8sj\n1U2lPWfdttwSbunlaM0qMBtXzKgU/MetLmQMelyBtIiNlGojJIdLDR4iCkWr\nbo0eHZiiKx2qN9Ig029AIKX3mF6ulvgo76abINBqlwtD9yxqXlXQ+kJDaoZq\nzAAd\r\n=vPGA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICADIPbyk5tfx6PgxS9NZOQY2kBjl75OSsUX/AjdJ05+AiEAoVIJ6A7cpcfocD56EybQ2Z2L2j2nB05qk8+0Jt8tdSE="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.bd176a15.0_1605813049976_0.14563040524252813"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.e85aa60d.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.e85aa60d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.e85aa60d.0","@material/mwc-textfield":"0.20.0-canary.e85aa60d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"3a749ec8278eb0b5833500696f08308837328144","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3a749ec8278eb0b5833500696f08308837328144/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3a749ec8278eb0b5833500696f08308837328144/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3a749ec8278eb0b5833500696f08308837328144/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3a749ec8278eb0b5833500696f08308837328144/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3a749ec8278eb0b5833500696f08308837328144/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3a749ec8278eb0b5833500696f08308837328144/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.e85aa60d.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Dbun2i64OqvqQdLubCZX1KjIzQv2jC1gLPu35EWLE+fXT79jl4HQDM/4eFDLCnhd9wRDNu2O+/a6vQsG1P7Ayg==","shasum":"c038d8222677ca28f23ad34e0d38c0f76f4a69d3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.e85aa60d.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvDbHCRA9TVsSAnZWagAA9D4QAJOTgnH0kID+O9GhXa89\nbCd+OHxfAI7/8XJ2jTInZqG/5YKNIjDIJOFpUVXCZM1DJuN6xZX9PeOmvCl7\nAN1FUO0z7XN5DoKa0XLMprfrA00rdbEHCQ6Ih6F43eAHBosX+scidYpt9ybW\nfiMc91w2/oSgyayS2FvhbTOTPT19ghq2WXnPBqOF6ujzrvrCPWukTNkerphl\nZ+DViB0XDxk1mU9TwlxaRGw2Ql7eaAxl6X9QCIpkC7EqVjKcoFkfBE7jvEWn\n6Zirdi1RWFoYjHPGYdMsYSElVU7CfX2EMG6Y6PF9uE/OSGyXRoa6J6DHVKyM\nw6U1k/i00oIvSaWuJptO3bE4nOhwKnomWIa+sH2XELVBfA6u8wFoy7aT5kS5\nRsoUGVIMoy2L1lclHGQzBNY4FMWK8XXW4b4byTF0aCcWFRi4NnJLPwanZxx7\nrv3fA9UepvRdagzAU+g61KVp3Zun9uys0LYmv5D/3Ln9aZLSk+QpXdRVi6rn\neQO4KfmAot1fbzcWm1FU8FIl2f+jYMDvuITlD04yNxVE9ZngyvsZQ2WmM9bx\n8X0SBBEtpbJoYUxVl43XzIWrdlfJkgb4f7x6cMHRxK/GB1nOKHsr1azoFyMf\n5cYAYb7RLSE1exQMyvjbL2me4N0SHYTBvqi8EMI/RFVi/1XVKwgsHEDrGZhg\nACXz\r\n=9t0w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAQKqmyjYTWh2OxBrt1cX7aigjIyj1kIJqUB60fwuULwIgBFNxGXvP9YjLB9u14KcX7gJKm2r9nKNaMp8aerqjVL8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.e85aa60d.0_1606170311147_0.09674520794331842"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.72092360.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.72092360.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.72092360.0","@material/mwc-textfield":"0.20.0-canary.72092360.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ad7741df1b6ab1f1eaee400d6026dc5ab7821d66","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad7741df1b6ab1f1eaee400d6026dc5ab7821d66/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad7741df1b6ab1f1eaee400d6026dc5ab7821d66/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad7741df1b6ab1f1eaee400d6026dc5ab7821d66/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad7741df1b6ab1f1eaee400d6026dc5ab7821d66/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad7741df1b6ab1f1eaee400d6026dc5ab7821d66/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad7741df1b6ab1f1eaee400d6026dc5ab7821d66/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.72092360.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-NoH1xCKRVN+zsjJKJpy2//rqrcCBke72emX+zS9S7myERKWvtdkg3lqfgBVqQcGnkov1Gnq0H2T7aUzU+UswvQ==","shasum":"1b62a8989c2d1cde879ccb1125168946663bdeb4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.72092360.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvImYCRA9TVsSAnZWagAAy5sP/A4IpWdN+fe6RDERoFWR\nIkxL0T3Tnr01X6hAEkLarNpDctZ7yMjHKRlH0XN9giH7alK1ZzjsQjVgJnnK\nvYw3TLa9A40SON9X2GLMoQlTG16mjTTqRa5jKejwE/eJbOqaysqN7olUKGzm\nNeuve3qK7BeZYG+RE1Ch5Sn2S3O38n3uREJm2bcSl/R2afMZRVOmA1XebP7D\nXveuKBrSTMH1ZJFK8G1K10r8KUy2OnX+7JErXEIks6VfFxidIM2wzD3+svBm\nOiXAXii6TVzp22iNO1r75H0Tdlu//FT4hBQ96REITSvSD0wFUvpgXwu2sZgS\nNyIHZIGKU+VyL9fh/q9/zI1smH6KUvwg5YAu8tom1kK/YNEC6WUarJW5lwzc\nzl6zJXZJYxDhssjuXck9jU0IL7aOXK7EJjEDHpkrKl+DhqjkjTY2g1oFzHTB\n+N3ELCV/dbaRQeJL6T4GXuLTOjQIeUdprRSx1RinaPJmo2CRpOI+VMkPHHHq\nknSONMED5dW4YT7OeXvULXnERgP3Rz6Wm/YNepdaL2N08G5s0N3OCfrSzefA\nFPc/H4u+mvWuLFa4PZjmfOiBrqggJjXrmZcziLG7qUIsYj+K9aiK1SEw7KmN\nJsTcq9uw9s2qI5mMN9b/L6m/qeQ0c9AsRW4b1DzJlHQqVefUQogvGV6lDFMj\n5zIb\r\n=GJpF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4M1G9Z3J1Wxi2FgwIypV/azLw1YkXDQS5lEieB0mbjAiA8B6TBZmpjHBkqhoBVzRBgrE3RbZd6TRdZf2fYjUEiYw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.72092360.0_1606191512437_0.4615719262225517"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.baf9d39f.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.baf9d39f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.baf9d39f.0","@material/mwc-textfield":"0.20.0-canary.baf9d39f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"aaf8660af2b57dfe4523a224abf621deb5b5d3c0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaf8660af2b57dfe4523a224abf621deb5b5d3c0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaf8660af2b57dfe4523a224abf621deb5b5d3c0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaf8660af2b57dfe4523a224abf621deb5b5d3c0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaf8660af2b57dfe4523a224abf621deb5b5d3c0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaf8660af2b57dfe4523a224abf621deb5b5d3c0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaf8660af2b57dfe4523a224abf621deb5b5d3c0/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.baf9d39f.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-6FLHUVeZMg3IXvzhPDtws2H1tBN1YQgYV2g5Tr+6UL4iljJmDihpO0ySlUOkrSZ+Oq5hEGU55m3uay8f+F/ekQ==","shasum":"0ffbfe330d5fb895227de8358275aa32fcfb1a63","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.baf9d39f.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvtFLCRA9TVsSAnZWagAAUZoP/2NlDd7SNc0kbcUCjcA/\npehn6uAMUDOUDnaQsNSffsNBBZ6j5qqN7WvDBtBd8w1Kh6Fg183UN0P+0h9M\nzrb+prZqLjF31nwMZA8aZg2Qo1F4jxr8Pi+Ji0b1U1NzNiNVPVVh9RNPtBJa\nuQdB5JokvChbJ2aJ2qsb/fV60kBef9kUGOBadpapcjHeG/gqG5SF2GJWOn9e\nZZhN9p+AH/suUJW1AAKLHll3AeB98JZuj4xHyXZ5n94ukWfdc1dPIbCALYBI\nUgfmbHWXAjsGGI54uqHifh8oP9tpavEk8k4SGpWN/IVcFiifejqC9Q7qZBX0\ns7jVyRCGolPrkUA8uRT16kveKVSxdhHMvU5+KDC4E20JNoLF1nnuBeWadwK6\no/RFHTfqNXIS1EHPeExwuUxGdic3EobOwc10gxCeslPThhZsMDkr/ClLBLFC\nPNy/4moIDtDzYmggGYmpRRgffh3uUUUdRa4uDkf6ZKDt4vXEz4EjFla4qttN\n7yUu7dRO6IdVLUYhKO8oVW7hTEl6UcZYGxR5v5MerjlQH8BYcqzj6A+JURGs\nITLbHCHL4qTzoilUt+Pc4lVTOYTLB9I9BGGBZdOQkkr6ME/pFqPv3kdnVW+n\nXeu0RnfcO70kKJIOPlUM3L6MG77y32V/WuOmygu39coDFpR5EOd/gtOyPa6s\ne/RB\r\n=uwxB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZwuIz+5m1VzVNL2L3tohYqpoK8f4IMucJMBbykG4YfwIhAMwDmjz4a8MVPMZir0n9Ps0oU6cQvYLKf7BeF+yl0lXk"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.baf9d39f.0_1606340939047_0.9071048023680657"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.51aab0ad.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.51aab0ad.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.51aab0ad.0","@material/mwc-textfield":"0.20.0-canary.51aab0ad.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ec218298fa6cb371e229348142cfd266d65cbfa9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec218298fa6cb371e229348142cfd266d65cbfa9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec218298fa6cb371e229348142cfd266d65cbfa9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec218298fa6cb371e229348142cfd266d65cbfa9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec218298fa6cb371e229348142cfd266d65cbfa9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec218298fa6cb371e229348142cfd266d65cbfa9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec218298fa6cb371e229348142cfd266d65cbfa9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.51aab0ad.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-j2YrTKXApoh5uDsHj+LQGTdpDOQHzxsmiZRawsaaoD5FbNzBamZgD/65jwqYl8pdCZ4/FeZGk7bZBj3YtqEXgA==","shasum":"fd10ac7de4f30cee85eccbfd55a968339ec055ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.51aab0ad.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxZbkCRA9TVsSAnZWagAAdscP/1Ysfav8KiCpeRmnFkoY\nOOCEyNs1ePsT44dGSld5gGuJBhHNqurFDaZMMWHtb8lnHWcZfBPVMImdTAg2\nAI4K617vCDInSjbREauNH14WLd22XytsYwdYUU8iMrNsX67JmP7htaq+T3Pd\ndt+A0oSTkiBuKWgPh+vRkeJ86/dA18FeJ3LvmwkCTpGkGS5VJeo1q2SR09RR\nN/UPeNnjZO8ZhvA7hVB26kn83DiGq1N2z1CW7qZnKE9tXZLmAkk7Z2SgTZXp\nYylC8K6bdehvrmOyVjybtUPJkk5UpZUn0kjAHPKziBSG9ByQm4caJdW74ozR\nSAYxlve1MquJW6GEj4T1kpQjKjfhmcyWVUV/p/6jIalvOUCqrpnxCSf9uPjG\nU2pA4PU1Vtw/oSBcNONAow2XQ373CnlNrbiXqawiP4sZVYDJcNFmsbv7GsbL\nV2DmKumHtgIb0c5jFmQM0ONdD+mn/6hlReHuFBSqgoAqk+yneq4AlplvXfy8\nik+vjfz7g22TFg+uYoGlO4ZdX9PcF/cXFIBPcfoPCbOpefpb7r05d9Obm+2o\nkO1GuZWmyMaOts4W5TwQWdsN/lJ42TjHisg6jvxD3+hg5C7YtgK7Blsy8nRl\nlwx9FcEbLdFhBhOuyu5/KeXuWUTIYskS8bppsIc4aGy2QohiWCL5Mg0MvhUf\ngKR8\r\n=g0kU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/zD5Zik2V11OLwXDdhYB0A9iMD/KIi29i3WQMwdw2/AiEAsBFeAtrsjhcbhwc25hpONTS3vbo3x79BviFcSPnRDnk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.51aab0ad.0_1606784739622_0.9748744289700078"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.8fd4af5b.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.8fd4af5b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.8fd4af5b.0","@material/mwc-textfield":"0.20.0-canary.8fd4af5b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5b16bb5535dfd0f880b710b51d20b7085d91658c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b16bb5535dfd0f880b710b51d20b7085d91658c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b16bb5535dfd0f880b710b51d20b7085d91658c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b16bb5535dfd0f880b710b51d20b7085d91658c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b16bb5535dfd0f880b710b51d20b7085d91658c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b16bb5535dfd0f880b710b51d20b7085d91658c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b16bb5535dfd0f880b710b51d20b7085d91658c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.8fd4af5b.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-LduXtqdOyeb0+z/XC5lY3h9x26SU2RJF+smQuiG/RAbB8BbMLw1xYb5GlMvRjLyVO+0n9zZ0G0mfiO2n1mp28A==","shasum":"b291e3633acbdbccca165f7f9256ba1dd1dcdd06","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.8fd4af5b.0.tgz","fileCount":13,"unpackedSize":42622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyDD3CRA9TVsSAnZWagAA6VUP/379LXgCnkk/2WzfMC5Y\nJb78zmeHoA3ny6aKix2zocijchx4mE7LyHwa3HcoMFARyBoWjV+gFZe2ktid\nD51nO8Hskbo//ZrrfyZXBnV/XqaUEYY5eJK+ozAO1EnI4DckR25Hei1qk+Cq\nm8+75BFa7USmT+nY/Ff2hTRLurfmXId/BzkXy2e7cO8mR5Xp52yqbkFWfyTl\nUGpFJjNksas6zCrNrRfw9K4/fdJYRNkoYBfrFWV8OZOUyMaFKDSsI1QsbpRl\nuLKeYcEibsW8R+VOm0yxkHzM73oDYqxycEnBBu9kg3+fjUrbBp9VDQqFwvGL\ndLgDMBSJzFQ2eIyZHpy1+9kiAqlaOIYUKB09EcVa1zzhvdfOQK/V+cWOoXi7\n8yuKi/VVznRIqxeNV2bHAOZRRGuw0nCXxVxn+wPYXP3wMroAENB7mGdzjPrh\nvVG2mnM6fsuuoyTXGV2c4nfNWTHEyRqM/2rxRicr0aFRONI+XYOYF7Uvm0Hm\n6+sGY2o6f5Gc0rQ7fqhd7bPS225j43Y3sE7CGXslEPsS6lw5enkvCfJUk1ah\noBQBuz5A1SNeX8aHKQPeFXsXC3e6kASyQ+EQA4RofXtD9xPzXrgGivj3OdZ4\nyItpxfM+KOrogOf0PbcUDTm7JLYpRQnAWiipDBKKSqj1xJhL0r89fASCqgg/\nUuaN\r\n=X84G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXaSeTquJyxXIc5RHmhaLW+MsavQZ3MAB9tLA2HfAImAiEA4AHCetn35DrZaT8DEBDeV1mFAu8hgHUpU7qsauqjvM4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.8fd4af5b.0_1606955255065_0.005828261780343791"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.26d14d2f.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.26d14d2f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.26d14d2f.0","@material/mwc-textfield":"0.20.0-canary.26d14d2f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"50590c8a7415327322f7e0115bead5b6a56b9d50","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/50590c8a7415327322f7e0115bead5b6a56b9d50/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/50590c8a7415327322f7e0115bead5b6a56b9d50/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/50590c8a7415327322f7e0115bead5b6a56b9d50/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/50590c8a7415327322f7e0115bead5b6a56b9d50/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/50590c8a7415327322f7e0115bead5b6a56b9d50/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/50590c8a7415327322f7e0115bead5b6a56b9d50/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.26d14d2f.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-G/uINVF2RHNvWMbDfM7G2Q+OrW3a9LPR6scrFSIqk0qdf//1UydL/U/WTd8Dp6xI+moUyPvgioTBTJez3mpTig==","shasum":"c6eb28f11053c28e6ebc20c6cebfd4e1f7a90f30","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.26d14d2f.0.tgz","fileCount":13,"unpackedSize":43115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyDezCRA9TVsSAnZWagAADfUP/1BhvLtV29qjXxBBI/+y\nszNPuQ2KeVX3Vl+0hCIDQQqQQW5btJ2S+Jeh08BjS4MU10R8V4MTKC0cWpJ3\nXxEIZTtLN+frgHA4aq28D9UVmXPkRDewLLnDDKz6CCbXIuAcT3SkM0ai4TqJ\nObQLzonyLvTJcyQQKrFPGp4JqGkoVkIRDUHELcymnxuqow70EKHYP5ISt0D3\nb9MU6QkYDsumRZSNpspaE43fe0uEiskf4jwsbbQXO1x7aih62l0vUmbTMYjD\n7U5dKSciuGW2x10+SU3mej1fu8rw4ggJA8tpPgu/wk0jL45VMICu+XY2l2gn\nai5v5xiCtL0bEW29h6/PhtzNe+3imzPSSia0g0VmRFa1CdfQK/EIIJSoJB4v\nyo7CDpRf5KSBJjyA8L/BVhECcDhXbpJqAT7lx1DfNdoMvVTSwrBkILQoRlfk\nKttNtvI5/tiIJ/jNECKEQwFjeYmhdeBD54AEzK119hpkU7aG1fsne/OeBops\nokH+ElikI2X/TvveiYk6hicDeB/yWPUZpBk0waEW05uvGgzdDhim8cpVvDfq\nvkwYo/hJ/YwYSECV3fByj9Sxz7o+0lor64cwxiMODrXoiTLhYHsNGcQ/HuJX\nl3lK8Mk3bTudljG8pcbtwejuzW/N/VT94HQMM3OKdABbJeNj+AeLXdejlXDc\nz3Lk\r\n=5iV2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOkfxnfIT8b1qE7U4HDmaK5ZhhG0Zy8iPSpfr6oZrEsQIgFAV5uHbT5om/DuRISd+X2Aa4Z1aEGi6GLexlTpc4+vI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.26d14d2f.0_1606956979027_0.5418953891694311"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.1663d7e4.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.1663d7e4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.1663d7e4.0","@material/mwc-textfield":"0.20.0-canary.1663d7e4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"864efc8adbe583a57a2a7554cb0b3d625f3d52bb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/864efc8adbe583a57a2a7554cb0b3d625f3d52bb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/864efc8adbe583a57a2a7554cb0b3d625f3d52bb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/864efc8adbe583a57a2a7554cb0b3d625f3d52bb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/864efc8adbe583a57a2a7554cb0b3d625f3d52bb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/864efc8adbe583a57a2a7554cb0b3d625f3d52bb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/864efc8adbe583a57a2a7554cb0b3d625f3d52bb/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.1663d7e4.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Rooe8MMzVP5MHH7xwDCpaqPmHciIme6wumU6l3aIIwK0D26PIeX5DigHv2aGRTvKL0+0YCb5qnP+jt5Ef955ZQ==","shasum":"369f207dd08e905569f234f3a898ab221f0a9b68","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.1663d7e4.0.tgz","fileCount":13,"unpackedSize":43115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyDyBCRA9TVsSAnZWagAAY5IP/iSk5uInILHX+XdPS5bv\n8NkyGksYsTM0p/ZzOyhKb0jM/laLna0Jmd+K+9qJEG0Z50vpW+jxWkCMmW+D\nYmYbpefJRF5VOeu9Pzgdl5GTte4n9XFqLOUobFOIr75zngRcn51rmJpMPl/L\nUFydEPLrz22SHknEVrehjs6/J3pncRJ81e3oGQk8GTElI3Z1lQnAYx8dIBcg\nUMMwdlVaJTgLzNbSyftLPGirE5NkT6X9lHThvD1zgn8qXoxmBKFk6dGgEidH\nekRypVDbG13onfg4HphRtzLqoAQAkS2h0cpsQ0MBbJppomGkNVReuXTiWXMy\nCLKJFWMXdr/1IXCEvGJnHJg0NPC82sF1easIAZmaB48radaDyw6wsRJKY/YF\nmxy2n/e74SQQ7bKGWxanCuDnwipEzWBxbgW2Mx81BJLQ4ZUxMTkFIeamdT5d\nrWdUMW+n9sv4QLB4SU7PUi64Om/MB/t7NIWP3XQz3677gK4bGBBbO87XWFf1\n1/Fi8eNVX3to6Nf7yBaAkPha0mHGa4Dlj0XvyM0TwNCNJhowYzuWRbTRz2/0\nI+/tlpsTJpktn3xtpjhIi/8S65YjW8InWG9bCVDCuDV7KPZ0iabCiolY4Of9\n87vJqiSQ6Y8k9b8RLbkL8cDEDjgZ/Cov1EJLNDPy9DzPzGBHHgM8b9GYz5cq\njRmw\r\n=iwAM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHzJ27rJ4pJYJX5IeDkAeRcdtbxSxRxF2ZhRA+cjEPDzAiEAnJVuUZK3yt93L8oFyGue8P7hdG0XSEMN2Ddl24BI3yg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.1663d7e4.0_1606958209426_0.9870150164815583"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.cbe9fc12.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.cbe9fc12.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.cbe9fc12.0","@material/mwc-textfield":"0.20.0-canary.cbe9fc12.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ecbb2ff521324d43ca1ca402e290e52618e0454b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecbb2ff521324d43ca1ca402e290e52618e0454b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecbb2ff521324d43ca1ca402e290e52618e0454b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecbb2ff521324d43ca1ca402e290e52618e0454b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecbb2ff521324d43ca1ca402e290e52618e0454b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecbb2ff521324d43ca1ca402e290e52618e0454b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ecbb2ff521324d43ca1ca402e290e52618e0454b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.cbe9fc12.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Gcrv4o85TXPKEdXeftmB59p0fmipr28KRiy5NwZKI3wnmBvPBxpoPBitFjkgXx02gnmMWDelW5rRFqoaA+nuvg==","shasum":"cdf77cbc03dfaf1165de00351dcd36d3c1f8283d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.cbe9fc12.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyTd6CRA9TVsSAnZWagAAdVoQAJ6pb0QjjbVFtHPaGtWQ\nvxCwANatMUEUz8PyhZlHmiTXMBIAocQqCOQ1q2f55CnJIsGRkpe8LBvOx8Sk\n2vNgBMXPl5No7UTpkVkvqEpCmwgBmb2Cs9dLXAMrLezqSu47oqSVEzyZk/Eh\n5lmp0sSBQ4s9EXaUcUQ6MhxR82fwyo3T0DOUcy/ve4htC/FYHQX6MvmZVVvf\nmTu/sRryk9JjKCo6CKS1gW8uDT8JjG3nNdr9t92RTNBXZ/mZUPe/E3/LF+fX\nALjk0lwDI1v1M1l3mhgLxrEq7rNkJfODkT2ie0qHjG87CnR5AFw3A2hAJNyn\nvtdb87ycYkY2enZBUkED4pROEaJQka2CzdaLa6oEpX99+bmFbLgSq58vQD/l\nnYTyLHRwscMaHl5YBLKu+3VU6cqm7/+ArROCWYsYHule8ZoYItUN+VvT1C8L\nfbusyPvOAXdksZJqPahZFv05PnaTd1rIpkZHanKN4VyybWAK52XTyBx7BEVx\nxA3T9Qz3fZOsrfxvqCDoDu8gyFulVQBIrJJA0Uy833zgILsqoZA+zmsg4zlY\nf5eZuVvO0sYph746UA9OG2s9zIMNo7detfigQzzJtIY23yelqasN9cluBhJe\nBx4Z2GQUPSHZSuGdbkeyv8USVq114iTgucxqPAn39GeU5RhNNdOd+Dbhdbrp\ni4mF\r\n=6gW3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBAfndf3Yx3F19339L9UTYBgjm1UsrjvqBRP6+6mrFKEAiEA2KFJz4RwC6+NQNgR6W0F1KjWHLeo9Virl4tLSNbONhw="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.cbe9fc12.0_1607022457983_0.300293362651205"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.9755be10.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.9755be10.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.9755be10.0","@material/mwc-textfield":"0.20.0-canary.9755be10.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"45ec0e755bfb97f054d48e3543837f693347d6da","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45ec0e755bfb97f054d48e3543837f693347d6da/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45ec0e755bfb97f054d48e3543837f693347d6da/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45ec0e755bfb97f054d48e3543837f693347d6da/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45ec0e755bfb97f054d48e3543837f693347d6da/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45ec0e755bfb97f054d48e3543837f693347d6da/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45ec0e755bfb97f054d48e3543837f693347d6da/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.9755be10.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-8m5W8KwNh3cv3pt3IreljsKQ3vBHrxxrEdxdg5doxiR+1APN4rXofS0nwrVn1ntv5Y0+v3ivxLgxTlCdjHiqBg==","shasum":"4835a8976d8f7368e38e9199f6761ab84613fdba","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.9755be10.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyTu1CRA9TVsSAnZWagAAMzsP/jJDHoh4VAjqn0FEhEDx\nYhTrJpQqCyGed2P++h31KhvWW7fEg4Iti/0pxP9oxjzrBDb5K2BpzZpgeH5U\nHegWU7NuRajA8q10hAQd955xXQb3B76ujEP4WWu/IOU+JS3cSnRWIR3B7oD4\nIwoE96g3nTxyljpgNjiT6I/DoKzBZI3wHMbwkgpt0TFWafYTSCifWcGVnIpC\nn3K8+AHjiifAmhl09Rh/SCQIjUDQ7zqfL2jdiVFzc7F+g1zyEBZb92+TrrFs\nvcUBOhY/GP5no5QS7ayb66musNMVtbACbeELp32gXbLwFsV1kws6ACgG113l\nyqCQLPpd2eUP4GgFMXY/CAjk5yhK5H02F1npkUj/HDiQ96Wld1mI+TwphaJW\ni48pUydKwC5HPMiTKptJnY6FP/wZrmtR+O7LOCy5tHNbVGpWJsMrUq+COz7z\nBZpAgFgR5H9zAKMvu37Cjn6MNEZZpNy5yvi2O3JcjWE6ShYwzQ5QM9Fekibc\nHZgmtVvabgtJWMgMNqxFvWxNQCgaXywe4GTvBtG7GJcEFycDIp5/XwbvqWaQ\nCq77W/SbaItqsWbdbyy4oFCuFG/ypGkdqB5V02h3SLHD/xdurt3SnaWRyspY\n/U6lOP/A4e/sLdFoEHEMex8DqY14TWUt+MGZwWTQhPhg14sayyuI1wB+qu0O\nz2L4\r\n=3hAr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBGbFR0RMwQWWyNUjCTwsa+nQ/LsLYqPcZFleEc4gKx9AiEA/I4CdR5a8xsphN9RdPmrn9+VmuBjstmfKtkGSqPXfuU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.9755be10.0_1607023540995_0.32124349276964814"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0-canary.3f64270c.0":{"name":"@material/mwc-textarea","version":"0.20.0-canary.3f64270c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.20.0-canary.3f64270c.0","@material/mwc-textfield":"0.20.0-canary.3f64270c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"048e0b4e0ee67cb81910736a7dcdae5e949a5eda","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/048e0b4e0ee67cb81910736a7dcdae5e949a5eda/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/048e0b4e0ee67cb81910736a7dcdae5e949a5eda/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/048e0b4e0ee67cb81910736a7dcdae5e949a5eda/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/048e0b4e0ee67cb81910736a7dcdae5e949a5eda/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/048e0b4e0ee67cb81910736a7dcdae5e949a5eda/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/048e0b4e0ee67cb81910736a7dcdae5e949a5eda/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0-canary.3f64270c.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-HKAZSuxutVqQUWTPKVEjNhjch2wNHZT2qR8f4BPRxbRfcxqqWadA4WbVwltdH9cWQ/hqon89nq2aP693vgC6dg==","shasum":"a1aedf474c8e73c6b44193f4dc0c7b235b0f3559","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0-canary.3f64270c.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyV2XCRA9TVsSAnZWagAAZuYQAID4j4mgdqZKQQ4aDRh5\ndJCBlQRAho9ROkAuLJomd0cxrNafCFA7RzjpUga1mjmGsFwfEqH3WXY9o3EO\n9GFWM5nzZ+mwN0qXVds1UsIUj7zMgLhiSobzECCIVuEsT6N1gEI3u94TPE7s\nsIUFxWmBcpYcbGBmUu9fi06Cf190Y0FOYOwamvpHRZryErNRZOV30ArWSQq2\njTDBI4wfKNOzBK+ZFdLhOdxBOmSYj9l3GZzCO6nBc6NM/N19npMV/tUO5i56\nLmxxbtrymuMlj+c96YeJICnK9I24zIFq6Pe8UW5i7fdWSJp8VkH5NlfdzLdR\nOdn2WYj0yXgrwyJ8TAQEYx5CNJ2o22KtPF2tWVIOXZQR6SO+7/dImwTlGzqb\n6ywxnyx6rwhoGRW7VJPfb4ja2WmXA0EG1GH2H2A3XiUWJ/ldgsCMyaVGdEo+\niNQV/UU17mDXuZTz15Lg4dEu7bfFLfvSvIgmKbrXUv9p/p2kPLijL/ly0lPE\ndb18lEZN6r8D8x4VdZ0XtJ+M1A0ZSsnUhgrP+Y++qbcX9U+obqTJRT12GGmB\nLNCxQ8M+h0+VH6dfYUW8LDNy4YtBNkTRtMPseWuBt6ZfomzaW6hXT8TFk8CS\ntRCj2t77qccYUv94/Ldcu514uABDDjClbEzySyP0Y/4o9AGat+3cgZSUh5oY\nGjhg\r\n=B6my\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+fewThWVGxc06Xk+t5b2H32h6yMhB/D1e+3RXIxyydAiEAspwaknPG6lrW5xZ7wa7uM1KZuN8Nb46A0I9L25tzSVo="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0-canary.3f64270c.0_1607032214596_0.5420682458926824"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.d893b14a.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.d893b14a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.d893b14a.0","@material/mwc-textfield":"0.21.0-canary.d893b14a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d85f7378e0640c2cfbe4f96436e664222a4c2571","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d85f7378e0640c2cfbe4f96436e664222a4c2571/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d85f7378e0640c2cfbe4f96436e664222a4c2571/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d85f7378e0640c2cfbe4f96436e664222a4c2571/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d85f7378e0640c2cfbe4f96436e664222a4c2571/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d85f7378e0640c2cfbe4f96436e664222a4c2571/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d85f7378e0640c2cfbe4f96436e664222a4c2571/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.d893b14a.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-AczsOokUnIMP/6i5mwEm5s9Enr1+uN734baiZeeKufCIFRi7Ut3wiN8n4d/2AHVQgthQBTEnYR6PAz6TO2tmbg==","shasum":"dd1495b37673879d370905ebcab1afd13af576ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.d893b14a.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyWYPCRA9TVsSAnZWagAAonkP/2achX4zSzCrBl5AD7ui\nEiagJSs7tjsncmhVGfglQ2YGhii3JceXCcBeHRi0ufSY3Cdd/AgysoBECtVH\nQGZUwOZ1162ulaJZuYsFL84MsgWEndoW86yWCLqP5Jqph2oy9ddQpWiblDJt\nIH3V3IHH8RLD1YHo6Bxadg8bVnqC1YJ6L+CqFDpqXlO4ujazjFcHvszPGAoZ\noBzTDym9SeVK0DP7jikNWmymyqZVltTjEysPKvzvMjyHr28Ypv2Rbiphy0Wr\nDncBUYEFERGsSwzjN0dXwZY2lZxNoNel8M8cLKbrAGe5xOx+TPeQIZmhqvGL\nK9QmTzadt0ydp3T6J10WxBwuxGNAO/D4O6iArWZS6FdTLCjDvsVd62L8s3l6\nG/Igcrwv89qJzecYQ8zBF6wC2m7yiQYMxrNeZVEgrcTAVG62XO4tyONF+xOq\nVRyCnsW+j8sOFQRV7SA7vcdVXc4K9UNGbizzofZfLUz8tZm8eYfikZDd3cD0\nFfE462vCc0qevVxT7NPW0MYiFOPLT3rrEsg+7PtQ7ms/ErjNQbW96gfjPy3W\nx5z2SUTat21Mn3Gex6eQeAtNJWPY8B1OR4+iMxdY3+x6u/zcD81WhrtRP9rc\ne1T7kdj1wEfFYMeExm2bO2FmmuezVJM7btfACTGGHCCx174b0PyL6KGGp+7k\n1W+n\r\n=kK15\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeMXWrPPjz6H/V+Aeqf8WBB0NgZxMceEos8/dBSG8tBAIgC6iyMlHxkWxb37IHhhosdSDgQgLofu/hdYtRHPlTSbI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.d893b14a.0_1607034383478_0.4350466390654868"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.20.0":{"name":"@material/mwc-textarea","version":"0.20.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.20.0","@material/mwc-textfield":"^0.20.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d893b14a0846777b90c10839f3d05c36bc34692e","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.20.0","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.22.1/node@v13.8.0+x64 (darwin)","dist":{"integrity":"sha512-NIR+F9juAkHK+lKBHfXSG+MVNxXs4pY7v2o0wGOwy06DDXq1xRqlM+V4vPXhIciDRL5y9sPza43/YWCaEjZaBg==","shasum":"529896903c4d03920a73e0f8616133db656c5194","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.20.0.tgz","fileCount":13,"unpackedSize":43114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyWavCRA9TVsSAnZWagAAhRIP/ijxFJToscZSM5AAyOOg\n+77FDypcAzRuXo6//Aq2tvdPB9x/4EFUzcdc2JiWfAeUCPKxwcwdo071VweK\nxgiunqdb4TaCdDCBRrJU5gHQltywzshCv6VcNu7SaAyzNhwRuxZbftQe6n5m\nDAp8g5wfFIpduwHENrLqCywCX8T+FmP1G3x96BcX0X2hs2C4clIME4tXxsYv\ninsk6ra4s6ou5+BrjBya3dyEz2bkdhP7hIO5+eZwQ4fNSFLRPgIqQvert6FX\nskK/W4xj1+A6hbRfnzp7ssiE3GSrcgad0ulBag4RgQ/iXU+AxnaQkRLhyt3x\nqvijiqTe7uaIYM+QrH0xqhvNfWKE2bH+zXypf3liTOoIA+B428ljTqXbGI4Q\nwVhzd51vHjU2tKeZp/WTIOw8I2NIhN66OZAlZAVA/n2uZjqstEDGLhrQqv0y\nOlWqu76uuIZZAM7OuCYcjwFIw0tVU2pCqhu1emqGTfBzZdlmwsW5/oF9ZHKe\nafMSGmH/UadUbcUppfL2joxYyDex6gH6VTtZ4UBvvM3kAMwSqMg/jgKzp+lE\nuXoKjpkih8TCH9F3cZuRqXXNtj0WuyIPr0YXuP6d0rtDPu1uKIV7t84DyvYS\nisCZutgGq0sWpZ0cCa6RfC//Z/cpeee+ijJZoRpiabQt5JKecm3XqapQOWrD\n1GbN\r\n=sFFn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACpOw+JDp3vdbzj4oea9nIni0sf/kbpmYwWzoFqHfqJAiAjL31l/HnglSf/kUMohmHwAgQ3PG5IeXJd2DNrMrLGHQ=="}]},"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.20.0_1607034542701_0.9485798945688193"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.47c7d7e5.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.47c7d7e5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.47c7d7e5.0","@material/mwc-textfield":"0.21.0-canary.47c7d7e5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"670d83aacd771290b76b657bfe6ee631865c037c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/670d83aacd771290b76b657bfe6ee631865c037c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/670d83aacd771290b76b657bfe6ee631865c037c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/670d83aacd771290b76b657bfe6ee631865c037c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/670d83aacd771290b76b657bfe6ee631865c037c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/670d83aacd771290b76b657bfe6ee631865c037c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/670d83aacd771290b76b657bfe6ee631865c037c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.47c7d7e5.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-DF98idybGr1eX20HXXruZ9MU+vDT9QDZNYx072DzDYzM86UlOb0rbJtTvgyjHYKfPUdpzB2KBA3zrbgHERe5uA==","shasum":"f2a2805e43eaae0ea91080d505fd4093cdef787f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.47c7d7e5.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf088dCRA9TVsSAnZWagAAfcIP/3ngDQae0YwNNm3QIbCf\nabQzlYV2d6Sn0lR62vw+5rJQ+bqBNGHOW1cjBTtt8EnVWORi2ow9VhoNdPrx\nOlBtqtlLNsYqiYIxt7nSGdEkUkR5Z7pBGX9wsXIHCXutYgQ/NsyCrSPC9AET\ngmX+g4iP/nw1M1xyP1QpssQuEq8Hn70BqqsQoQKVRbL5ojI/W7FXgNYhT4c3\nkUS7JwL7OjHTKjD8+zz72KGMt3pXb0goo2Vn5Pv/cWAY/ZDndOethKObfF64\niQu3z2NxlQLnbc8Trr5MR3RaEOl5NGbkUsqyagaZkI4aq7xdfIZz/uVdkNGR\nXZ+J41x5tWJE0Y1sbfvcJPf/G56CdAm/8ud/5PGEDEBLpOnM2vzfj/4suTuB\na8OmpUgEf9PhllYnsYZ5SyShpk4SEP/bmYQlD5QJZSEy9HDbu3b+xjC8FFg3\niIdkq+W9eLvgphYFpNQqKaIjNV6JTahu7P+0j+ae3OkbmP6Stcov0YsaMCu6\nbmHvaEf+DAgc2wc1neXi4mIQGejC/nWJBTvYhMpP7dK1cx3f1bQ5SQupC/vb\nT1JANO0dRgC1o1tIVRutaNw2YgPD6vTPkhM/mIu+FURy2n/bDDcoslGOVNTH\nAiDqBsYWgO7V8yvlXvaxX2ofZ5JCX+bilarB3k6T3sb2QPBEhmYO0NP7oyIj\nRO3k\r\n=sHhE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFtVXy0Q+y8ZlH+4cjdhqUkyqaeOAe54+6uPlwDyv27AIgMeCAGKO82dzwsW5K/jKTpI3sf2vKI5akKmQ0tvC1t1Y="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.47c7d7e5.0_1607716636603_0.4553638771167041"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b304a78b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b304a78b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b304a78b.0","@material/mwc-textfield":"0.21.0-canary.b304a78b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"44ea71b47f36de83be1e3319efa93b6fd3690c2c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44ea71b47f36de83be1e3319efa93b6fd3690c2c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44ea71b47f36de83be1e3319efa93b6fd3690c2c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44ea71b47f36de83be1e3319efa93b6fd3690c2c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44ea71b47f36de83be1e3319efa93b6fd3690c2c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44ea71b47f36de83be1e3319efa93b6fd3690c2c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/44ea71b47f36de83be1e3319efa93b6fd3690c2c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b304a78b.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-/yHGK24VAX/ES3SXASxnoMwzAJ82bwWsd/c/siiKcBIvh7bxZigVjkVNAxQTk+odUSFy+FHU9F+n4Gt4lFBlLA==","shasum":"ed4166f268063acb988acbb7fd4da484ee6dcedb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b304a78b.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2RbPCRA9TVsSAnZWagAAWIIP/ijurUGrKgBiOReIPuZ4\nBGZxjUTaJ6k/1q5lUUlATV0HF8wDEjtsSib3k8GLn3Oo1ppTvActjjdvb0df\nA1gjlAxcxGlitm6Crd3gzDO1vVnnUqMydWE5lvB3E8Akrr5MTWblzJcEXTqH\npz1zyNzKrP1ENa1bVV1LIpfJqd9FxfhEKdXJBsQEmWfYie0cPrVgmnz6elAS\nwoO1F3gYZZLrS4GDghCqdkP3hcG2Ip+oWDTTIXCXKvND5wt45+fnoYx67npZ\n4FemJh2sG2lhg1jegHJePXfoHAzPnj0Lvuls4+ZdZuk0WtX3QLXW75BNjhUm\nIbeMVHvF56sOnUF8UzXBYsk6gFtzoykN4JzHX+3f260Mq7SEzWljcvyN78PN\n0+r2Lpx1K9UjCVuaM2yE6cSORByjcPhtVz28mGKtlMCwwOcn+Z4OD0oSP4Vu\nLXGtc9K2gFoB8xM2Qd3JB4n7oCirpVO9u3u+Qi8+lYIxbpeV0j5WUlYy9/oZ\ntLAOMNfJHcYo+zCDTeGZCPyUb4sG8p5Ij8TVYDRHa+Tg8Rauetab9CBrtNmi\n2lJ9CW0NO+LyQzWowIGjf/0gcFb9picieHiPnyODiZBvuJzADCQyE7fveVsF\n3DWZ5Lq8Xi3xOVejn14Q82EfJ7fkmhSt/gbLzFlzWqAFdorwrFoWbqPU7IPu\nkAuN\r\n=Js8E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlC7427+wtIW2MofKc2nVK5FdtkoJB70W4K5c+16erYAIhAPKpk/T7E3Hahp3U+kPENkw1r6KEsDTLQc7kJScny/0a"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b304a78b.0_1608062670643_0.554807108233142"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.777c5fa4.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.777c5fa4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.777c5fa4.0","@material/mwc-textfield":"0.21.0-canary.777c5fa4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8e5f0e24042f2b54d3ebcac6c8bc11f89a7c1a1d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.777c5fa4.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-HEdbDOqDCO5+3guQ/2MVYBOox5Jz9x3j1HoiqpiFvr+ByKUhSml9WHJF5ucbRkPS9rjjhluOAYfWWai0MQAAkg==","shasum":"a26855c374cdd423c1e9013f5ad955e8983c5c9d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.777c5fa4.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2oINCRA9TVsSAnZWagAAVYcP/14dEcSGzDhVLDizVePE\n1Xp9h7o2Tes3ntxfOgoAF4+XSrz+tmG0RD9w6sC23uY9fLaJoWC+12E2OBA8\ngwTruC1Gu4gwtqH/tM3/sLfpPKO8qM4Z71qFEn4TNr9tAQci66E9uI3pfwnM\ngjFl2nUX4+Qd++ET2ZpMi82WC9CULT+onfFpR6eFIMUQYjhxaXkVE/1yVUgJ\nZ01dlb4YFmbVWQyhGSZoZaXL5C5tF/ofYIEEFWGjhEUKyqxm7pME/CU8VVeE\nKrWNpH3M6NprWFTxlaz5lQ42vAAwVlqnMQ2X6pgBtn7z6WqJDOPN449R4/Zk\nhMILKeWBbICwLxf4F+aQ8XyrO9cpylA7qZbWBnnQdSdqaI0yqK1ZDAzHT6z9\ngA0ZYWtwse96wXvcqV0ngGXfZjVx4E2bKephe95x0PQnYIeq7DZRtY7/LA7B\nlWQiX4cHm5rQuWyCcmwYYnta2D06dZYouW76pgssrp2JavO10/qiUmTcEeZ6\nS+l1FndF6GWob3DN8YEpV2OQ/3uXlqIZrHlNWSLWrcSmbED44QdAwTcU3L78\nWkEAojgrv/WKk84u/CXD1rB8cXDXd7Ny3uQVYpoOaTyyPcTYDZCy6f1tyAHA\nwQnVxR/sXrk48Ix4l4v52aC7RQKLsKhQI8L7DRBfM0xnoaFf4nbsZkhdKlEh\nlo4b\r\n=qk5K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCkytxBI3IlnhdxqpaBN/EjMVw6bWy81wQPDfwTvzjcwIgQFSw14Neukr9QDihF+ndwtRYnRhYab4Tcah68mIPAvY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.777c5fa4.0_1608155660962_0.6762862973655983"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.635c7996.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.635c7996.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.635c7996.0","@material/mwc-textfield":"0.21.0-canary.635c7996.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"a0b572136cec769df6b66314ae5710101b643ea1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0b572136cec769df6b66314ae5710101b643ea1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0b572136cec769df6b66314ae5710101b643ea1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0b572136cec769df6b66314ae5710101b643ea1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0b572136cec769df6b66314ae5710101b643ea1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0b572136cec769df6b66314ae5710101b643ea1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a0b572136cec769df6b66314ae5710101b643ea1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.635c7996.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-iSnW5Hn0jEmuWxGvqa5Kp5zrniPlJAkbu3Sba07Du/uiq4xHQ9zxeGfwhvgYazD71o7ZAlrbBH9U/5k+6uNADQ==","shasum":"7bd1715d209f4ca99bc0efca4c330cec462be3aa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.635c7996.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2+p/CRA9TVsSAnZWagAADYwQAKAPQ9g6qlBr8lzgpy+V\nHDZDp3BQ9HYq0FkKy1i+w+OtENOld3MPIwRG8AG5CpdpES23efI7KAbo5xJ/\nuuZDP44HwxHQO/BYrALSxN+cWxvX72KEo2pfEmqpPLeEnzNDjSC4dHgOXkEA\n5c1/HLnV7IexlmxVWb+ge+u7sfF9uKDXeQK/Itdj456FlKLdOaGQULdvz28z\n8n9z0S2rfPeWh05PygloptNBywpYjpQp0B8KTwG2kracR90RcOzIOY7dZOtB\nqyIQA/AsIM1UVPKQB2yMNDKjzTKPKuiJgLlmA8pG6MiU6R9/FDsLBX6aQTSx\njNIOcA68zlz1LJMtSxm/D+61F5DS4r1SmJGJfy5N77/xNiJSxcB5JqglGtDi\neBT9oF7J7Sty2ewwVXI7krVJFkSEtI4BxrSCuyuM6zz2vIeuv1AjxGFDecTc\nONVMdT4ur0T4pfDSNS83mOhvgvVLMiWdvvLvu2BRsBWSpi0z+OuFNUTTHypx\n6gw0A1XT0ZaQNJQvsaH6m3scKvvuUwE3NEoxOp8+s3dZwv1H8L4XkNlDUP/3\n5HM9X/Wbq9PLcKK9GGfwN3ogufn4s+KDEjcNXv6Sgl5qzrY0+wHuTIVSJXcV\nZzpCvNw8NZAWxtbiWRdJ6puj13dQ0Bx7dMihxQmJSPFF0uiHDJqGkjSts4xn\nCcIZ\r\n=rym5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+IZQTXxtLAdUtLmJId9KkQRyOKBlUAQqUxZvAJ7kkbwIhAJx8cvNrfnuZZk8XzYGLrlrfrCTDpJcLEJj8dF+OaKhu"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.635c7996.0_1608247935284_0.11937432112104096"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.20b0045f.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.20b0045f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.20b0045f.0","@material/mwc-textfield":"0.21.0-canary.20b0045f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"a6bca4682b5b0bc23e8311853608b98f5594831a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a6bca4682b5b0bc23e8311853608b98f5594831a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a6bca4682b5b0bc23e8311853608b98f5594831a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a6bca4682b5b0bc23e8311853608b98f5594831a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a6bca4682b5b0bc23e8311853608b98f5594831a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a6bca4682b5b0bc23e8311853608b98f5594831a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a6bca4682b5b0bc23e8311853608b98f5594831a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.20b0045f.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-3FjbwtpQloLlesg8CM7Iv3xDDRE9xrNe0/GkecUBb1SgkTWnRixmjj8s3R4XiuSxS0G4uwGU2ELdehHIaxOe9Q==","shasum":"e9574d202275867369a18ca8ac66741aa187140b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.20b0045f.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2+5/CRA9TVsSAnZWagAAX4cQAJ9KOsJWpdKJf+y1OV3y\n++hqN/+DljZSJSyB5m4ozAugNDhQaEOhQ31cW89pDAsjSkXIjOrSDZRrUHvJ\nx8XY4GZ8lPAeNXA75MlxsuMC55uqtbMo/IzAS9Tox9tc1eioGSPYXag/jIlQ\nDx10cWmfK4Yy9kJ1z5nOixqrloiQ77FcmTzsFP7tV4e7+3xAs/gHtdQbJI0m\nKAOn2qcTX3oGHuoLyxKsR7BA0PpVPn0pyIfHdRqGjtAFQKJ/4GqqSYI7sVvU\nB1/gEdxz3EuyRfJEpRHPPN5ffAPaZYXiB4UDahdE+war5o/ZcuH9NTeV3lTx\nIb5GVA37oWQrXWZQeJhsmWt3gb/gd+ZBSLV4DFad0MIPK+wbbh2oG3Ivsqgj\nRz9QZqyluVdMYdioFy+cxDrj3fy5j1gIAe3EP9rkdSOxPbh2OW4QKMvyD/GK\nAsJWx2bUGZPsfnb2TgQaCP+CYU7NLN+towS+5KGRUjG3zTHUbZZs51F9GcsI\njzqhn54U8exD4xr4A0dZf8baki4cTwbUk+JV65Wkysh+Wv5WgtoJ2KALMYsi\ncXdjpwwKiFsp0gXhSNjbNnRUfxs5SJveliCvuzAhPS0wtKxmD21I/L59dIGj\nglChdMOsPDcaMeSfgWoo13tGSEm3wfHgYs3HMvYIJF6khFMBSB4vCulPrZC7\nYRO/\r\n=Y9Q3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2gcAtfexPrMHFEY6k9pUWbKkHSJ5m9UE5N9vyg8V87AiA96n3kcuaVlA81mirAEx5vjQuBsOqsCLcAWcU72b6yIA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.20b0045f.0_1608248958717_0.2583758786048047"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.41f77000.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.41f77000.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.41f77000.0","@material/mwc-textfield":"0.21.0-canary.41f77000.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"59ffc250e9e7d85ede63c75495b12e981e365677","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59ffc250e9e7d85ede63c75495b12e981e365677/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59ffc250e9e7d85ede63c75495b12e981e365677/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59ffc250e9e7d85ede63c75495b12e981e365677/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59ffc250e9e7d85ede63c75495b12e981e365677/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59ffc250e9e7d85ede63c75495b12e981e365677/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/59ffc250e9e7d85ede63c75495b12e981e365677/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.41f77000.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-VyKWpnj1j0o28AQn3CxHz8OR9GRmR4+Gfo/AWjRsCZQKV99Vic8l8dXLHUbm/qsssMDnT0/IlSKIJVXYLtkSHw==","shasum":"51fcebd44296ba0e8ea5a46c543148856e96b456","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.41f77000.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2/lcCRA9TVsSAnZWagAAD9wP/1Uudt4uftHM/WqBNPZp\nnpL5ZTALLJoJ+lnl0JgaDaX5a9u/ajwO1f1Hum/qAed2VyhQa7F9zfNQUZpN\nwr/INCdNDyJv1K7u5BS5sviqrslbpbz4fu17rA1PvcHPxbrtNhpgXeDX8Bbt\nyhH43ww1YsFtgMhqvzPlNZ8h4SGrAbBbTSxvO1VvZF19MWfK39HQIIBSN5Dn\nk/SDdSBz+TslWF4vNxwIwHm+UAQmuMBEnUX1iVAou0RUd36eaif+P/wpwZ1Q\nwR3qaCR4Zue6FRt3dJrfVo8JtWeNyDrZjgkSMHI/+NcFmqhMiEWEi/xCcvC6\nnTvDH7zqq1Q0OgiJ5LAbX9k6qBKZzCMwdPb6yd9EKspL1oA1Hr/jVfnrpkJW\nn9hkCp85FYJ7BI2ZcZEKjLAlPtSh+c1GnA6dzWggAFOUPatx+k/MuqZDg/NL\njChEI9Q8COg9p4gKvy6+m7CPQiPB00Mlq7B5Fsk+/NWovSOKs7gN6RNAFsBb\n9Zx3YwbWl42A9ITm9Y8AY1bUlBwbAiRbl4RhCrVtrEhPrMKxOSrusTb4czZu\nqTG6zIen7TUBVFYaSQQACLKCpbBrlimz9jEwlrB5/TFZ4Oh5EptLjxK1h4yT\nviVEYkh6aTGp+VCiQsptRpLYAH/8dpv9Svqs9RlujoAeZr3PKdR57lAJ71MI\ntWdP\r\n=ehpN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFpKY09575twp5ixoI1nJQqp2oUvLZuC47Q4DgEV4XmAIhAIHBuZO30ozjOeN4lfHvvgClZQxDm+trJs/739j7r1NS"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.41f77000.0_1608251739755_0.5999494395045257"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.afe4079a.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.afe4079a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.afe4079a.0","@material/mwc-textfield":"0.21.0-canary.afe4079a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"aeb3539e673debaa2381e0aa7f186b95e91ee563","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aeb3539e673debaa2381e0aa7f186b95e91ee563/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aeb3539e673debaa2381e0aa7f186b95e91ee563/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aeb3539e673debaa2381e0aa7f186b95e91ee563/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aeb3539e673debaa2381e0aa7f186b95e91ee563/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aeb3539e673debaa2381e0aa7f186b95e91ee563/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aeb3539e673debaa2381e0aa7f186b95e91ee563/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.afe4079a.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-7Wz92SxrP0v6cLJOkZsDlenSX1EfB1BZUneib5fioITyaYwTCO730L8KaOk241vAIXpL1Kyd7ASXToG1aC+uLQ==","shasum":"b328d56cc3b548f2b73efc62b4099311f518433a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.afe4079a.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4i97CRA9TVsSAnZWagAATpUQAJ15FlO+3NGe587p1Q8O\n2gACrdskGTYOVi2DH+GzoCbtwwmmynu1TUiQbxHpR1uiiclg2cdayZDEIreV\nGlOdnRND0CLJw6jCOCP9IFf/vBhhML9ia0H7sy6aKyORcwaTEO9fKM3/FBrV\n8ZM/4FzRL1Hml5Ife6DP36uN/Sa94nPWObV/T74Ma/J4am5ax2xAlsFqedmt\nahP1ksTDkvpccf6IzlB0KCtIS3seaWexY3k9K/xhx2ZkhuQlV+Bz3fqQDh+k\nSVFr8dmuQdZNpVShvARjqYLNjJ6mKqAm9PjPPLwt+1MFK10M5tgt/gUFr5BH\n+As4uWVcpmV5CCMBofqyBIZkZlRyx4JEABdFJuDW+STWQbRyXRLK2nTGCS8K\n/KGcQWfxauzGn7OqQvvb80ZhOoR8FcPku8bJopHcNq/Ibcq+cbCOwXYpuHCj\n+MeqBqz6wmDTFcO8cdlC9bNmBpZktnnj9ZN2YneGqBzF4HUk1Zsk3FTwU9d0\njSmwfIjj+L0JfxAGwcR4GhlBsGfDE3n0ezOsAC6vy2ukGoKHiMr7vrW4FFoF\nR4smgzofGOtgl87zoQRtkQQ4Cz/3Nn6c3zfTWQePaJ9+mlN0t+fWWou71xfJ\nP4H7xN7e8T+thoY20NSHUUeKBcyETSo0Wzz7oc4g5w+/boU6lFBStZdPLOyG\n9OPm\r\n=6lsC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK+XX111Ii6px4yNSjDTKyiuiOAosuSKzlFNlA++Hi2wIhANgzr5sKCQDh+MhJHCDajIw0MUU0CYpPb8GuVe/nW43A"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.afe4079a.0_1608658811264_0.15447024698063005"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.407ef8f9.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.407ef8f9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.407ef8f9.0","@material/mwc-textfield":"0.21.0-canary.407ef8f9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"b600a06f2f54a052373cbcc038980333a8068672","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b600a06f2f54a052373cbcc038980333a8068672/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b600a06f2f54a052373cbcc038980333a8068672/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b600a06f2f54a052373cbcc038980333a8068672/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b600a06f2f54a052373cbcc038980333a8068672/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b600a06f2f54a052373cbcc038980333a8068672/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b600a06f2f54a052373cbcc038980333a8068672/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.407ef8f9.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-4yHCjL+2rt3LsD04SkKQi+Lz7UaID8dCZxoAJnOjcV3UnRZ2MjPCm5Hvs3iFZKsVOVwAg0spDeYsylph1nBJ8g==","shasum":"565c394aa3ace7a17231ca3e3e232bb59d4a4474","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.407ef8f9.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7QckCRA9TVsSAnZWagAA3PYQAJf/2hDli9ZZXLjVOklY\niAtQiYjjqJ4D+vyVKLWEkApVTF5YSRtxM84ApYXbp0nkGZ2mBigw3Xrb7CcL\nqQFGCTkPO3exIArfECubzEkVTskOZCOgQ7zCFdL1PNjcKiN850Rtfpxe8GDW\nv0j1MlMCO9W9+r9xbknR8l8WOyndwlvWKxJlhPcJmJvzvaibG0xfxrX7KV2R\nYnImC/b5f/tfUCGzCFAqyKPguZYBxlT/CobwdpRxeYKzMKUcqvAGOSRVYxNo\nGejrK/DwbZ7TvSMvBBhnkisL/5/RyCYCP/WyJLMV0raqQM0gHW1mmLKuehbO\nEg5PHeaiuWOqEzkS4fzGSTA9XA1HbFYIy6brsx7efBFqBDJXJVlhhkX2divA\nNV8NJB+0CsgCZRmCksI1NLIAvBHPaKgIjNTynVEruUM/PUJ1jE5T4vtRgx7W\ni1+mzNkEO5dimFtmtJzX6zMWT77Y+XtTunez8QQsGv60lJrpjrJT6ypqzcGK\nYD3p+YUxcWWCkYmXE2X2qWC0lItdvfair20FMOPQz3Yn+tU0cdAtwsR4e1KI\n91l6LeRs5FstBjrHHmadHyjvEcZsEfdRn1MynHuiJulLVTtKeP3uMPFQGH1q\nBylW/fXQ7tesNUhI6DxgW+eITfJra3oGW9PKxlD+bOcBgpqRxtMAzKapyZ3I\nWePO\r\n=u5DQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCh5fTDDuzpAwaG6uDpG34LN1NESXNEwM6rnantTGhHgwIgBepdC78wvMyXVdzNrbEiKsnwDpx7A/Oh3ALJAj/8xYs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.407ef8f9.0_1609369380056_0.5046498177796184"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.2e26e137.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.2e26e137.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.2e26e137.0","@material/mwc-textfield":"0.21.0-canary.2e26e137.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"cd3d92f8ebc04ae6cd6d286c7983e3028e380428","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3d92f8ebc04ae6cd6d286c7983e3028e380428/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3d92f8ebc04ae6cd6d286c7983e3028e380428/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3d92f8ebc04ae6cd6d286c7983e3028e380428/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3d92f8ebc04ae6cd6d286c7983e3028e380428/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3d92f8ebc04ae6cd6d286c7983e3028e380428/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cd3d92f8ebc04ae6cd6d286c7983e3028e380428/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.2e26e137.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-2e7vHlmJFAJjoh0j2KPXCu8D2BzjkrEpJhth1XMDP+Zd6hjx9XwyYXAbzwkK/g3ZROak4LvlrwmvlLYnB+Gp1w==","shasum":"959e973e6c09baa98c6dd49cf8d9c27690def377","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.2e26e137.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9LTVCRA9TVsSAnZWagAAuD8P/izFJXTGMg+QVxAt1G0Y\nJs8nu8MSDoaTPBHq65NQI0KRy2JmFxU3HN4FQeeOYWsaV7EucobQ5V0QY3Ar\nmJD2Jj/C9oZ7u83OODVzyRZdCNgwakM4GMVeuWJn/NikUa0HJdThUczH7uxA\nsWphyIqz4EZWr3nDd9H99qkpBMj/7LZvgMbMTqlVPoDpoEJMh8y5MQSz9L4+\n7rdWkOt5aMgdvauSn7UxrND+sBFa6pX7IxDT1UbCgfrg6GvpMa/m2SmYHlOK\nu5fDURtvHVP/QVBZKHxLUg/DdGf030QIWGwmUdrEaCSM+zRlu/EY2t/w4wDx\nLk12F94bH5VZxky/pKp6Q3QQZ6eMsq01O/t8PGZIr/9JeUa7D6tjW/nb4HJG\n6iFNtM2/vG58gm+brBIaC1hETZpT2w7hAPMFmsSpxjRSPIDnNy6x0QIya5gj\nFOw8qGt2m9Fwx+03rIK8SsHG6QykFMnqQHwrYn8pSMoIcKi6UA2SfdvIO5Yw\nSieTBXFgW7RnRLBu1qn0w+4plNXRrpuDP4Is3bZOWfIjlr5Tz/Z3wsFFp6i9\nWo70liSVcHou7q91ziCXB8Bqkk80itReW9XblGwCEtvSMba5czgCppEtuoAo\nbSK2He3oFP8Vo8bsMBr4/ehU6QeB6pRbadDD7wX9DhIsRK/in399/C0HO8t6\nPK0D\r\n=NtGy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZ3RSpyY+bytcqZTegBfC+JNrfaZ2zMgo7pwkenrOKLgIgDCC/iBCAGCuduIVbj5oqWvg0COVI2whAr4ZnZYAbU08="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.2e26e137.0_1609872596776_0.9885174301760349"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.9009f6c1.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.9009f6c1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.9009f6c1.0","@material/mwc-textfield":"0.21.0-canary.9009f6c1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d6f3ffc9298b3af3985946aa3bdd75c862b5d8c3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.9009f6c1.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Tbk272eBB8o5nofHT3iRJYRDgN/Le23IjKUGxTfS023rO+OZ/33tM3ARE7ipIuJgFe0sPVrqe0D0onaQTB/ELA==","shasum":"9393380d3474c58758d2c23b622f02013ee947df","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.9009f6c1.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+LiECRA9TVsSAnZWagAA+XQP/jRfU4wYRAFLzBGtJ0Kx\nASlP+nvEEyx8k6X0oH6vB9w7TMf4+GvDKiVrma7aw9pJQh5zVcFnXhlR7cP8\nSwzQIccxFLYRumk5Q010qvXNcO8WVS15bg65BFrfnlNp5c7Y1SYAWfS+DXFD\nLLzZ7n5WQ/Om08PJwPs04xQhjMRrNgEvAssGBmQYtbVBw9Uvxa5dVQq/Yh1d\nSVuQ5r1HUkbGRD2pmekN1nnp49iGT8rEq0NgLX2+ixNZkehcgYsCCCu9N4pj\nMeigzIkVKzC7+7rJ6wd+FGu/MHWcu7lK1RCX/VGhD6Mvajqe4wC+jyS12/z7\nu7o0HVGivrFSvQqyC3diC5DHyzPGFJN5CnlTkWGDAdQnMqzWAe207psy/5R8\nzQh1seSFsOYQILKuQpXfkWAqI0nMALT5AUgS1Z15hCWtxiAyNEPOGe3MAVW0\ncyznXXxqTsmfzQPxUBt31wsQVJvNHAPYoxXWRvw+1C0C2vc89PVaskRfwiSw\n4cS5sFHWUs2eiNwj07Wooh0NTtlA3xZWCrwoNcPV1VHfF8/v7aDrJ/McKV6J\nmj0j5CQsUM5bnxatf5mEletN+SaRDK11ZUT4EIXLOWNFOKRkvOTioyQt/fjJ\nBg/qnxnTtdMuPtr5jIZesu/T7I/VCDuztwODm4Mb4PtfazpxZLLuB3Qy2yix\nwJjE\r\n=YR3H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGPThh+Zd+CFBwn18+JET2hric3t+s6/oT3oZ5DCkq+lAiADJosIT4XqQAKdaE0L1bkKubNk6XbMucR5YwQ/mxjg0A=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.9009f6c1.0_1610135684515_0.2988463924788971"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.ee99b646.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.ee99b646.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.ee99b646.0","@material/mwc-textfield":"0.21.0-canary.ee99b646.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"e3bf8197782f6099f32f339bdbc9218093828cdf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3bf8197782f6099f32f339bdbc9218093828cdf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3bf8197782f6099f32f339bdbc9218093828cdf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3bf8197782f6099f32f339bdbc9218093828cdf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3bf8197782f6099f32f339bdbc9218093828cdf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3bf8197782f6099f32f339bdbc9218093828cdf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3bf8197782f6099f32f339bdbc9218093828cdf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.ee99b646.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-7J/K10j8F16Fu+velqfrXXUxyHFv2cKqL5s7cZej/bGDNG6ixumc8r0h2SOzG+HQ3rde7pOlGAcnD3O/aIxdWQ==","shasum":"1f804f40ab86a10f04c8ab43e7705e29ac0d973d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.ee99b646.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/NpwCRA9TVsSAnZWagAAS5YP/17/w7xRaWElNJE1g5TA\nYRT0R4gj1wSvBClWBVb6arcanpD18jLkqU12UPaGnmxocjveoBrknJoRnaZY\nLy+IB7kGpWhG/r6ODMUvcnCz030CofIhR6Yac9aqGpMbttqE5D+6l8AF44Yl\nJsP+cSzbj5rbarF44gCDeWRn0DX8pv7sA5MzGaGl52zKGrqjQMa5q0nIlhhm\nDHERR/isMeMlaPdrnkfqwhaQOdOXJwM4fDc9XmoHbHzlRR1d2zqFz/H6Ei95\nqNk76yY941yBdAzYxMrFMlDDw//C5yr46YX6f53a/xpmTxuQDNcUw42vQxQ0\nOR47mE6QBQVrbzaD38jw3hun7Zv1HNlYBU8yM1Wgffj8/amjlQOLCNYvhb2n\nj8r8uR7v08mefZsI5qxWSRmIT7kjIs+4i5oUxxmZ1DfEJ+b+CPqyopAQwzrY\n+Gxl13H/5DLgawgWh3BIPzaUb9+KhLfMfthYIT7PUZ9jfDw4hDdDNHuLW5O+\nQ3lkSMnpneO+BHEJsDb8Pn8JBqWQCPwlqfsVffaEor/xOCgM7ilf/F47/fuG\nHxtg15HWdX6xFNAyJZ+Fmw6ExXbZ1cmPT1JmadGxH6lBKKw8XfeR8FpXMMoK\nmRrHRd8pboGZoMeR+L7nWzMMHwV3hPDBvyomufU7uCz0Yu0qFjhZ4hFryPpU\nWgI3\r\n=/KAK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDm/GaNYisFcjpFGHuhnc59djSV35DMw1icLx/c4G14qAIgFlAFHXR6MM1WtztonKF0ci7LYu3u6K+bNGfkHZJWwHk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.ee99b646.0_1610406511847_0.13600462189338747"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.740ed33b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.740ed33b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.740ed33b.0","@material/mwc-textfield":"0.21.0-canary.740ed33b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"fabdf055e5efb9cfb69ee02c46f968eb33e417e2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fabdf055e5efb9cfb69ee02c46f968eb33e417e2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fabdf055e5efb9cfb69ee02c46f968eb33e417e2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fabdf055e5efb9cfb69ee02c46f968eb33e417e2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fabdf055e5efb9cfb69ee02c46f968eb33e417e2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fabdf055e5efb9cfb69ee02c46f968eb33e417e2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fabdf055e5efb9cfb69ee02c46f968eb33e417e2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.740ed33b.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-Ns8+6SNqjZegoSkFW/UIpbNzCEU9aI/05aPiKfxtwCv1lKyS6s0v3/zYOIuk0r0qmpjx40aykxaogopp1ZT0pg==","shasum":"123900a15698ffaea919a12045fd5cd051e8ac99","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.740ed33b.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/eSsCRA9TVsSAnZWagAAvqYP/1rihzgIJNxSiT1pPuVb\nfmyy6BWqNQNf+UW7a7lNa3pey6n80x08IqH89nh4/6kdobklj6JKn4lgXdbF\nxVJrf9o+E/Lcq6+RAcQ7BLblaX1lKF+3KrViHAM5urVetu8fgnknQvg8r8E/\njgCVHm+H8ARbfZTUofAbSpqgRqU1rliYgWvWjOVkCEnqvSVUP7WU7LVGGak7\nRBch92B6Osq/iNof8UYmy3Pb/afp23uBX/jgAPLneo3yi/Lz1P/Q5EDgwQXC\natb8URXvNo15AoJGqTVIctPOupbhamfV0mDDLi1e/tSx2ELp1uVyS6BfrzXR\nNXnT3JvJy65xWMXSlJ2GI0A75oQUktaXDwiRexFYF3gJzmhDTIbouDLQ9rDq\ne1Hrq12vHgePSfXvnETp0mn+Emdg6WyPkVl+lqE1bHQnXD/xpVIFdOh7uFVU\nBkWBq1HZrGZos/LobFHqT20U6cITapLUNyRcyrgfzr29irCZYvu2ddRCqXTG\nbtIKA4IhL7bOoPA0csFj9eLEnhCDxssdTBpEBpneYl0461rE69tMV/j8Tqiu\nN62SKX+EXQ77k685CBoV01uM6J8fKY0WOX/pRAjIhnPP9qtxWfrKgL9FpiuX\nX8aHbk6iHFgG9uiQjAW2mwqnHw0f/LBi05hYn8z8MDJYRrihHgL38Tsyg/nK\nzt8v\r\n=p4im\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvHe6GOf7LdvtkRPZZ4jnJMuKu1t9ZuqZY31u1BBPTxAIhAPxle4WfDfGOADbuRF8f3X5DQ/eR6j3xkZlVpWn6E0Lj"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.740ed33b.0_1610474668325_0.561561405918122"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.c5c541b1.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.c5c541b1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.c5c541b1.0","@material/mwc-textfield":"0.21.0-canary.c5c541b1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2845f0e85b6a37bbfaf5110a5f16284cc8fda6ef/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.c5c541b1.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-xU6LMGDTtpWhv7bl1ShQhrWNOY0wazwL6WBjmWSXjAJLsNkteWQD9dtG67ZBizxxX7O53T/xADJyzKEg3iKNRA==","shasum":"5eda0eaa6776f69b16ab16ad2bcab72807263b38","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.c5c541b1.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/e5gCRA9TVsSAnZWagAAbGoP/305DozHVZtuUtyrPZuz\nsiZQCHZWbzivMEdKtheI27SCpcv/UZzDqawaV9hv5J8VrrfATDp6l/Swwa3p\n+FmIDLyKrgZtxt8ePiMW24FltYAQLRzxG0pzOq+w8w+Uwa+7g1YWVGc/9RR0\nCrzvdn56R6PWn+fmjHSCFXfEVEyT9uZbBQfQPAFkiTRIoeWpytkR6XuIB8u2\nXr+EdB7FHPj3D5IcYi7Uw3p7Y7IE0Ofy4+qoSv8MKMrY/R9LZEPt4SNeTgo5\nXEgD4dCZ/Gy5KyRNWCfAzKbGQbvONMYAS85G//Yp3grUe9y5comHPJkbfHC3\ndZOT/7U/4uBw7lnuLtZLCWj6EHBMA1uoI8pOSEPF40nz3s02AMJbOB4j2ePC\nTNFcGo2ivL2ZEQSjZV9VrxOubgMw3wIYIAplpl7PKWx0kVhLI8LhvYFjsM7n\nWIaEB5yM9eQa8MLMjxztW6G7drIPe1X7mr2vKcHs8b4bva41HNn5/LNoxiWP\nQHlOuCFLS4a7/dDqsqI+9ot7A0STuhXNQrRnGgtSY8wDXN9gmEr83yUxNChw\nzREfMZE1uw7znrhf3CFg57B97lMaIVyGMyJdM5QQG4bK7maJHsg+LV2pNkRT\nHgguqpJAQ2YkV6XJP6PBBawfTDA0H4CI9WbLJFg64lIA2peNA+rk2RGgd1yM\nM14D\r\n=O8ub\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdTFeDL1h0rBply59xUoFk5i64DLFRcfNXT+/YGTkKlAIgX7gk8GaYkFI/zrLy5KPFMTSuSw880NGZzlk8YiLaHYk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.c5c541b1.0_1610477152108_0.3233536100529171"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.06fe9d90.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.06fe9d90.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.06fe9d90.0","@material/mwc-textfield":"0.21.0-canary.06fe9d90.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"99a3aeb2c1659185c9597a59e5dc7599bbfd52bd","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/99a3aeb2c1659185c9597a59e5dc7599bbfd52bd/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/99a3aeb2c1659185c9597a59e5dc7599bbfd52bd/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/99a3aeb2c1659185c9597a59e5dc7599bbfd52bd/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/99a3aeb2c1659185c9597a59e5dc7599bbfd52bd/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/99a3aeb2c1659185c9597a59e5dc7599bbfd52bd/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/99a3aeb2c1659185c9597a59e5dc7599bbfd52bd/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.06fe9d90.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-bmyO3GMt7B9HF+ygYf8VB6Y33gnyswPzYAFQiG/MT7GkLR3wfRy9OcY+9Aj3aVbn9ypmF/01opPBW3dzNEsQVQ==","shasum":"14389956322be7b8004dd519ee66d05d344a665e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.06fe9d90.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/gy9CRA9TVsSAnZWagAAqZwP/0EMxKSQLZzLGUke3DwH\nbEZKHhpUTnbS/XKxzRZo4qpx8Kjxj5I6lMEQv0m07pwkgH0Kd4+5at5WODGx\nSrV55tbcYUzVZ8RE0oEU6Pjuaf5BZBnHaFZmP3MDsPMBCbg07OvrkNI9Ez9C\nCqUJKkEhNXmIykD8U+quGnx2ml3M8SGB4ihEKavam1xBkhocp484HHRmfv2B\nQPzzw8FNppOfz2putlETp538jXe8qZHApPEalOxUQVle8ynIcDoJkWtgsQos\nMiRTakL0BJB+h5iZgydz48YTqO2lWUvdCxdRqqMAcWjHbqpvbCMCOcDYWDXd\n2pEOQ3xFXp5+I8zPJci+Nsgob/rel/Tv1y6F5GgRyr2Tu36cpGxWTJEfea+s\nJ/OtWrxy07yJYDrcGkXGV4NpzUgVX70u1f5pPImYni+1lMhKjNlVZzWBH97Y\nvgXbH2hd4GCiUze2BJ3X9ImZjpV6C/ubT1gZxMY8RG40f0LKi+Y8xO19RZn0\nCa9NEJhp5XyvCdeE7C7UJoJOhgiIkz5EbYLQJ7r13dk3Xc9cq//ptIHAfbYx\nYmKeNfIdpFWLfgXkRMwYjFrekQYfhxu53FovN36vthD1OCgoeDGvm7RVBd2G\nPh0PouWSxtbfR+oHKR5Q4p6x9SZ3FAsO/Ynq2J30ajTK8VyyzU+BX8tcdpRK\n0yQU\r\n=8EZd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCh+6QrTA0jq6zmkELLJz+ixbQhkg4hc4NSw1wMUZumawIgc0HjPPt4xEDtmjhXxBoNTAmKyJ5I3aRTgSXi8c51/oQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.06fe9d90.0_1610484925214_0.8743703077644256"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.269eed01.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.269eed01.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.269eed01.0","@material/mwc-textfield":"0.21.0-canary.269eed01.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"537a9df54fcb929f413d5ba5af0dacf0e2654c82","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/537a9df54fcb929f413d5ba5af0dacf0e2654c82/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/537a9df54fcb929f413d5ba5af0dacf0e2654c82/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/537a9df54fcb929f413d5ba5af0dacf0e2654c82/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/537a9df54fcb929f413d5ba5af0dacf0e2654c82/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/537a9df54fcb929f413d5ba5af0dacf0e2654c82/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/537a9df54fcb929f413d5ba5af0dacf0e2654c82/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.269eed01.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-7tznADUnrPv5BJfWj2rBOMXjFtSKGV+Xq+BNM7FIa5c30WyUiZmivI2FcGqrlFiRGE3MRsE6HqFgKhNqHCDbgg==","shasum":"388f5f382bfcd99c318f347faa0cbe6eaf27077d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.269eed01.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/2oACRA9TVsSAnZWagAAuMsP/iIIEyF9jvLiTTVTngdP\nQPyFQ46t7V3UjW9dRH8d5uBKeNqNYBnOEHTbkHXw5uau8TvvzMPbk1CoY0y9\neLjKPic5eTMOEvjsifzdj4muxcUzma39yJD73+/U/zWOzN30WvR19FhupEMW\njavAK/9XvHvVwlF3qDtUqC/k4Cr0WwGHgJfeL9ZbaBobYbt97eh+xhiH1s57\n7MURWOzZmfNHGjmnpucYlr8/enqOebnK6jO45aM6rh0O3egZrxh6Gt9F8ocv\n+Q9HpiCoh1FK3f4yN6gmNhzsE11aW9eOkcMfSB5/mTip1XSTHIGv/e3GJEhn\n+o4N7x4mqW0x7VxSsQerHOUAK1cCJLSrkhTQdwV9Hhin3Tm8P+PhtKdMRanh\nXxGIgGF1+X3o2ECEPm9J1e/Nfg3e+9xoyXhmKJVe7NmTRtVr+2+UKvi+WyPa\nAedE+1xX9E+y61Kf/HlsjttexAG4/8ePQwWXfOEl8aCAFwmv4QgUrEpfkqOM\np5GzbrFGeXLy6b99b6c9xUZm1ymn6RrD2/ly7dR32smSNezzk8ZPGNykOKpn\nlo3MlrDVpREGu+5RUhONorZDMMHx3M8gjamOp8B4AYVO6EaQHI9jLGHlBZ/W\nGuA3S7U5G7sQO0VU888hvvuYxrvhdsfO96mwcOiT27MX4dXjLMcVKAMPmPKF\nGJGQ\r\n=74CS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXoe7Fq3AqTTPmiqvdzOLUIJscqHSAPVJI4CknrQGOdQIhAM4pDFNhAOpHoel2w1UEImqQCCLRPgMSnbDegyeszvZ+"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.269eed01.0_1610574335892_0.11297050349937954"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.8c075f35.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.8c075f35.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.8c075f35.0","@material/mwc-textfield":"0.21.0-canary.8c075f35.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8757321e04ca4329877d8b8c9924f78bd58ccaab","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8757321e04ca4329877d8b8c9924f78bd58ccaab/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8757321e04ca4329877d8b8c9924f78bd58ccaab/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8757321e04ca4329877d8b8c9924f78bd58ccaab/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8757321e04ca4329877d8b8c9924f78bd58ccaab/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8757321e04ca4329877d8b8c9924f78bd58ccaab/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8757321e04ca4329877d8b8c9924f78bd58ccaab/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.8c075f35.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-jgzk9h595ku05zmKuxX9yAdm8cyYZMcay3GqyEpkozmPTCyppJ5rbHYN6ear0lSrJIS4ok0MWh5WGzIGvOThlQ==","shasum":"150b88739b4db377c96876e6323e77b687484612","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.8c075f35.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/303CRA9TVsSAnZWagAA+TIP/1WfvpxRuVyfwBYFquSb\nFNXOOTRhLY3yLcWvdw8MeGXy/6uq4yD63fhT+yUqAijzz6xPUJc0z2YjBUyv\nrvEaEUZlQuJTL2eSTR5JHY3utITKjxasd6F19dhQjNuju+6bO49580lZtgNs\nibCnssJmI/2D690GbsUHGYCqcs4RiGlP+Nd5i78ZcaZdZ9Vdlk0xErz7fphY\nOmW11ZUt6lZRfWnEsaV3rvw/rYuWaDWpQBJuYkxf+ZVfgT+E7f8SV1pdqEOw\nBCxxZwh0Vk2ABBHS2cvWWGxsqogTwTtuunxaQOqcPI9nC3LlY3ScXLAMgs6F\nrcz4hJFWC5PQQB/PS8R0NCEXVXYj5f8NemosaRk4OP8PvoX2abDyFhQFYI8G\n24abO3wAlsl3zXRGXOF9jD9SHAnIXpfcF+oE6gylvKZUB8fKe8yu6eRV1x25\nPok6n+yHG5wBQC12SHnwoYWu+J7CyFdoJb1hedFngpzg7PTdrTCR4WPD5S9b\n7Jlg5auMJhGiKhs6+umo+PFd4S300w+8dw5QoHq6sY3wqt+hYFjA3g29eRyU\nNVw27RouEerx7AFPfu0GAZOcQEdhy5dVjhY4b+ls+71541GZTkrlxrJoGFKx\n49qLqcIA4fIeTirgE0JCissrCAAO3JDVNyBkevOwipAOzv53LXkei/8P4nS9\nYn/1\r\n=a1Zf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEbRO0P0kiJVlvvmY4avr+YmyW2EFrA1FjA7JOFqfkKgIhAI+tdLgz1PhekIfZPyuoTZW01Inb5kGEtHtHq3WiIPLK"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.8c075f35.0_1610579255240_0.29881846900757036"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.3cda381b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.3cda381b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.3cda381b.0","@material/mwc-textfield":"0.21.0-canary.3cda381b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d660dc72de8b9d23247ab075b6f4f44053c9cb70","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d660dc72de8b9d23247ab075b6f4f44053c9cb70/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d660dc72de8b9d23247ab075b6f4f44053c9cb70/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d660dc72de8b9d23247ab075b6f4f44053c9cb70/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d660dc72de8b9d23247ab075b6f4f44053c9cb70/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d660dc72de8b9d23247ab075b6f4f44053c9cb70/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d660dc72de8b9d23247ab075b6f4f44053c9cb70/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.3cda381b.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-PETvNHD49fQ4kpZt7JH/OQkIaRcOHq1yF34meDlOmpe8ROnjEIPf4+va3RWEeUwZ/+KIKArhlOKXuEt2iwGC3A==","shasum":"ffaf8d37d4cfbfa5baa523187be0e660613172dd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.3cda381b.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/4qqCRA9TVsSAnZWagAAimIP/0f/G7lNl7wK4B6ObR4y\nZ7nUy13iQnYbPDkd0h6ijg0bSuKQzhrnGJx37tC4JaJzIiw0mY9gHMP5xKq3\nd85cL5f5yGEYbN75PtDXwrTIt7oirS3RwPQW6/4BffsmJKbQ8nick7Uq968/\nHnynHpGTKMoWA6b79c2qdFX0Hoz0fSu3WcEZ1ljMgS0imRfNlTSKqZgWaucf\naANrQPJhxahlqEzwjUBFOAkZ+vX1JqzpbeCoVfJtPcavtNJSyyjs0uBGnAp0\n6sMU/7NBhUU7sDaDoqHWRsZ4oO6wKSYmvGYgz2qx+Fii3KKHjkxtVYvtLcQ6\nkTQxva2GNCiYlXe9sCsr7DTsh5xyNW2PrcxrsMWnE5N1R8ieZXU/jkmGeu//\nwp/+msPtYI7oS0MyBWEVFgUGdHcpP0CbEVAQCPnSwQ6L2Mul1x+rfLZ80O7J\nv2PY3h5CBj94PXm0h/1NPS3T8mtGJlKuaEmS67rSJhpraCcWulP0SoqNL2V0\na+AtCiweaGdutchSlbcxZBkOOt9iOI13FkikVUvhKMPCulBNZ0+xZo+/zLnl\n3N8hmtrNvBBsxzCdFRZ2GHLr92PJ0GHdwctidmr0GZdWPASpf4J3mynyWudE\nyQKHAqh3dmxUA0z3K5pyvn/VTGCmXCYtPKwfHc6kw/3YRUhvDa0ZDiyMQ/Ii\nNrjC\r\n=BA+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCm/HhKeN+p1ehpoxh+zADEwmJHLROS1OQAgxVAw9wwAiEAk0+gkgO9XmBVmkA/jvuUIVcSCUsZrKDUQ7PxGhbbBEw="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.3cda381b.0_1610582697733_0.5730515528621059"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.bc113605.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.bc113605.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.bc113605.0","@material/mwc-textfield":"0.21.0-canary.bc113605.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ec7a00c7b7cf2145c971f64e88b375c09a5409af","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec7a00c7b7cf2145c971f64e88b375c09a5409af/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec7a00c7b7cf2145c971f64e88b375c09a5409af/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec7a00c7b7cf2145c971f64e88b375c09a5409af/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec7a00c7b7cf2145c971f64e88b375c09a5409af/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec7a00c7b7cf2145c971f64e88b375c09a5409af/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec7a00c7b7cf2145c971f64e88b375c09a5409af/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.bc113605.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-IOevRQUSEmidIVQM+4RXklqpaAuceBNVvjZhA/ACEwb3pqJJYEjhPNN0VrraaMUCMFE3EwKLWdoEozdapbXqqg==","shasum":"787e07889c0dfb26712bba6e9a945444186453dc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.bc113605.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/5RHCRA9TVsSAnZWagAA5MQP/jto4EvE+ACf1999kFuk\nhJeS3RvLTFEeXk7ktcDYQHm6la5I6WkUWIuQ/PMyec0R5XsScPJQ4PW6UK4W\npPTCnrAW6UjMy9qJZl2cHDMESc+/OxzDhtYo9HCxvNbfmI54/2waohI+zCkr\n1y1GoAlYZchUFOH6959iIFcq3qzYVTVx0UyisM98YNaKAuq/6ZkNu5/2ns3q\nLBenAkZrSvPBH5SoFEpK8vbUXFbBP6KpXOICXfkiqm6VtTylgrcSDL4y24SG\nCj7h6BXU2pRwMEwFTkSBlMkVYUDDbfQmFSIiu2Hjuy4ZXTASHFmxZDxeV7Eb\ni5mcfEo7WcrsrlhQe0aj8rXJueWc8HqlhnJT8ajDRhoxn9rHwpMa0K0PVrIh\nnHMFFZrBvZOy0591nGVZb0BMlTgjvJiiN4IFNWFggI9M8xd9mgvuRRTG/w47\ndBG05FYZ6GAU04ZNd0b29S85+f17AbkZQ4Rgui2k2YrdMEcSB2oUxoAUEty3\nMmS8K3BRPFEHEpPnV6aeoDq8Z1F8Fr4wKjrnzvLoNmJzZKvnbwznSQRrnhU5\nvHEZWpg1vhsmzpQ+J3ckC5Ps8BVPNooKeq1eMpl40WuAp2pKLeHyMFoRhxHM\nZnuMZWCKVtH/t+Gn+lKkfGtzjo+FfOWNZIwEpl9QfzWUjQhBFsUdCXGfbcSD\ntfEC\r\n=gw4P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoSi9OdT514wUVg5qxnikjTAFHZwPkdbmWf2kNuA8uhwIhANEY3mPyB+07j/VmnyngjAekxRaqb8RPDpMDg2OIzWWi"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.bc113605.0_1610585159242_0.19664549626671124"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0c1d6ff9.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0c1d6ff9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0c1d6ff9.0","@material/mwc-textfield":"0.21.0-canary.0c1d6ff9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5c7f60619e642de2f6951662670ef490a6e46e70","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c7f60619e642de2f6951662670ef490a6e46e70/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c7f60619e642de2f6951662670ef490a6e46e70/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c7f60619e642de2f6951662670ef490a6e46e70/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c7f60619e642de2f6951662670ef490a6e46e70/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c7f60619e642de2f6951662670ef490a6e46e70/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c7f60619e642de2f6951662670ef490a6e46e70/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0c1d6ff9.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-KXyZi3R2kU7tAZ2z/O/jWLUKZ59g/Lppid8dyby4nvNUrqW87MS1HeUWgk8asCFaWQlTIU1PvHqkwC25SamHMA==","shasum":"c132205f24c46b5e84a4b4b2dd6d189b63274011","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0c1d6ff9.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAfaCCRA9TVsSAnZWagAAUCMP/1C4P8lgcRWfbTmTadtS\n3zU0SSZEgJI/1xjmrAt2Faoh+qrkpUGBVykK/KMq/dRM7HW72sDM/pxxPcg5\nqD99+Nk86A7nJ4EpIEl65MxqxvX/LzrgBCK7rnbOZrUyZjdn/DMOsEuTyKPA\nUGIa92o/i3xKkFu4zSHdDruHKtnQ86LnA5j2otrAEgiMtRyXcpsRn4MU9o3U\nDFRysYgmx7T/NQLQnlY2sEh1fGd5xQph24a5/nVIXKCSbI+cKh+Eekk3MlSk\nSa3UzvcJ4Mn+vrEK+VyuUjRgmnjLIWetxpnsbtsoY4eyzuYxK5s0FTuD0ec5\nJhO44qOmgL1Ny8XVNkJ0I8H5vRPmHiYwCaB815aryfpg6efomq+9rjUQ1LnB\nuFAE/kB3zZ3DUvRv7ieK3+U9LdwnTzSnzHTxjFwjRPAvnt/VeUrE5vru4HNt\nT7qWHDgsjPxFG2gMVewOSQ3FB7sgUnkHyfActwT7Da6YOQ4ZgeDX+QAXyCbY\ncx91u+3+6qoCkS1+ve1uoz/3vNDQW4eE3SsRxe/6QaDttZnLHFPYDQ6Po1AU\nb4QZcLsQhwCbRjnCPKDeYmmbmDza6LCqgl7ClWJZ1rasqh6ksR34cVcyPsWy\n9b0YqJNlRUzZkw80FjKA0/F59jAm/W9LiL/PzKxQCRIqMKljlXbr4wcvt/WP\nF104\r\n=xU8n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYCm9bZUEn48F5TH1vF2yHMEr9vTtLN8BHov3wjK34fAIgPuEpLspjK0Wyg6sgW8VEUmG5rOojDQ5vn5VfUwv/nZg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0c1d6ff9.0_1610741378466_0.2865678100007394"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b4332e00.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b4332e00.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b4332e00.0","@material/mwc-textfield":"0.21.0-canary.b4332e00.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"823027b19badea63e32aa35bfece324daba62e19","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/823027b19badea63e32aa35bfece324daba62e19/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/823027b19badea63e32aa35bfece324daba62e19/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/823027b19badea63e32aa35bfece324daba62e19/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/823027b19badea63e32aa35bfece324daba62e19/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/823027b19badea63e32aa35bfece324daba62e19/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/823027b19badea63e32aa35bfece324daba62e19/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b4332e00.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-96B1ARM0G9nrstBjPWPEuC9FOU/gnsshyMrnFLJerYGoqX1Lc8gsDinR7vWLpqjaN/+FBG5U6v3Er5GnBcIn/Q==","shasum":"248697b1d7052af5d7db004c2e30781f8732db4a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b4332e00.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAhIyCRA9TVsSAnZWagAArOwP/isyniD0xPfvG0rS+VSx\n3ODooWEo5UEy7Bdr1GxNWqkvh1Rd+81AerwIJIckxk1QeMD28htjY75uOuAR\nVbfOLgwUgIZvTuRO14kce7S3rLOnt5z34nsctZ42RCrtR6ynso1zAvKh9i9t\nyC+goDp9N+dA3FjtZ3sJk2wy/Jv2GoWfAcO03+V9t+dVE1kl9DZGbAId7keV\n3qkVcAwbLrkspeG3DouIf5KfbXARxAiyVOhcrsgvnC6viwv5J/TuaNwkhD4b\nyLavTtVGe8S4KzqS5odqzWygN2lXaHDVmIsNb2Byxxr+s2EoTiuFdh8y2kJk\n2kwibPWqNW2hHehYAfETRjGqD31GhgAhj0HWEytqoPXWt1oBl2eChk23POCy\naKZjx7tOCwf/cZJjQR991jt6omTAHNBO457pHC4pwfpK3PB9WBc9lfnVrkHw\nTohk1cl7UTtJ6DHMbMgz4GWuMbAYg5eVKy64N4b5TJjCmKnXO32Hja7v9ljr\nuNYeoz2FdkNU3TZvBV9/SFD3GP43J9j3o1ssui3q573LUnn7oW0UFrOHxKKR\niepqUEE5S2IZqx9Q+RWV9CvAFGmL8v1rNlFpReDdJ5PEYtbQqkWxlsExzIwY\na6PPdbwFGTJVCVYv5AqJJWjhx8CPMFS582HujQ2LxKERsOOxu+Au6X8waToa\nttyL\r\n=P7+z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9JI1ERzc0p6oFYexDHLDAZreilXrVTXCkLMcX1cHjWwIgY0aR3D6VrX11CRqFToyt2SUddb+B9x/8tkXMN+OxKII="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b4332e00.0_1610748466352_0.7577881343186179"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.2899691d.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.2899691d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.2899691d.0","@material/mwc-textfield":"0.21.0-canary.2899691d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ad2d9fc5a5b47298a72fb5fe6e82b8c7c9ab8e44/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.2899691d.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-uU9irlE7BZuDm5PHZXuHKQo92k8k4Mq6suYOnteYQX46FiwHPxtVtlsa+CijvACR8PWfKA7IxJxl7PKXF7joBw==","shasum":"5453211a8ae8749644b9b3e142391679a0c46ca1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.2899691d.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAkUZCRA9TVsSAnZWagAAswsQAJYKoZoN8rE0dHD9CRSL\ntq9m9nMFoVszBP0JMF9ohGJgR+VTOfdZqaOVDW+Jwh2DCeAaqzrXX+ezQUfX\ndUsqqUneZ5JRMPHr/3pCk4I/puM/shxiBnPo4618y55vfvGgkcDeockfFtzx\nUh1XE7JUe0hpuu8ahfq9RG6DSExHLkxnOw5KjaIYueJ/G0Z8qR4ETGboAuNA\nOJ67Pz5cgiW5ESM/mmmMNH89Dt6DBDBDgn/v5qHGSnJSwoo9jFDeBPconL80\ntx4bKXICex4WqxUsyx9uHGUnqN7dcD5F+vrZbNI/1700dxi+obyenfc1usfz\nh+SPe/Zs1qxwusXsmxK+mGS6jQ5e6cNHrMqwDE6torCHO+ZyzgeHWMAlmbtZ\nZWwYgbkJOojBT6nSNGAS07NK4rt8JD8DlcideLTw/PdV+DL3NV509d9Fax+z\n9tv5f93yJtJWEl/V+XpFEddBzVsak3YcAVSvm/QARwGS5mXDREBBBDR0v8Mu\nd6cgx68/LEjhUIhfnwz7JjwfOaKa15svc11eY5dO3147sfByJisJ8dU+VUMb\n/Mq5C8SkaOuhZDqvKTGV1B28s+Dt2TgyWOzTCuaD6NaD3Ns/8SOO+tdcG4kL\nkoqWINxNwkMEBGgKLQblyQxZcvtpp/dz895bpowUlLgJa27/DVKiNYr0o0Sv\nnX6V\r\n=U0ai\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDF9rFV8p4AvQj/NT3E4zhMZ3XdDHIlQHh0ljyn5xGZ2QIhAMiIVrMYo+uxT+lbZPhqvVjT1Wk6S6DC/PgZdBSB2Psj"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.2899691d.0_1610761497382_0.6817914161022982"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.fe73953b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.fe73953b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.fe73953b.0","@material/mwc-textfield":"0.21.0-canary.fe73953b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2464e59ad6a1d74aed7f8ca3477c1f8d244eb8b9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.fe73953b.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-1fLY57biPDKf+RoJBJGIWr2UtyqOboaa6zXnhjTSyH5jAzanfunnkZ2Ly37XRrjYKImWO0fx2BCHhtD9wwGM7w==","shasum":"c5542d2e7704eb9ce2eb5d358a3ac8b599f64a12","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.fe73953b.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBzFICRA9TVsSAnZWagAAet0QAJxLSxDBl4OCm3DQ6Xpi\nVPLLdH7DnSWOpjneSUOnXpJ6Bg0y1wNijzmC2X1p8V7/PfNVDW4YwyDAGtEJ\n1fqYCiHwo3X/aosJG4MAKX52FRKUf3KCzkieDteBfvi+jnTQ/NYjRXanmQ0C\nLlJMhYZYXwM+8ca2YivFnx30hSfAdzEXhcR5L+7lRZE4tbGw5FC7hsQLM7t6\nxicZtRceB7DuvgyvrqpttuDUAZVvDDbX2uRJnCxutA4iVYv0zMPZu0/OZ++o\nG/R8lz5v0ALTFxp6SVur6rgteYLomxBUbktGlk1TQIIGjKbjuYexvyHtDNsD\nUKRdmcNooo/sDRN5xZPqjvXYrI9iXrPWw8k0HkcgvA0QZ7GGBSZO6DwZFfu5\nP+s3Zrm9DLzJ/K9vDf6Omdp5B9N2841Qi+O2zLq8SIgZAsIu3PdGfCFobxUB\normVrXkG5uNY31yMlsv1haP5+Nytuq8TSRgZMY07ib/cVMPVudZaLKdg2hsd\nPDAMC78mSOpTLYG5xL+JD7l/nJDcTmzKMl5lxwnsoQ1Tn8hcqWWfdzhige2K\nf+k3YlG70J/aOGBQ8DOG6FnQgaFCheGZMNmPoXclkNDJoN7UuYzsAuN35czh\nMrBT08qNI4zappAFraWXPFX9niOYf6zRC1MWInBhs0gGbxSxIAbaMdmdRbmO\nNVyB\r\n=d3r+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfrf79m00rnTzL6mlGEdbOE72MPP7+6ihRpuAb8eDZLAIhAJizqsRQtXVQrIpcmKb9SUYHghlevhLUk0sqOGkwcBza"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.fe73953b.0_1611084103916_0.9941066662439852"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.d3a16455.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.d3a16455.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.d3a16455.0","@material/mwc-textfield":"0.21.0-canary.d3a16455.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"cc074ab80b57efe95502e551eb4d0ce6a153094c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc074ab80b57efe95502e551eb4d0ce6a153094c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc074ab80b57efe95502e551eb4d0ce6a153094c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc074ab80b57efe95502e551eb4d0ce6a153094c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc074ab80b57efe95502e551eb4d0ce6a153094c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc074ab80b57efe95502e551eb4d0ce6a153094c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc074ab80b57efe95502e551eb4d0ce6a153094c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.d3a16455.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-T9Cfwst5JeiKCZAvordN2hOVXQjKkdN+N5+/O1QHmzCPxack6MpCbTr/wpuEPlq22G2ehGM2HpVnWJVa79pPDA==","shasum":"59491f9c88fb15311033e325099d33af38ab7ff6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.d3a16455.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBziJCRA9TVsSAnZWagAA1NgP/1MUDV+ndm1mQNVSi/e/\nzONglyAsPrLbuznA7vdPMrXhWSK6qyuqyEaLMwXvIoJhs9iZyyw28aQcgVUr\nMFCUWnCg5jg4YfzEnAMVL+B5zGJfFSfXgmPPN2in7e9LJYdjPgujtgm/ar84\nRFRqy7/ceyGKp2qJ8gB96+k8b/NWfBwAzT+wqY2SaTHbcWevh6eEHZ7z/Yhd\nTdsAzeNKFhpv7cji9HpecoG7d9duv8o6c01FUY4app76aTDVHSuu0YBuyti2\nyqMW5LUhoyjZtcFAMW8i5MJf1mYEcvHuHC5A4clSCHZg8HrFhPrvW5O2VCE3\nriDSKHUNew0jYDtDsT89aFtQTeD0g24wp+LWv4BzQkrpHGXO+T2FP//RiYdF\n8GDIxJ2VgqhcBpZ+lubetPUd3MPj29nYOgLP8DFGHRfuC3FvXNXAL0LIA1o5\nsyGG7S4yTaV3OLC3snpW+G10iyhl2ENxT0Smh0KqOT2PaedZQDP67k9AQTMU\nsNGoutM+s/zkKmNHvYUYs0ZnEXywaiIOzJX7M/RR9jsUnqKxrtId3stUrUHW\nziWpgIxPCsVmI8SLasjwrMco6PtZ5rUXtTf3qhDRDyfW8nxe29wxpsmAhDId\nYxDv7KDuwSjJInzJunJso2YRg/fEFRXFn0NAMRwBThfBSubklvNVjmmLt3Hr\ns5hW\r\n=gSeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAv25eR9FRvkkSrLLY1pc8bc3YfjB8/C5mLNA4mGFruAIgH0THiEGIFyKWfQ8quhzRAeGrSgz4XK4hylNHvy9G++8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.d3a16455.0_1611085960974_0.6402494880138436"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.597ca1b6.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.597ca1b6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.597ca1b6.0","@material/mwc-textfield":"0.21.0-canary.597ca1b6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2dea4d182145f148cba1edfd7b358ed05bc6c8ea","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2dea4d182145f148cba1edfd7b358ed05bc6c8ea/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2dea4d182145f148cba1edfd7b358ed05bc6c8ea/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2dea4d182145f148cba1edfd7b358ed05bc6c8ea/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2dea4d182145f148cba1edfd7b358ed05bc6c8ea/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2dea4d182145f148cba1edfd7b358ed05bc6c8ea/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2dea4d182145f148cba1edfd7b358ed05bc6c8ea/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.597ca1b6.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-dRshxxtGKR6oW/3apkt7Xp5SgkOldZZXo312oJhFFwA58Db7SrYIm0PN/xPAy4AbsYILid4ApISvcNtWCbqmOQ==","shasum":"aeaef49601390a1562118738cc4e3dff7002694e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.597ca1b6.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB4CxCRA9TVsSAnZWagAAfD4P/1yk48F2OmkmFVyWhXDm\nHI+pQd97tsIyCml9cERdhBRqN1E0e9vTR3xPm4IRnsiImmODhVbmWIXEON8q\n2NuvD+viPW6SQlA7DbhV5an0zsAgbgdfVrWDOZNBiewImXmMHLskK6a2dim6\nrEPDpgRcmHONenAkSoEEHzp17Kvo0qS+MWUCaS90lnSR9d73oZOOCMVfLpYX\n2qNG9B0kZZ7Hsw9JDbFE5eqIraZl97w6PQ9QL27VvJ5V62OOAr0j5eGVpXcm\npW6mxIzidaEVO9gYIyypizZ8HZxNX8n4Crkiyt4+5K8JHmEZGKshAmQxRYgn\nsMy8t0Fy1a/w6/iH/i07Nxt1qEcPhIqHI2O0By/KyNdcJTUJ0KTB+fbAt9LU\nUi4KrGdTTxsVQn+UyXbAeVkF1U+YBUkADXyVS6BGAVNExj1Dsiu+XcD82sDI\nvD0oIXQwwagUVNUJHnkHNBvcw9GIOKpndfPDzW9WhmAdiRtN8z2Lrqp+CTGv\n0HutsbAc2I5o/sNF2j2tIveWX9oViG8s1/VxigwdmOrXK6vO3MneYtQO0ems\nEQsG7i3ETvrchN/6FaK/KpFs2B0KzYpQKNsXTzB9oCJOXngmIX6AwUhKr/P8\ncZ/ZT0avQuf9pV5D2MQ7zdGc6SL3Y/Hi0uquR6FbVKzymCzUVb5FBSaUSQuC\n95uK\r\n=8P0W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBp/0s0vKJaY6oZVem0PXHrIkYn0SuImcgqBGYIFg/yAAiA6sT7GaMXf0BH6NhFeKRt7LLG2GmKHioH7Mkypj0GczA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.597ca1b6.0_1611104433312_0.28594961712038924"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.3c195efe.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.3c195efe.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.3c195efe.0","@material/mwc-textfield":"0.21.0-canary.3c195efe.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5832b828afcaa6412dff007228c15a665862a145","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5832b828afcaa6412dff007228c15a665862a145/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5832b828afcaa6412dff007228c15a665862a145/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5832b828afcaa6412dff007228c15a665862a145/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5832b828afcaa6412dff007228c15a665862a145/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5832b828afcaa6412dff007228c15a665862a145/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5832b828afcaa6412dff007228c15a665862a145/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.3c195efe.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-KC3EhdyYNcg/Atlpx9zpIhq7CswSVmJLG+zsr7WAhTqFVmB+KsPpAjZ/FaBicgqGp+ihzOxbVdOU+lYiuYcLzQ==","shasum":"c1876eb016dd8eeefe43c883c8a2dead73f38ebc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.3c195efe.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB48NCRA9TVsSAnZWagAAQucP/0TN/bc3+OkL8KepALKv\n6yts/JKMA4ig8PFZRw4NV4cAUHvFdaIiY6VLbkO2yp9BD9Om1INaD82aYEF6\nOkeIg64VfiPfVjczvAe/f2G0NSsLz9VPanoC2RSHvYXGkjut8sxR16c2dQtW\nEl74zc+nEQsx2TSCl8O3cGnBix/jYVneyVXPlkXCQWKpstDoGjIwzImdBp+Y\n0SK26s6JlKZu7r0WiDq32parkQ4DWEwYWBpvU3qAq5eUk/99BdXqcQqPtSCT\nOt0pndASvlQmn/RmqPYH3vPDKi9iLNLF8ia5hKFntWQu+rNoeEQULao2TTEL\nZTqcy78w6epHbMTL2g8fW7cHQ69FNB6WJIUue2XPP7m6N80+kw1HlihLeCJn\nri46JTHVN662bJ2PtfE+IpJdNxWOVH7zJkUZ7Jp3wIOy62KxmhdBk20J780V\nl+rmCetBB/8abAk+036/SI3sKUFVHUYkWgCUZP5ViP74TuVeGh80Lm79LsKS\nZlgyuPjs0dUt3kC6dzDA6Vs5LHBY+187VsCp1GCmr3+KI6a/HDBZ6NEGF0xa\ngG0DI80WEf3pJD0hLDqN9xeNswQcoMI/gh10hJmFM3WoFO0Qh0fhusT/HO88\nG6WvS6GDWZugjFP687RbzTtyrfp0bCW2jr+JPQUk49wFZcFm+uGEmQD94U7r\ntkiF\r\n=Cq+Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYy1d3lBOmnYJLScN1YxQXiMe6NDkX3Q5WiS/RNtHRmgIgG21zZQbOTnsPmxOGwEcCT7BKlGd21IEm55gsCQdC7to="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.3c195efe.0_1611108109106_0.02835730515209023"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.f7b8755f.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.f7b8755f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.f7b8755f.0","@material/mwc-textfield":"0.21.0-canary.f7b8755f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"189595c9eb20e25a71796a5720374331d50a7f72","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/189595c9eb20e25a71796a5720374331d50a7f72/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/189595c9eb20e25a71796a5720374331d50a7f72/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/189595c9eb20e25a71796a5720374331d50a7f72/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/189595c9eb20e25a71796a5720374331d50a7f72/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/189595c9eb20e25a71796a5720374331d50a7f72/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/189595c9eb20e25a71796a5720374331d50a7f72/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.f7b8755f.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-JytjirO7xkDqV/HQv1ev8jaixUxfhd2bG1w8IvSaT2BGlMaOtpbkATomOZr3DQu5b0TLx8R3J/VTkqXG2r1NyQ==","shasum":"4dd1b6b5ad6667434bccb9413f5e976138b5f65c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.f7b8755f.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCJSsCRA9TVsSAnZWagAAZTMP/jI/z0E77G/aR2DsYKc3\nsumvvvVQb6NjnfZfi92M3Iwz63lqcHoxlMrn9aHTH/2QwyfKusdqlN45vOcF\nY+r7TUJQkmQCL/mg6ycx4yHlPug/kCTfANxv3AnMe7wX/sNxDVkgETYvghbB\n/mT/XVC8a2rpOD1o/uCNel54cX51HO/qwOs8p44ZKpEvmmMFyN5OvwKK+FMs\nnjU4HgTdGE6V2tIFU7cN+l+D+2HMSNiDcbxtwKrm0c1AJx4TPBdCwkXFOarG\nVjp1pP7yiUv30vCy41HcUJQ/l04VPBmX4OwNF4/ZDqGbCqgVT2/GzaWSxrTN\nbI7cVLhtEpFbRnqaJMbny/rHuUIlnHkPHDnE1EwYuVPHPNyH+xJrQasFJuHt\nldDr5q7o7Z18eWu8XIHOOHiwvvdS7J/KhtiR1ff/HkLhyxtRDjIvYOm/6qoM\nTWoKGzqrQruz+3u9Tq5gZNCVK6Hmr8crCeTavEVCKWBXl0bhrGJ5CJtAjLvY\n/U8749hYZF2eX9hAtU5WqDe0pS9RpYwV8vhQVUm11CCfo7JdcUqD27gmde12\npFTyyqvVPtKslCesP8fFk6PyFtqUxvhzieHvaoD/oug6iAGXuiWzI+/xzg79\nXpR9h5fqT5CHXZ9El7IOm4TwpBBrmCXX4xpQ87MomsFlVp7Glrma8N8P4tUJ\n2xis\r\n=+i8m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/inSzY/miny5+KXvfIyJFY7IvXQoz4sBjXiDizojlzAIgL9QsRqO0SuF06PKiBeK45Ai04n/wDvgJtmKBUXwzsSs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.f7b8755f.0_1611175083571_0.048121196008500844"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.f60de7df.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.f60de7df.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.f60de7df.0","@material/mwc-textfield":"0.21.0-canary.f60de7df.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ada07a353340882b0d087ddf967d399be3009123","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ada07a353340882b0d087ddf967d399be3009123/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ada07a353340882b0d087ddf967d399be3009123/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ada07a353340882b0d087ddf967d399be3009123/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ada07a353340882b0d087ddf967d399be3009123/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ada07a353340882b0d087ddf967d399be3009123/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ada07a353340882b0d087ddf967d399be3009123/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.f60de7df.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-YPND22PoZyRelZO2NjV6gp895QZxFchVuEJVi5O/e7f+e3j9krqgjvJUYWTX5ynUhIcHQWuJABlaXDu6xp+Udg==","shasum":"d9c47e55d53f1f005d4f0b02cf2c3fb4e1bfe074","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.f60de7df.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCL6aCRA9TVsSAnZWagAANasP+wTiw6Z5W6KTO0l0m5NA\ngErM/ai2OY/ROBoFEmmVYUS9cP2MleFnFOvHYdSTU2z6oeZbHP7uSJioRTuP\nBMFEhaZOWLEzJcGuDEOWYQaffx1q9T1yxHCMOD/uMNlNTazz+qkIW1v7k4WU\n7YaXaBgu3elWLW1KnFDRVkOauBTNMYJZTobEcBt0ZiPBFA73SgHonP7VMm/D\nbZIuq6FM4J0RnG0eJcwG4LAUtc48oSo5+qqEKCz3kofwk3NHcqysnQhIW3CB\nfps76O9oYNjOCLZj0RJcquxEeLgtg3Jl9o44d0lxs2TEW+XxTjG3YXSSqsXS\nSCyoCc6KWJur2ZqazRkE481K0APMnlVVtOJ5e64h7Z6pmITZvr5oDjlLDJ/g\n8kzG7fFIXviHS51PZoJgYzUZ7ecmeQgOqQTCwd4AFIbvXvhh/J9ZxHyHwYVt\nS8UrMb1Oa2fXI+atppm0wEhTnIVFMhRnHIISXj7qnactJ8ounFuyNRptM9FD\nYjzST//Fm9Fh7ICjtIMM8lG0o58Hw/a7cnKIZh5WjUo2tBu1JhYlUyf/gslO\nFZX/UDgPGws/WmLA/vJqOHnyiV7r2aiPXhZjN2YjmXC1F5nQTEJGTpvZcQNh\nIzlW9lPJZxWUlMlGZjusQPKxvbofqkX+Ou7G2P6h6PHH+F5AVxmg/havOtQk\nePTP\r\n=asTN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6fZhXDlOp7bWujy2qOZo8b8x0aJDC9yK/Msk62vPQpAiAypfW1P6L+IB3yZ7OkGcB4s2IgsHlBdnxNCRHnpVweAA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.f60de7df.0_1611185817467_0.4920215192197255"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.664a2927.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.664a2927.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.664a2927.0","@material/mwc-textfield":"0.21.0-canary.664a2927.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af2f8cdb8d2e4132b15e0b5a79f060d43a3431d9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.664a2927.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-azs86DoC7SlW3hSldbDflusiqwspUz5VlCIqzQqXl2EI6o7eJ4a/Yu234p9cmKOp1a2t5oZzz7sZT//dm2LRQA==","shasum":"2761e1ba1e2f683b37a1b106e52b6cf9f5480fce","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.664a2927.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCdOfCRA9TVsSAnZWagAApWMQAJBwZoP9WVLIUFlol9HR\nrlzkdvPL5Pyyl0TpOekyDzFUf0GteLIrbtBmdkiPOgYOEXidbOEw8fKVsr58\nFdvQAOeOsAe1froJ/RvmICQoesOCtQPsHIVESHRhVvvLR0kR5CDUVIPTg/4r\nEpraPP82wVcad54EUIyfMwPW4Gw0gPV8gSL4Nxy5DiU8kucIEzs9rDRIxl+o\n6N5zaQ+9Y9EI6J6USQ9UTKJDgX/6K7mUV4l64UtLe2FVKtGMxbiM8d99iZY/\noeCv4nbmYXf8apfhdvNu4Xdp+dZhPlMF84FEAKCUzZJZPBGJPobqV2Qgv21s\nqKyC//kLIumToazU6YK+XMeE01jkeEhj5Xp7sZQjT9Vdp2AWFK9W+MV3fPQe\ndTKBS5AY9qTODqF/Aa8g7IrXfwCsWohfW4DyJOlX/efxz8VMyWaVn6hIM9Vv\n5AqC+3KS/QDb7LsWPrDUC/7rnPTyvo760P5a1VF+FW+W68E9+6Jdlg3ZeKfP\naemKDMsMf3sL8NjuOb1mc7i+nx15NecR/gHPycyD1Nih1UIuCUy6CBao6zjZ\n0X3eJ5m0VJpYPHXJkgIJpoHgOi4+xMH/TJEJT3c04FmrJ8g2WfcvkhviSZV+\nFlyiAuayVEMQJQN3KPZsBaUBXFpwL7oaO+Xja9T8dN9fP5ac9i9LYujhCIYY\niugy\r\n=T0rq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChGrO2+hR4PVmMireHyMd8pCQ5Rxpd2b/Tlh+6tS5jKgIgZLc5xiSH+GryOeIQMKjWHgB1N0qL1zQcFmcTUcm4Q4M="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.664a2927.0_1611256735037_0.8972954295431803"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.a6d312e5.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.a6d312e5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.a6d312e5.0","@material/mwc-textfield":"0.21.0-canary.a6d312e5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c9a270f0f64518469d960de40537a07c4cbaf812","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a270f0f64518469d960de40537a07c4cbaf812/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a270f0f64518469d960de40537a07c4cbaf812/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a270f0f64518469d960de40537a07c4cbaf812/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a270f0f64518469d960de40537a07c4cbaf812/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a270f0f64518469d960de40537a07c4cbaf812/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a270f0f64518469d960de40537a07c4cbaf812/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.a6d312e5.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-oNRQixpnQZLs3Px15IlCAJnO+C6Bjt98HM+ZMJpN6kQ0DjSk03ClBLW+e/3rLpBuh9pY1kfH8XAHe3iR7mMUHA==","shasum":"75084bbe73d6e86a77da3febd8411a6f29effd0f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.a6d312e5.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCfaKCRA9TVsSAnZWagAAuu8P/AnLwb1ivo1dUILk8ElF\nbkknmgEfEKleqALQpal5jG8FIzMRPP8z3sCP4Hb+53QDCxDJJUoDM0X0vYZU\nZuhG0OpCy4dAGBfTp4zjsBtOfEgYrAZQ/xKTjTNfDoJyw7XqRrxRJ64hVZEf\n7QevS9MUccrvPFZwfhRs1VwSt2eV92Yrc5TIfjGpKROZov1lhZluaSs5Lqxp\nIRqTQ7gYCadxVp2ECrug/h2gtqllC9Hs5rVu9g3CzadlZlLHQaqL81IRLNBc\nm+NFvB92ri95+l7Pvv7cFK7hHJwqbAnsOc7T2A9D1QRbXSafl7AvJ5o5YkjS\nNlCFuh5wZJh5oMs2WT6zyGVZs/O+U0v+LulqvtBY7n9uMP18Jec4ySaAoFWM\nHoycevAq47j9kF9SWfPEMhBMaTEbGV/rDRX8HDeQ8n1DHIL1IvmHnMOzl888\n4MKrV74ZJ+x7GEv/YXgjHfFwttMhjZzWDrrO0SszLyMNpEcTW3VKn1pjv/+I\nSIknBih9gvRy1OiNxAuU4Vvi+gHWmhxV8twLNiYAnUpRPYN/WdSmxbh5XRuM\nOD6QczVBnX3Pd2ca/lqNuAcX7XKcpOOgwxVGH5ljW/PDDFg3GdKfYuyv/M+x\n5p5s7LjLYNWOCNpGP6In9aX2wzwrreNN+rqWKBttr+aKilVQ0TZFuC6kwnNr\ntACJ\r\n=hmcX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECQxrT1u76KqVkbgXNq8bojIZTOmXth1rr3yGyVCCzVAiEAw/nPuMdOcUxGWJxKC+NZOC20NWIZ5y9M5Z5k2RKNaOo="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.a6d312e5.0_1611265674456_0.641140451807352"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.027365eb.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.027365eb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.027365eb.0","@material/mwc-textfield":"0.21.0-canary.027365eb.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"85e9fc6866aaf5bc83721e8c823275ba9232a536","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85e9fc6866aaf5bc83721e8c823275ba9232a536/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85e9fc6866aaf5bc83721e8c823275ba9232a536/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85e9fc6866aaf5bc83721e8c823275ba9232a536/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85e9fc6866aaf5bc83721e8c823275ba9232a536/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85e9fc6866aaf5bc83721e8c823275ba9232a536/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85e9fc6866aaf5bc83721e8c823275ba9232a536/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.027365eb.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-xigdHG0UOXkfHKwXbSg6DQq6/6iSsMiB2kytu+uV6vJopx/xbN/oQxR7u7ZgFVQKAyGqBoZEWMsqJmF4zUAvdQ==","shasum":"5b027c346d828fd488afa6327ff2d4a1ff165a31","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.027365eb.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCz6rCRA9TVsSAnZWagAA17MP/3+ak6a92a9OYzndNEsd\nrRdqkfHVL6Cru5VnrE2EHSzH1PoUn0D/V0Hn0LBZ0kCqGiKRkPygC5htCjlX\n/aqpCWzvzfgTLq/0FV8jrQRYED+3D4QqUUZM3RunYoey/+QJhpaSjukqfBy8\nCIrA3NnHx14amg72xQ/ZKn2kNVee6mu4Ew+NpgWR3K9ceN59a2rEkMpHQGvt\nGCbZQ5otDTDsY2pRPDhduFVMScetvRR83ziImSYoMzBW2ykC2maRB2E2pUdL\nzBt2SGN2F3quoSsMB9zftX1MNfQ9IUiM1osJd+ARtXPKLK6jzFnitRA+KhPc\nGMEStFINKxiACjoUgVoZh3xXwLGDywEw0sEpCNE1uGPzfAK5SQK2JUJ9gPfu\nPYPwteJ7qt0n45LN/c2AMo8PdSHnX6bEQX8i1XUZVTr9hE7EnEHWFVYJ7rzz\nT7AgjBqB3Xk48/vwNka1CDYlKghXsz3VMiPUWgng/8hAHt5a2lCPL/MM2UyH\n58ijcBg97mJEonanbNnubZmINJSkLIn77i8SkZL2s0qYSpqPwdTpFZZL+Y8G\nh+XtK4gB7nrrzN+hJS5Xjb4dXm4vh5BX1TFaIJzEXIfR2n5g9Pw4WyrsgMgq\nIaECcgWZKakYFtZK/rrCX9nN3c2KfKcU6recvFJz874IcwVl3oMRt8bjc8Hw\nVhIn\r\n=bte+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUN79TR+aYNHlXGVBoGtXgkcwuPN3hSvnj67QvgSSCRwIgHBQuJ3Tr8/LIfRs8zHMNBR73xbREgV3nH9u+LPm3iPI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.027365eb.0_1611349674992_0.22148220896246795"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.7e72b66d.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.7e72b66d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.7e72b66d.0","@material/mwc-textfield":"0.21.0-canary.7e72b66d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"000cf6108aa08030d7569d4ad30c798e7ebe9da3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/000cf6108aa08030d7569d4ad30c798e7ebe9da3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/000cf6108aa08030d7569d4ad30c798e7ebe9da3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/000cf6108aa08030d7569d4ad30c798e7ebe9da3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/000cf6108aa08030d7569d4ad30c798e7ebe9da3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/000cf6108aa08030d7569d4ad30c798e7ebe9da3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/000cf6108aa08030d7569d4ad30c798e7ebe9da3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.7e72b66d.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-/lUjnXTqcBhDSIyk/hKRJIzefBr+FUmWV19juNneHUIeiKXC1grq30UtocNDwR0DrGvkF6Z24ZdxvZ+OXBlPbQ==","shasum":"add72edf8aad169bbfe8156ee9eb252091e00bf2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.7e72b66d.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC19OCRA9TVsSAnZWagAA7GkP/3HzUF9hWvSjc9OAFAMM\nLxiIn9sKpNe41pdBksTLKyncmIkehGIVQWR6WRi2AK55CwJzgTnVcPL//aUv\nnbClfn+1JMmZlPJ6bzCCIamf1iG+/JPU6WHLbQCRrcJxNPygD/2AuVvowGHp\nvF6LsKpUd0+HJUqkeqVghNREElyS/2Z8UBwJ4Myd7BbLJ8W1Uhlp3w3LeU03\nu1Ux3l/0mr2PYPCky/j1t798bNUJJ1RgNrOfm5/gIByzBoRe/RYL2fBzvrQp\nJ8pMZM4ixg+Swbvps6yL0d2nZ+p24o6ClwdoevR48/i+2J9wplFs0Usr+fYq\nAgZiSrCptXBINGERbqpq5yPt+FEZ9N3X3H17Lz60YguLQv3zIgRH8VXh2b69\nAqnLA34Q11KLo1uvjGuKGLNE57aSXNut/BkHX4KU4/iq3gJaTRHpBLTYiQnR\n6yAHrpHgiBNpvtqMspWwPKkDq9ocNzR/UVQtuqZi0YXHSRF2pxbI1aet5oik\ni4FJ9u26pf8lFX+VdSVr052rsMWnOcmsswGtSVWJPx8XgKGj1YK1M52zeXwM\nkSctIKujr+0ovhl8Ati/+nMvR2SZpG9BisokVLQcGLtOOrKuLwM4tztgqXeW\nMr+t2YnMTXtR2LrIUkvjsqzu78mNGq/JQFBcWa6H2UHdH3kHgRLn88yYnRmQ\nrezY\r\n=orTY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDZq9p/8PwfZjupX8msc46Czhc4/rElphfXBIOmrfDFMAiAvwE6Ig4nAhT0o9r8KCVy5I/AhpyIuWPBOFJi/ZFcwbw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.7e72b66d.0_1611358029688_0.5253377898988425"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.a6d6a1e7.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.a6d6a1e7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.a6d6a1e7.0","@material/mwc-textfield":"0.21.0-canary.a6d6a1e7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"24a3d6e567ad7ea6c29b40c2088121baec3a5fc3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/24a3d6e567ad7ea6c29b40c2088121baec3a5fc3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/24a3d6e567ad7ea6c29b40c2088121baec3a5fc3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/24a3d6e567ad7ea6c29b40c2088121baec3a5fc3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/24a3d6e567ad7ea6c29b40c2088121baec3a5fc3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/24a3d6e567ad7ea6c29b40c2088121baec3a5fc3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/24a3d6e567ad7ea6c29b40c2088121baec3a5fc3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.a6d6a1e7.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-yezZt2Mb0uPmTlCsEf5/vpVdZG5+VGndDBtyeVc2U0sS06gTEv5sXvEAfdBxBqp79tz1D2Sf/SnMHinWTjhvjQ==","shasum":"3731c2eb28ecef59cd2bb6f01bc690a00aa567b5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.a6d6a1e7.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC2C2CRA9TVsSAnZWagAAzkYP/jFm9YSvSkWPDv9lZjI2\nzHtHrnEY1QQWUM0rYmROic5j8Wv2gTNKwd9b1J3a9vEG62J5/6mK3a0eB+j1\neKQSmAjlw+c48eeiXAdoZZx8KLCrXzfCMKo1J0XgsZAS92NijgYPV0vev7/O\nMN+8yuAtc3BOL991uiDl/czSE7lHL65Cm5DEGJryoEKmD90GvXFCTjEEZLAa\nlrGXVXHcNaJyG/zgHOHTZX8h22t78KX9nOFTv2VipRZ18HOQyvuCF3z7xvGM\nVcmJXnRxKGitx2+JFsqmda0UFRN8bkkf/1hG6C8fKnMneZo3w0uGlM92aHoi\n+ucs6htdeOGY5kBHL3FNFi03bQfBBXro1p25OWT3QKyaaNL6g/ATqD0bDm75\nHTxyP5Nvps0Nu+xunGKuWL8mRYVOqDyF2wVEeP7H5wGAI8c9QeI8SDAdMGM+\n7pmT+aneahXARnbmrJb+sLiLMyBXquuzztLKtM89uBd0l5/ONdtLuxmrqcvy\nsmgpg4NKUH1tH1JZ2vL66LDa5+uL/umIRnPKTweaH94X6w6DaA0XsHUxawtY\nOhZssQ3uAO29FPaXaDRpLpo3ROtRPxcX6yBV2NqrcQyjxWo89ItoALpqRLwI\noqJFvJZX8bzKWHWgzPlFgnXKtft9kHlspCzqS4luyGPjvcjzjLTOyM7u0uVQ\nm3xd\r\n=Cn71\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZszSg2argFspRnED4ZBuJ5mK2VTpxhputxCSkXyqdXAiA4isxgv+iF4vgSJm7bmLESFacV2dya4qGExn/uk57oCw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.a6d6a1e7.0_1611358390543_0.15263536671161249"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b95fe100.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b95fe100.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b95fe100.0","@material/mwc-textfield":"0.21.0-canary.b95fe100.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"229d3b172620cbdd5deae4cb60852f0ad2d4671e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/229d3b172620cbdd5deae4cb60852f0ad2d4671e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/229d3b172620cbdd5deae4cb60852f0ad2d4671e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/229d3b172620cbdd5deae4cb60852f0ad2d4671e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/229d3b172620cbdd5deae4cb60852f0ad2d4671e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/229d3b172620cbdd5deae4cb60852f0ad2d4671e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/229d3b172620cbdd5deae4cb60852f0ad2d4671e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b95fe100.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-XM2pVZh7O/PS3Nd1yWHkDslz0jM3/pUezb2isD74rpz9l4Tdl/5A1nEHCImcS7dcnRUek4YIHWm4obhcT2U73w==","shasum":"e572f5e680a6ff31fa144f53bf023d60e36b6313","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b95fe100.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC2UuCRA9TVsSAnZWagAA7o8P/3WuG4M9QlAuQE+gG8Zd\nC1oUKRwc5FrcA3fmdCypnvqyYQ8yV5Z9+/9nvmBbDi+SesVsNTJt6u5bsZoJ\nqdAfSEcpagv/49CXy59jYmPAEzxTRj56HTGNYOnzO/8L1q0uCqrKAwqGRJ0Z\n0tpNICDQX6GhcUonXHvckbqt4q/gjvfRRVMG+RKI0TE31NCfHrwVkI41TTVp\n2D6RFqqhyqCnr03GrMFHGmnAkkSlcw3cp2kL4nU4/c8KT6UME6jDyUwAIoZc\nBYK8mJduxQDN0cdeGQ7izW8lAX/lLZHWXTeFRuZAdwfSXxk9FSlQtdMDvOcl\nMDzbP6xDGlSCGgb9TdtnSi3DtD+DsGJO+dT4Eb/E0+l//fpkq3wBgHQsnq1H\n+t4ROXNQgcawjkbjt4WOhuLPmmMVv0AJ1+0RcnRCljiZpy0aHtqwfvp3etqX\nwrCzXoXy+/n7iRYnIFyt5mvBnTAk59vG+MyJoWF9xlzeCW8AcJ5JdDq7hgYC\n4tS+OeyXuEbAPN+W70eo6sZYLJD+A8gE7SFLh2EwK+voiN+tI8BNse3veYRd\neyAbspwZTRAsDBiYw0HInELbPtxtrHs++zWXFvwZEfr8Kno5bYKxArkMNWkW\nS4U7YeIDSyX2lFkeH4721Wzom/rDeaLD/cA7kNYgTjeUXcFlH/couJ6jwiFP\nPfNJ\r\n=rpBo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIr48b5LjdHlquBqW2gIMzvciIP7KO2BpeAgBApwsYFwIgOGfPDubpU3HQ/MlzB9xfXTOCfWVhYTinivTJSH+AUu0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b95fe100.0_1611359534515_0.4038137333432943"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.c8797192.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.c8797192.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.c8797192.0","@material/mwc-textfield":"0.21.0-canary.c8797192.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42b37fcb3c5c8e4488b44daf72e5e374bf0e2e75/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.c8797192.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-4n48NrpDtv5r1vqezj+P2SGmtVJAXcqP2KZFV3G5A7IF8cT68tRmp6WiN59ck0M5Pr+BRPWQmf8bM99EzagSHg==","shasum":"0f933ee5e14b5e3cdb1bb24134030f684e2e1f72","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.c8797192.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC2jHCRA9TVsSAnZWagAAjpwP/iIywqciDBq9WlHBR3Yx\nn4NULxmym6QkOlOJBf9EglyPyhP3aiV5VfInZfE9v98Xxld/wYwNEN4i+n+N\nkPfUWe3MpGtGabr2XdPUqlGw516fH2bzOqHjk9FLbf/RWsxVqjkFZdxrkuiR\ntqkT/hXtJqKW5Z98tz9Lw1GITdeLoaDF2UP526aAcf+ZBpzUSZ1WhJAcR5pP\neWxWxqMaYpR43eRA81cuoXh8ohEpd9AxTQhrOQuO7+e8JHjVOcojfySYCCu7\nmz8rfOVx+aA/Po5rBE1qfyD2LBBn3cKrSV/2jtS6Mchxr4qeF34RgQJ/1+dR\nHQ0c8EpuhEJyEpqWZmNRmmkCtaEkcaBSV5HdsyfW6Dhi3jympoNNB8dEhTKI\nCMgXWgDiOs+4u968M5ID/JoV6Z6PLKLnGvy25+QHJNS5imrhdZsKaasscBTM\nZXq65DvLmzAj+6fmLFIwwilDXIoML1MKpvGkStE4LhOPGH3GzqrYSa6gQ84R\nb7F/4ddqkno2yoWB9XWSbHgkLLW2ibekuanoRYJ5A1PRWvIhw5JqW/AYQC7M\nBpINsjOmmXkFUoKCYx/K4kgOuQKSOdjDEI/ZuFn6z+o9YRbg0KL+h54PRiJx\nD2Kt3wxN3mE4OkugyRGQwVKHMXxaoLousBEkpfZi0nD9VS0/m7qIWh+TaUnF\nwdwu\r\n=2F8W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGIEDiF4kshOCcdFbPBfHbMb6T1o2D/0T3aGmgwX/qfyAiBCH3Xz0Lbc2hTVYP4VlQNJWsOJs9aMF80OHEdYJJQ3vA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.c8797192.0_1611360455126_0.12826663631420687"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.946f5563.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.946f5563.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.946f5563.0","@material/mwc-textfield":"0.21.0-canary.946f5563.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/56b8a23ccbe326cdce0b3b9f5d1fd5c5f5f68f91/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.946f5563.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-V9l8+Zup4WVak+KjLclwBJqyf1eF3WAjLyHHR7+/G4coNmznsCw51d4gOtb0pilNdrHLfjVFvobLAn5qqp9ugg==","shasum":"be7699de06ca4d937eda30fdc4131df3e9ef7703","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.946f5563.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC3FICRA9TVsSAnZWagAAzg4P/2RHje9XecOrtJuSrCyt\nCfD8BhO89OS5+r5eTb2QFdNMTeNZ8yqhEMwHoKtudQfpOYN1hLxZOIeRrY0f\ndr8AwkKQADEWdBfGTvULt1hZjuiaQs9kXJlCQGoP6rKu/8Uh9sHx1WRzvMWj\nBRprrJzh19BXEkqxDvAT5S2OaHxujGWIZknMQ7CPGTJLrJvuBxRgBeIV7nMA\nebBI01mIHccIQktAmDCO0QqUIaWa12mB/05DxLEISUY01nqqF5IKVbCOIW1Y\nuzLG7Tcb6yEe2ICBE0ZwCYvcrI5w9ucBwlDPGTgXG3P2B+rmdRu3k1aMB0TA\nFETzU6O6FkfOeUGIZNuERxG2qkP3OTW3o+xEERoq6KSOMRA9wGF0I+yR33Xv\nsEYwuBnGzpcsDbLqUJ/8Rdjv80m6E5ukPkvWm038mUBn1tb63z/BkD3CmTFY\n+AVz2gPGeIehj/MJcvccC8J54wbV9oY9Myf6C62jFoATr9jsWS80ZdOK1m4y\nTLZ+yV/5OqkgxUEASr+q8PY06teQmhWueNpn26d8MIegQakM9/pUMjKT9z/T\nWxFrXfhbB6VLliu78MzjxTf2RhueFtD9gtVRLVIp4sWW0YAggvHcvRAmHpSC\nIA/X80Lldxe5474T02VbW5OgoZLXbOt73UhoTwTd843l4phoYf7UAGLHuwRi\nurUW\r\n=Pmui\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+UGI791fL+ESIDxTMbtMrMYy2p9Fde/uCErB/5SI6WAIgMjpE0nTA9QiILlWQo31FHPMojwOCahA9IQhjQN0Y6YQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.946f5563.0_1611362632410_0.34527216390366067"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.43664f0e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.43664f0e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.43664f0e.0","@material/mwc-textfield":"0.21.0-canary.43664f0e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62b7e6f595b2e13e2e57bd8f8f56ec11405ee0f5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.43664f0e.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-CK/LfRwLht//UWiLY3+EPmARjqpUgzP9zI4wV+YQh9kg968kL4flGqiiKnHAnsG8Qn53uF/r7QU8Nzw8Tz/EyA==","shasum":"913de1f9db91ecc1d3d6dbb6876f565d2337d908","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.43664f0e.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD0jeCRA9TVsSAnZWagAAXcgP/inqYfTO6VHTRK2bNswV\nDdVicNXCQZk1ktqwmHOCpbxfHz/D1T13NOsZ+OjiBqxVYcSaCGC/m9pQ6w7o\ndlxv0bzG+YOPz7De18e35stcIRGJfFtRuLg6EASBp/gHydxpzJxXKOob8RvM\nVJFu431Zj2MEp6eozI+l7kS4B0S83f8KX2xg+94FQRdFEkEy9az/rlmbzREr\nzKCJRS9YjuAUEWHE9CQJ+nKMKnmh6ucnI2L9mtNks5NqrEDYAd0R4UZ6exRT\n8z6fvxCGpZ9PDAXNc2Po9OGafzCcecxVPF3KFFm978UE2ZjPA0V+jBSHwqT4\nuRvSVbLJiSRVY66l4VngmpfWGEAbf/rwNbbyUeweWRfwC2H75eD+V8lL8Xuj\ng957BIAPca+8Tk9oVb/WOykZkwl40T7hZLskwlDcKJXtD8We8qItdgWGlLNb\nC/vKHUaYC9e89z/SJlDuGLMkEOVQ3YU/50r9dlXLgxN6vDE0C2LupT6E7mz6\nZ5KEDtHlgfoqtQwxb8OJdgi6HGnqHIaZ/BqBDBiQETR5UrorkkSUpLALzsg/\nOM1BVWZkde3eZKjgBuyUVP3kWSOgfbSQisk1x4OqHmlIyqQSdoaFIJ7dR2jP\nMt6GhROHNnsmwVZiKP13XhCnlgB1BhI3LwlCfp8XvuvC9OQJ4ecu7HRAKs8d\nkzti\r\n=T1ln\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4CGYfz+PKj+3/+eMQH0Ypqh1gSI9mzD6mJ4ClrRhx4AIgOGnOT2ZJrqLbGdGAJKrRGboi+Q4upk6d6mIXvKVc4Zc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.43664f0e.0_1611614430463_0.340315061241957"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.2e769e3c.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.2e769e3c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.2e769e3c.0","@material/mwc-textfield":"0.21.0-canary.2e769e3c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"e3a3fae1109be58444840f6099c0f87c3966367d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3fae1109be58444840f6099c0f87c3966367d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3fae1109be58444840f6099c0f87c3966367d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3fae1109be58444840f6099c0f87c3966367d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3fae1109be58444840f6099c0f87c3966367d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3fae1109be58444840f6099c0f87c3966367d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3fae1109be58444840f6099c0f87c3966367d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.2e769e3c.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-C3kX8zKNRGWjCELSteEOd/9VP4cgK2KuROKcwg6vddwvlocWxkC2Nzzm8ksSRaxskcWmPLPVy7En6bcfBiv6rw==","shasum":"abb8294a530db5d9763ed696daa73337a0b7bf26","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.2e769e3c.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD10SCRA9TVsSAnZWagAAwysP/0/920BuubA2PKNY+g5j\nf4+wFvtDHP9J5CgvGbFTdvFc9w6WhA2Jq0i9jMx0UCs/FpFFx2XzH3zJH2F5\nufcY2fx6WudCmoyuMoeZgiKMbCHiae52tIpk5+43ecnftdJIuE+KEF2zOg96\nfMn/ozsbt/WLX3w1rCXjMbCxLfFm7AjTVxIOKkL/MoC/2Vbekks3EeJM6Vng\nlDh/ZeA/C+MTQuEb9ib239skDPTcPULz+0zcyDg8zzGuYMHWbFOW65krrBeA\nOaAr45sGjuExJCW2PS/VX7VA0zSSrdRPQ39dCba2Tnzbmby1rHrUWoY4qpXC\n24EM24Ud3Rz75r+Ek0Afmlw9B7qeHESFZJD9+TZ/7xKpZnU4OKQhENGP6thp\nC0Q7+qVcpWJMJlIkMiPINeEAx1FIRbSdkd0CPCE//w6pgTo9uW9Dxd0AmlsH\n47sFchBqzB/NsshneO1aHB9ZAegmS+u3bAxkZhyTpZVxHVQbIzFvnY8JB/jr\nls3Jv0HqhM1uE6zVnzjdq89NtuRR7xrkvBA1af+tRq+waebd6DHHepK8EVjO\nPnDCLBTk2c4UIUksp/ILPnLxgfVQpmY3soJu57xOLwXMOK28FOZG1T67kale\nFvg0VIxCZbGyBoNyAqRjPv9FO+GOtvkRpO1ayF5eBwp5bMDdKXnM9TCv4suy\nEx/T\r\n=mZPS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiqHWpHGtFLK0+qKwVDT7cMrVntDW8/jJLy9Cc+fjmMgIhAObj5go2985tBG1+cJaUsI+hCiYIJKp84a/fTUkUjz96"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.2e769e3c.0_1611619601657_0.003702275706052749"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.14e01610.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.14e01610.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.14e01610.0","@material/mwc-textfield":"0.21.0-canary.14e01610.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"0794659aea627aa04b2ec37e3f0e8cd9d976ae8a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0794659aea627aa04b2ec37e3f0e8cd9d976ae8a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0794659aea627aa04b2ec37e3f0e8cd9d976ae8a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0794659aea627aa04b2ec37e3f0e8cd9d976ae8a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0794659aea627aa04b2ec37e3f0e8cd9d976ae8a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0794659aea627aa04b2ec37e3f0e8cd9d976ae8a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0794659aea627aa04b2ec37e3f0e8cd9d976ae8a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.14e01610.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-iJR5eMxGK8/sf6m4ED9SZdbauOLvCSiBoa6Mhs89M7vE495QhwY3T2EJHzt7bxcpWz6c05oQXvvVUS4X1LnhIQ==","shasum":"8f86bde0bd32aeb994cbe0b360ccf3cf6f96989b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.14e01610.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEcRZCRA9TVsSAnZWagAAkgQP/RpWu6668IBcLI70czoG\nE6eXmIgeDINEBJ7aKujJM9Q/x3IOWTAONI3AoGIeOh6lepjLyeQMvjUWBMk0\nq9FyiMMufiM7RM77pLJw6sMp2JN4+eg09NtxS382xjL6L7cs8MY1/BWvtqj3\nEDcHf+LYUHGcRuf1IhHiFonJa5e0sXwXcc8ifvtitbW2z3gM/SIYC11/nJL+\naFGDsdpY121DXGOJYSNyJ6rBui7u1tPwWDidkNEvSIfJEY9y1qPZ5UKGQVSn\nb+kBQHQUlV8ISuZtwwAsR431ACkjT1FC84i9AoxYBooKNZbYzCTizcX0/etd\nBcy4BmDmsDJYxEwN6aJAGk/YzWstx/+cfVrB/2SPpkqhwUFbJmZlVHJN9gUr\nmX5wTyfDmE7+87++vHW7omcmprvKbceI7bDv+uLjDQIe0X5ft50ksDH20J1s\nVyYPypBNfgIV+3YRG4H+iRZhkNLo4X7gZDtyU85p9Eofq4sNUPfxyKGNCVKH\ndTFIcrP88Q3oVcGltQcOXawl/W6V0wYMpxQfD632xJa4fyiOnqFnIPG6fvf8\nX93yrMlgW9bJvisW9Guj714NW2Df9lrVvD46Fp2zmWOLeJSm7H+YGIh1hT89\nbKqX32PJuovQPor++cE+RQE94iQ3dgxpF8a3q0EW4F61ZCHZis2Hx3lzNZMR\nHW4V\r\n=dHL0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGujoEtMrHe5kQikYd4p6++lXRqfxLujvblcI3pjUb1AiEA4eRRU56v8q4M+i+5p2CuKGG090RT6+/vXtB6IoP2OgY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.14e01610.0_1611777112659_0.8408859858977566"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.5de00c1b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.5de00c1b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.5de00c1b.0","@material/mwc-textfield":"0.21.0-canary.5de00c1b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"65f40b8130ec795f2a349c0699be5b3038a9c32e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f40b8130ec795f2a349c0699be5b3038a9c32e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f40b8130ec795f2a349c0699be5b3038a9c32e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f40b8130ec795f2a349c0699be5b3038a9c32e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f40b8130ec795f2a349c0699be5b3038a9c32e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f40b8130ec795f2a349c0699be5b3038a9c32e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/65f40b8130ec795f2a349c0699be5b3038a9c32e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.5de00c1b.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (linux)","dist":{"integrity":"sha512-4UgC490p2gtAvOkLapo9GZx0KjammGanDtsLJocdWEmsjWQsXg2UTbNgltId0uh1yFEA5uOivC8JNj8TV8rMkw==","shasum":"8c156241c3546414ed29be8d935d2c2f18853e48","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.5de00c1b.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEcpbCRA9TVsSAnZWagAA984P/R7S7fB8fcbVHB5xX6QV\nA2s/Mxhtdam653j/CNwtTXBA091dbZyLVtRh5NdaTUqlU5IJNa7Ae9snM/kf\ndq5O9Kr4dh+JeMX9LZh3eLTzeVHkFpow1ZYzCsplIrwkOSse2U/ArFUizVTU\nBq5zYq1m2yheWhVQzSc4gMsgOEF3Qd2lri6cKMPvBR74b2ZKS3+EHJefJRm0\nhOfflSQkwyTLljSy9FnvCgkc1I34zT5bmElHitXUKT2vFvk2JO9rhbVj2t0F\nQt6xmx2t5PmTJgO2u1kuQJfDuMg3OwxeTy0XF8HX+zRQBT/dLxnco9X7PI6x\nc7m57NtTmPjgG9HcibgQC++79SnI3AKYc/vINlxoM2QybHL4gU99JpSsuhYy\nTKh5vM6CPPqThPCr/nMNllhhf3pdG6/EJUtP1hKpS0xEtORaSHzT/QVMlctP\nzBrtmZXgXiEWpZfQVQW1xJZUgcCdGbP2UAIvcf4iv0smmUDEwpbsaTwOVUKB\nMup79hHzQS0XCE8akkXIqXZIjduqbSY2aM4XDYRdwN/0ewoCt9JB0kd5KYpB\nNWv631Qqha60eom9DNBvMtT7GYEhYpfITcg3ixEVvZ/pmMK3mZuJvEk4F0zW\nVZC4T4eshW0iRokv+3UFjLuzRCYRgDlvOMHsiSPel5CsEhK6MMiJUvqqiB2K\n0gXF\r\n=jy6p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6bA5+hKOqlv4TkYZFEj1Y57jgPDalnO6LRIKSANXFZAIhANbO3f3eUtirFyGxhE80UmBvuMED9l1n1KN0LCkvHYkd"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.5de00c1b.0_1611778650571_0.9548738598973998"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.5a328336.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.5a328336.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.5a328336.0","@material/mwc-textfield":"0.21.0-canary.5a328336.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d5547f58c69336881e54d7463a7f7d92a04b53c7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5547f58c69336881e54d7463a7f7d92a04b53c7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5547f58c69336881e54d7463a7f7d92a04b53c7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5547f58c69336881e54d7463a7f7d92a04b53c7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5547f58c69336881e54d7463a7f7d92a04b53c7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5547f58c69336881e54d7463a7f7d92a04b53c7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5547f58c69336881e54d7463a7f7d92a04b53c7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.5a328336.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-Gg3dyOGrUYDqV1F/xRGcMxqAqnxu6r8cg8gRqt3iEiVxSmyACz6/88aB+CRnz7cJ+bIilBDQ9ld/l2JdekpgHw==","shasum":"f52f35dc9d57220d0f929a22c7a26dbd9432d51b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.5a328336.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgExadCRA9TVsSAnZWagAAMlwQAJ2SjPvC1a3JVmDY8fnu\njG5GhQpWHqC10MD5VI3D9wYspOlQohXOR44xOkS7XUoAKY+Vv+sRIWzNVSL0\nVYP2SnkuOtVcrTOdLLuvgFPm3dWF3JO9p3BsFkYJ9r1rCCK0m7ucuFiifH8g\nEElv8+i/uiWCFOBi/0cd5epqKHH8nKXrLWcjBt/1+vrIu/+xUF58wkpfrw5I\n/dJVcoFq+y1dLvjSViXQVkiy+1h1UJgW4WppUE3kuBsHED+agdB6BIY6aKBu\nhXHSLJZF0GX9uNS9I9ZuUP0VajkpazW183PLWe9Y/aQISOIoKlM2V6XhMvHD\ncCOtX4+GpfvTdQn1v+SOagZKndnStMhYAgauNnRXJWlxAu9T8fab888QjLwW\n17F/1CZ/9vtTlrPZu+SOAYRKG/lUoIlVE55JlPCoES4c4D2JgVZQMvXxCTMp\neBLdB63V1qXZlhgp06Sq1zsQzcDKBYRLTIuiMOn3hWFsZCKJPn5fzn0vYoom\nMlLz22PLJj1z6qBdtdW27FL+CQ9OxE3H+dQy0mx2lfM+62N12FETcgY2F0I8\nBchf8OJHNkmV0n+BlESMMxO+VaEowZbXrAdGj8A2ELNE9b5tC1F52rlM3WWO\nP1JevE/0C78M9JVsIW6O1tRMiLpHjrWdtUrksxv7mRBpEu+s6+mDThkDc1Z4\nG4up\r\n=CJhQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDMg42JGLXIkA1cwL91lQTvm5HFp1efgZa+2LF3Fe2oAiBRuxce5kGsa3duArNy1rj+uFrMCJymsk144eGkfWLvqg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.5a328336.0_1611863709311_0.5944918896912403"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.533b1251.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.533b1251.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.533b1251.0","@material/mwc-textfield":"0.21.0-canary.533b1251.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"b88cf0e2eded50fb9a839a426059ff1f8242a490","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b88cf0e2eded50fb9a839a426059ff1f8242a490/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b88cf0e2eded50fb9a839a426059ff1f8242a490/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b88cf0e2eded50fb9a839a426059ff1f8242a490/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b88cf0e2eded50fb9a839a426059ff1f8242a490/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b88cf0e2eded50fb9a839a426059ff1f8242a490/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b88cf0e2eded50fb9a839a426059ff1f8242a490/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.533b1251.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-rV32K78Ukq4j0e8u8A7NoYWAQzVe4jiGpWRBdXh6GxHhC+7aUnmjqVxteQZCdWpa4whfvFCr50+S90tddard0Q==","shasum":"b4f52f87d931df50fef9a4c30fcbb813d3954a42","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.533b1251.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFCXFCRA9TVsSAnZWagAAT9cP/jqClecOtU2BvvAR6+iq\nC9MOhveaWzXzkGy2TY5XZiRqS7sgD5Ua3Y63JCG7JSdRA8gqy2WpQjKomvF3\nmvXy0iTmzoJvh3CuEaQVqn9FN7ZkCmyyGz4HtsqFnOOhHZPF6+S56Zq5QvqB\neKqpN6+AqscHMcibyXMVqYRomfPDnCNIQ6+XXYDnWVBT/ui63Cd+XmW9bnvB\nF48De3rqy1aHrT51Yq89+0oitobzUjg0w3P6+cWSqczcgkhent1F9bIhVVal\nKGG1n5bLozNaowTpwoYbsdhXbWzDA7E67JGqHYzg3AwhCWmxyrQySItZ619F\nIoXQRd6VlNpqcrFmsaAaln1btcy911w8qfo3jhNyziiVdij5hJKKuAxsDSLu\n+qOXLCHfBIpfH1/r/BJXeszAyo4diiL9z0EtD7LGU4MU//bQvdqTBZ0ivRvF\nWP17Z8VwkgakmheDaRp9MoAUkOmeh0H9QGau2vjbmAkdcAi7mDejMUY8dDpi\nDqgu9RL4Dp+2oYrSa4iVmoEx3YAR5JI6MFHm3T91mPkb0PdBy77w0zg1qDkT\nF8/KCEf+qDM7ovVscEpFdkFFhhjwf6v5j6wYhtqQftcCbBPMEeZPjx4APTc0\nRywdHskc0SvZG+Sa2k+vPf6AYBF1YK8U02s0/IM//ZRV/iaceu/8F1GkqKzr\nQ0Ub\r\n=fMbB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFP8hrxGoIaSz0dJuiOx9XAiuvYl4sCMhj+VNT4Z6BG7AiBhV2SMbpMdClPkageDJ2gs/YDTLiSOGrJtwRHWa9ivmw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.533b1251.0_1611933125282_0.5507528610625161"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.ab5c0a10.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.ab5c0a10.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.ab5c0a10.0","@material/mwc-textfield":"0.21.0-canary.ab5c0a10.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2809af58a44d479ea0c8000c34c546f525921004","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2809af58a44d479ea0c8000c34c546f525921004/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2809af58a44d479ea0c8000c34c546f525921004/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2809af58a44d479ea0c8000c34c546f525921004/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2809af58a44d479ea0c8000c34c546f525921004/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2809af58a44d479ea0c8000c34c546f525921004/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2809af58a44d479ea0c8000c34c546f525921004/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.ab5c0a10.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-Ia5dMr552fnqMF9zv8EHDXdM7GrU7QZUuDnrUlG4uNfAU4RbehpwWtJQnkfbkzLiUCItEPEBNNkFqLc0vNkM1Q==","shasum":"86917608812f1a78e72bac24788561a7d8d1d676","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.ab5c0a10.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGbNsCRA9TVsSAnZWagAAW/UP/0P5sY4kSf2TF9nBOYv3\nb1hm93f83O/xd1SlSGGRzFAVBrU61d+rFiOQNXA1k1Lm3pGBFQZEaupGHk1K\nD+5uwQLxi73dBEyuD/Iwn+C8CT4qvQifaCNSxsyak9c73VyNOAebf2CVymi0\nVtTqPTgwCslbmkSqopdC05DgUkoB0QZGzUf75xcbS1Wg2BRcL1e4F0Szy0qY\n1OQvxQwG2VzyqACO5XulA1rUuh2pORCH2CEB3K73357kObvuMtikS1+kbKLJ\nqboHVu5kaO5Fp+Wm4oiUMlMA5zIN0H8+s5HsFd6l6JAz+7ulH7oXTGbCb+E8\nbhDP0QibWDxM3XKFNBmtBQ2b+099fFFjR6T2HWYEU2YdNp9lg9KChOtZL1Jz\nGgOIHDoMRTWIYGquxcbUwL7z6WS8hiKnSy1cOjV1ZzgmDu/t6yyCj4d9+nhJ\nRaQec7khs30gg0EQrI2zJcC2EVtXebMOuO/XoZvaUofk70jJZAa0xQP9F0sf\nfzs3oAMEhjKgojsSQyoV+rnKI77+kmE5kTi9DCPYkEl06n1KRhJxbhUK7qui\nZf5zZsx9H7CF7IZIuyLbCisMm0AhMFp1hJl1okprnJ1HCrYALnC7jhZo47bf\n09nLY74A7x0z4/sDEgQe+xCNM3hWflcb0PJ4XsRnslUJKLgqihEi31RquMW6\nhg0s\r\n=/hsT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVfwf+VeQ+aM87C6WoekVbbG+UUx5zg7yQRadJ6vkIxAiEAngwpe4nFiIR2pXwvOtA4tGeuc1IKSrKaSptns+gKz/Q="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.ab5c0a10.0_1612297068212_0.11580455286670555"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b7a40b27.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b7a40b27.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b7a40b27.0","@material/mwc-textfield":"0.21.0-canary.b7a40b27.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1cdf08e57947b9dd8b35ef8599a58c0ab3c09e7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b7a40b27.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-ZIjB9sWrfejv0g3nUtzheHWYjNgUg1+XJ07PVZS/D8jbRDZln9e4eOGcN3E7TONZFQVW3iIZH53GR9tvFG8YPg==","shasum":"248b1c56c9592859b3c4654c866275b44f223bfd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b7a40b27.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGrtsCRA9TVsSAnZWagAA1UkP/1hb9dNq0cnW2kRW3t+A\n2719+wtE1cZZ9jF3Kq/6f757ewkS7u9/4x0aguG6xnPmEK8qBVpJD5sW6ilu\nYz41FAof45beUsu0MpJhASYJpiLlYn0ieLVL6ynLqUKf0wN44BNouHu4Uvj6\n1I4KuKFzIYafvMwotRcHKVSN6oigEaKWHMeU35yPEFKBG26Ubs6E9F+FLTT/\n3EhvIxYcOunHmQp6rIJQE3sPt/Is4p0pPRrcFX5X0dTpZ8mD7mNwTya29GkH\njN9PC+McN2UqaLkv8v66kXEzmsAEGWle0OXUVX9w9MVftxgMo7S4hjAHIm5Z\nDIgHvpN7ze648Od5U/nqegsFubwgSr4PTu2S2Gg1KEKwC1HHmzVBn2d9hacg\nMfqgGmXXoAJCNZD/thdmsP4w+0mcTIiD8ka4FBrIpEUBQiMPp6CMXdv8lDmb\nOCvdFdcuycZVDBIIT4pzjnRUDRA6ZtBaI8Q7XbFTLpTEJLDUAYA0IFRGMbQW\nifR/bzfXhvFdHOAe64Eh6GQOfftTOkNVmIotHNSwfBdX/0gXNvp3KYLQ6ka1\n3qSYA8uxvsNOuN8x5OU+WzqNnmzn6/czmvb/CcUsgKCYq4GrVrb09FgXHOyU\nvcFE2CY7tfXisOatMZO9iFP1ZYc8k4oLpUcz8IivMLyQzh6RIdUqpI84H7A6\nfaBr\r\n=TYHc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSUpK7mGmuv6DkiwgrEmJYmOU02QD0gioiZvay98U8dwIgGK0nM/+ZmmvMW3XoFjYI2F4Hw8g5FrH3R3keDs5f+c8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b7a40b27.0_1612364651633_0.8595360443612277"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0fdee204.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0fdee204.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0fdee204.0","@material/mwc-textfield":"0.21.0-canary.0fdee204.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"f072f9738076b381b1be472e9a6d239553e4d7c5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f072f9738076b381b1be472e9a6d239553e4d7c5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f072f9738076b381b1be472e9a6d239553e4d7c5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f072f9738076b381b1be472e9a6d239553e4d7c5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f072f9738076b381b1be472e9a6d239553e4d7c5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f072f9738076b381b1be472e9a6d239553e4d7c5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f072f9738076b381b1be472e9a6d239553e4d7c5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0fdee204.0","_nodeVersion":"10.23.1","_npmVersion":"lerna/3.22.1/node@v10.23.1+x64 (linux)","dist":{"integrity":"sha512-IMUjTLLRbiKqfGUC8VisbX1d3C49mw9PuxL5ojIyRGTf521TywIEUpfoAcY7RA7JfN2+84C2Cx3FI3PA1VgyGg==","shasum":"637ee921709a6215f19cecc03f1f236f98245728","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0fdee204.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGuy0CRA9TVsSAnZWagAAavIP/3W05C2w+/7QtWPr1T9X\noMz/uJ3RCTK8+hhmb1b0P7YUxuOgXT1ALw68rnTrwbap6C1FP5YvP+HigYvl\nKtVID8fA0mbaRx63z4EtXVUy+RkMj5P3uOr1I9oh0QGnRB/jyv2zg1DoxYsu\nvbg/IFXylb/tMckGcqWzX8fRUfHQvWQjfXrujhIpMMLQ3Dc76v+KlX2vknV9\n1oZI5et3Hres72+QNmltzpU0ZRZGu1GlWe4/3WJuM6bX26h7sTZjXXwxHJpx\nLhba19qgsS/dl00FKVZKGIybu6PgDzqhAApQTaU1oV8/VV38kAwz9DB6jkC1\nizHdSoPLsUdswHclPptmY10ibTOVWULV6BDlM6j07vIbdgzfKvIyYRhmWVAJ\n8DQvPVuxYeN5ghD/tTC4dgp8LYfOFyJS0HF07y2B+NKoh3qxVFjtSu5jcznq\nNhHaaxHTMIvLAqfijYt7FPct7njgV8ainCL+JaVJWs3za6estCMUBjXGAdGq\nR/jRVt6XeAP92g43ENdEvI/SrFTZTJ2iyxGWSQIC3RAMjssFLcDXwL5IX0sh\nAYTgPuw645HMiG6ciB6Kiu5cTsvOUGgcsuVsqdV3CqdsICIOO/Ncj1An0Cnk\nUdvthY2P9yY8l8hqbGrICLp3KcH2xAvG+1DWflUAFj6lB15Fhhiowl4M4yC5\nzgsZ\r\n=fHK/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFSq/KDPR8vmfJSmun6AxrPkpnpMqThqFlgNw932pusgIhAOt5wzz0gOGzRnUXQTSHpXpeRiQk6cmVr21ctk5an/sx"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0fdee204.0_1612377268581_0.5719630912482547"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.5160e548.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.5160e548.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.5160e548.0","@material/mwc-textfield":"0.21.0-canary.5160e548.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"37494b60e468d33d172953edbd3ca17d4aa342e5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37494b60e468d33d172953edbd3ca17d4aa342e5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37494b60e468d33d172953edbd3ca17d4aa342e5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37494b60e468d33d172953edbd3ca17d4aa342e5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37494b60e468d33d172953edbd3ca17d4aa342e5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37494b60e468d33d172953edbd3ca17d4aa342e5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37494b60e468d33d172953edbd3ca17d4aa342e5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.5160e548.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-Gk0OYFa/LG76fwgEV89RGDH2Oktu82k9SbrpYh3rzIX/k1x9t+sQwMX4oiKENdBw0xuhOhydS5Y8MWFZclytzQ==","shasum":"b8262e308844fc83c0f7e8c6f26bd8ab3b7ccb9f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.5160e548.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHdoLCRA9TVsSAnZWagAACGEP/1xhKlF/High7BpLJ1Ly\nSZhpUr0WLVWqOSPjWCYbGPnXJuJaeeJsSAyNP/aNbPA88TdEwOsJueN9VZwW\nv1I0gDfmqLAZu5uZDbmp4CTo7hYeCY/RMoc6xc7hVM/JVWoYbYKxPgy0h/cy\n0QuKmUo2VlAosqffYjlJ+mUQC/b3CadBRIHaIRfTdLZnIwUH/nVc3Uu47X1L\ni2Xu/Dk2uVxWjNbAqXxF0IMe80Eqkn775VVG7AzYgaeXOB7/un9JbvuvGEBn\n+z+AR8xRJmejkuCYH1Gaj+iU8G7QL/jpjhNQLGC1rJajuifeQNA9f9ZoJdXl\npMUQHlEYbFI/V2z3RwOqM/RWbHy/T6F2FiZ01whAVc04MIlMxb2Uxgba79hI\noHPIw8RGh6LDcIP49knK6Us77KKJflEbbp4PfPgkVES9nwZkJT+APr5OE5J7\nqrQhY5IiG85shuGIrwlAhu7YOV7QErR72sOXFrg5mf60z6fqYhF7wTRz5mC5\nq5nMeRoSm/waGUSCD3ii9Cil9rwMSw3OFZyl9yd9sjvzDpg9YI+t2sTqo80H\nNrpTxq55aFO60wPm30SWZ8YhJCcAaTEFHHuqSqEhygwxPtaQZVds0IytMHlG\ntE8iy2ThdyJn6yUq1TL2aWEeE+o1EP7uCAj6eMvYEHCJGKqJn6Z24fvCYu8V\nzevB\r\n=iIgk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICeXfpuov7kym4+t7ysIQ1SOrguwjibWwwng1Mfwibh2AiEA3cAvUNQ8rQDNUxQcRDmHKVj17KMS3QD0COiZgfg6dcs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.5160e548.0_1612569099016_0.6259692388359064"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.4fa2daec.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.4fa2daec.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.4fa2daec.0","@material/mwc-textfield":"0.21.0-canary.4fa2daec.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"49d5ec72e92627f861ab94dde045181b5eea9f00","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49d5ec72e92627f861ab94dde045181b5eea9f00/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49d5ec72e92627f861ab94dde045181b5eea9f00/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49d5ec72e92627f861ab94dde045181b5eea9f00/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49d5ec72e92627f861ab94dde045181b5eea9f00/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49d5ec72e92627f861ab94dde045181b5eea9f00/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49d5ec72e92627f861ab94dde045181b5eea9f00/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.4fa2daec.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-e1odJj+HLuGztix+GH8h0YDJhy4WZqWl7dsRBO1ML4lBWJbU+vhlFwGVRV2ms10/uMUlmSEyewEEkqXorP0TQw==","shasum":"149d4e90acb946a5e2c6b5fba4105327a61123b6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.4fa2daec.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIdUSCRA9TVsSAnZWagAAoVwP/3IRomeUMHDs35nsvD9J\nAEV76zumYJN6IE/G9Cy/GZ6IZlRzoMt6ZHV6MxBs1fMhOTTh/bF90arsqXac\n4cLPjasvOmmv+2aGG1phXQFdBJJ1WT4GPl8lTFgWUWdICZBMpm75R0ZNmlzj\nyxJ3RRtNAgMcUwdmmEGaTAREeUCRwqh3A0GT9//AXEnLVW0ytOgM+wSevEs4\nxhsK4YazkfH8k9RToqCRZXwUweYBlV2LUIYJWEbrbBgawFFjtyRDs8gBJ+Dn\niwqeBqYTlX7qEJbbsGtZxS/22iLOsMsromaa2x7J2rlCL/Ir+512x8u4czLr\nxhu+CmpJHofn89Api1ja+DotxFZ1II/mdfX57tTdqv2xsadF4S4MJO3yaJUp\njm+bYfU7VmRHxx3nXsZyMZzdpq/ZmupYosBlrjXvrCJeQ6KNBQrRFF37UESM\ntFoA0a6QZETt8ZfgIgXC2ryfkjDh72Ly/P9da8esO60tH+WRPKzdFDKbufGp\nksJDcIQ1Llqf/cxZDPNC6caWY4VNpCATEj2TxcMpm9rgssqvuEjFPWhfCLM5\nzeZ0dqLSmG60+qy/REPE1MsgoDRDW5vsFL6P5lIoAk/xrgU6EtkMCNX3FRp+\nvLK2xnTWcyFss7NjERbA0o4ElFkK8xiqUDp2eioPGRSBKPTi6NJTO/JOz6Ot\nL493\r\n=2rgv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdE0jZs3jQ0TMQSZMx+Qj8rD2wHGDPNuAkYE2WbYga+gIgQ2DmEdumA+GK8owp3qEdpgEFNLvrH9x3vVbTlycO7i0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.4fa2daec.0_1612829969610_0.01900213973462339"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.67f285fb.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.67f285fb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.67f285fb.0","@material/mwc-textfield":"0.21.0-canary.67f285fb.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/04f614de1b88fbd5e16a537f0b7e3f2f9b015a9c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.67f285fb.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-aHRSIKY+q1wTvQNjFGRix/Wd+1ReJ++85w3l/nkB1512VkYe5k3IpxUQtd6LRfQzvpunsmqR7ed2I07OnUK+TA==","shasum":"a4cad2f326f82b06a00481b2369ba3811898d8f7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.67f285fb.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIdyUCRA9TVsSAnZWagAAIkAP/0ruG/I0aznD1D/nva5j\njoDwpetnUBr1Kkh5OnSkOQWxR3bvxE12KPl9gxD1MaFM7DlwvNYHwj6+g5bt\n17d8sOhYWb1Iy9Dvnt0MqXfFkSbJ8mOdTmA+X6UX8CzOoItOBknbPg+/PGI2\nenEBEbV7xPCWL2RCEKR6xD2ekpFBnmPkgpcrItUqV31CaT0ORVappuVBpHQN\n4Y5AobbH7O4AG6el+GicDLwV8p43JyQ5/SjyOQFgdp/bKr+jnxv0GfbqSYfb\nu4IoqX4yHIqHb58iAI/RoOBE6PipDo1HH3d3uj/v2pme+O75AL0BwiRHstWV\n9TJKayR9sDBRHncOJMb/LJfmmgLyNiLuHE4UrJQ4mClZt+kn9tjJGyUD4XZy\ntDrah6vLIBuVpRuQZ6VQjEXhHmbAR3CsJestQBjNX4ZKJP5VRvPx2lsHgI/8\n1QU9IpkyZQYJcioH/k639J7Lhjc2GVC2lSgTW7vv36kYCsK+Rqr+qB2wKozS\nSFeCj+zRHTNJvvD8RGw6TROHLj7/obsHvsN01KAtiR5kOh0HIaqEHWkEidbX\nlqkXovXMQXs8xCLqBYkArQ+PcPvAuL4Z/C0fivXeAzCQIHZqodRCQpwleV3F\nTnHfrZJzlscC0wreA3hh7X9b5+M3cbb5G2Xgieuvj4fyl1whjgNPpZeAee7N\nOMMZ\r\n=zbJn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxvWowWPOeGkgEbGweGeUXcMDaQIL+enfBSZe3uOnovAiEAv/1d9tBn5WmddZ5cTOX2VEm05GtpAUSbDbO0/2YWU54="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.67f285fb.0_1612831892277_0.45484983429849524"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.58cd5a70.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.58cd5a70.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.58cd5a70.0","@material/mwc-textfield":"0.21.0-canary.58cd5a70.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bd3f430e2f5a541d9ff928f6eef5e0f06946dd6d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.58cd5a70.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-XvUlQQL/qD0D9PGKeAaFVhjvjNQqQVYPzvaDkV1T3uJ8v6T9AMzuM6J+JVWL7FjSDyeblItM4LikonHDnG6rTw==","shasum":"7d9c2b674e4bf307ccd60d40f73b32fd6cc28eec","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.58cd5a70.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJZdqCRA9TVsSAnZWagAAsUYP/jWKdVlA9y/5cibkOnoj\nCd+GF71ViIfSI63v8l2g1X8BvnMSxc4rn5tFwdR4zwjnCVad0fF9qDLMK7oj\nH00tVto4Z8APUFzTc5z2dEnGQtI8/WZTfc2f2ZUoU8cd7i52GnJrziJ/SMDI\nfFPJtDIrln/tKXzL0JrPV3QtuxVBszMIOhDcvMCLidvpJjM7Gg7tWsn0K70z\n8yu7OIE0dj78yl96wXUzXfrI2b7evZJrwbflje7qqM6eSAgxVw0vhq9rqFMG\npZDL3TN+JV6ZuU/+erpqZzkwQ3GXOFaCV63yeViv4aY7vHEtmiYwJw3tZKLL\nl6okZcOvtll8knWCUkxZwCtMDsIEwc22014islp4c+WFDv+W1t9TN/NEnuJS\nR+O0KEiVwwA5g2PNi7eSNXIdUbltvSXXhQfJx71HimOBjftAFjXhWLZLupGr\nBOd1/XmeNqvFA0RQDeZk4mY5J5CbYHU2VSODjaMiovs0cbVcjd3dyIEnOUTh\n+xA0quV2uFLvCHOvvfhFUXPUz7wzLbfNip3443Gn+F1EFLBU5yHVOCILaXt/\nht0obO8o6ahuM/FVSJYIu8w8aUvxpfw2UDS72ztPMWK2OiKszFfkui9lWV8c\n3lNZ0lqcbcgxxmzcSnpgfW/y6oNgdNoFlF8xjed5rKJMA9Akqa/U+XsBdQAP\nT7pI\r\n=gKUx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOZV4La7kupxA6yTa1al8VYFZTmt0nxacMO8hVSdHW/gIgUgaE63EdoElF2s48a4M4ojKp6iNHwxVetb/VX2O73gk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.58cd5a70.0_1613076330511_0.21030090141074664"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.8107ca43.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.8107ca43.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.8107ca43.0","@material/mwc-textfield":"0.21.0-canary.8107ca43.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"579eae14a8b8a347a0e4b31bb6650c994d1df472","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/579eae14a8b8a347a0e4b31bb6650c994d1df472/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/579eae14a8b8a347a0e4b31bb6650c994d1df472/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/579eae14a8b8a347a0e4b31bb6650c994d1df472/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/579eae14a8b8a347a0e4b31bb6650c994d1df472/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/579eae14a8b8a347a0e4b31bb6650c994d1df472/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/579eae14a8b8a347a0e4b31bb6650c994d1df472/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.8107ca43.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-g30b4rnNFQHqFslPTZImADhCAvsZZ8ITD68E3qfa0zEMtNdmEtnP3MTtXC57NRTC/zogi4PKTP6/Eqb5SHXBjQ==","shasum":"e5cc98c2a8b8bb269f00ab9a03d979866f6ec2f1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.8107ca43.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJb3VCRA9TVsSAnZWagAAFFMQAIvnYuPOIPp2jyVAOMnp\nwgoZPtt+H9GgkqyErVU61gplm69/ntHcnXsIugO2Ek0P9zaiafcTsstCQ0H1\nNUQxJSO1n031kfBZLCC6PWUz5eClb16709GD3udY7/RrZ3KXD35z9BOk9zKb\n4rkgtbiioKoCB/pjw3kDWke33emBMKpHE4D5lh8gh1PvhETVnpXkse8nudHj\nNGcZJrD0yKHEBS76vCCZbHDnR33s8/l59kDyDl8/gR1tah51XhCv3xJ7+8Rv\nBdDUTW0r/kO6izy30NhuFKINFEvJ88D29CqhYbhGjboOyPVCVqOnvtV+oTpO\n8InDp5vLK05/wNFHzEnvfBs78Q9XAF2tSWBFXJOpguW/9LeQctjiyFN8laL2\nmy3ecEzimmoiwfX2cbFqRFAD7avCslh3XNIHJ9IXS5uXyQvLMeg/KDLaSqM/\n577K5GsbAs+vnZgJWkyimSgN5GwzyZEXCQj6bGBarakOUp6pvq8Q9ASu3CFz\nsUNvcyeWTK/m0/YTBkIJUKCtvaWdkRUNvCgJtkhJXCQHyz+BShKKOsA5UlCi\nS+1oBctxJI19VTky1Yotm0oIS+DoIci9u3B13fq674M5r7vxKW5+k+NxD0QY\n24PPGDBI7tLY1DRUzwSb3t1omzrTYBMdiTj/lmHpAAQPol6k9UHR+6nNVKup\nBTQY\r\n=sFxI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIa6BDxmSVEgHEpCZZ01bZsuIKQUzmBWUacOKwvZ2fyAiAU5PxRjvXnIyM6dAnx1cOqWNauvxF6HRdAXEtLmkwPZw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.8107ca43.0_1613086164805_0.1422319816329558"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.d35d64ef.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.d35d64ef.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.d35d64ef.0","@material/mwc-textfield":"0.21.0-canary.d35d64ef.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fabd01c45fe7a18430cbb0070ae8b3f5d2a9dca/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.d35d64ef.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-ZlbwejOHbLepMO4BFvlD/SN9qQ0nDZqdRGAzNAf1XR40oe0ZnDUOzFfmGaEO26Ciu4ncxDaQ6Zd5o81fBgNOUA==","shasum":"6c346549726d58b2b9ada6232de3552100a26664","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.d35d64ef.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJcEmCRA9TVsSAnZWagAA6/kQAJ9S0x8LRW9CgUxcgT2L\n0+4+8V9pluezoblBbfOeyXDeL+FQ4ANdei6G9udXIeAvFrCEszvHyIV1/VPe\nAZVrlky8P71DCmhJ5hTKAutzWl3/IuQzt0I1p/TXe1MGvRkJNulxO17WjrmR\nYi87FWfWuIkAmYR3yiNVNKXkSTH02CKPr6UYFi+XIORPph0bZT9UOdxF+9D/\nnVNNohMMopQqdUCeAMpeNK4xhb7v+PEBgVNcvytjaP4ahHrwdxD2VRWL6SH6\nqEfBZWu3wv5nPNohXJcxx6IXO3HuAAvmq8GM1vwlkqSLTK39pjwuy5icqF7H\nxVC+sgibfklBTn+IJD3LAGfJRwEOcHhDjma2WmCA0ArASraM5j3f3jmWgoSE\nUU8biu/H71v+4zDBKIc08qMyaf58TNd6g8fOku6OFvAIemINd2w3kVWmFcHI\nV+eMWKTm2TaIjLHA4eFthY5LIvv5wy1xKu1KzpffSSeQUEDlScIIw0T5i1UX\noVm294V6pzbLSEy2gpc6msNA63caOopES3qV2tHcCm6HqNJOJBZk06Rjnte0\nuFTNzw4hz19vb+XBAXDWE3KA8IHyO1AUFxk+rSM/k3wxwCZaRNB3BXOCreIK\nDQfPgwhZiyyzCgcijy/Z0Ds6P/QdbcXrmSF2X8Jnjvq0l/f/gYtJq7iQtKBK\ncZQf\r\n=hUDq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJgtsE/qJ3dLYbzQdORnpgBNyehz1y7RSCxxjHotQI0gIhAOfSu3tW2Y+xF2ityEDXA8Cpjt3JeEUkB9sxhz6YKLdR"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.d35d64ef.0_1613087014457_0.6067044871124507"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.78bcf058.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.78bcf058.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.78bcf058.0","@material/mwc-textfield":"0.21.0-canary.78bcf058.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"98a4001d56b1e200103e0862b83b661c87fac551","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a4001d56b1e200103e0862b83b661c87fac551/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a4001d56b1e200103e0862b83b661c87fac551/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a4001d56b1e200103e0862b83b661c87fac551/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a4001d56b1e200103e0862b83b661c87fac551/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a4001d56b1e200103e0862b83b661c87fac551/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/98a4001d56b1e200103e0862b83b661c87fac551/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.78bcf058.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-yGY4s5pHP6RPqbDXZwOLZDR7t6EncK76HVmilhF+r+n/xUVFGWpbhABpO68wJIbEeZgoUHwOteRi5g3p05UO4w==","shasum":"6bf00b42ea37dd4ddffafa927421189547467139","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.78bcf058.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJdBwCRA9TVsSAnZWagAAHBAP/3CKl9yALVbo7QV+EQdu\ncmf2CaoFEeWssDnwRVH4xSHVutjB5iZqjYy+tT5Yf4D8v1llXfu89/uo65lt\npL+0kTHZope1CRNztqYDfXIZrbsKH6GZe3hkrZCu2uAUzYDPh3HmNkuKwBF+\nwtCayxhAos+qDrS4BTnEgWQd6WKTWHwNzDzz2yR8d/wT2ZjY8zbcIdlbvHqV\nCGtjTlDZus3k++vxBtHQV5UBxJ84DSv9q1Uxsr2OGm++mFII2psoKaBMh4Am\nsCZmVkv30M4BNLA/LlVHPK2Wdx9pecfabkbTP5Hww3Jdd7l0/Q7QBJ1UJEfH\nPiQnFGK18PqtYSQImIJ9QnkOXEUGNyF1HoIHL5g/QuyyUl3FoYq2KXou6SuR\nfoouRTHdKyFXmaeJzuum7BN7nsWRWmXTaRT9J9sSFDLdO72VztWEKPI/PVu2\nZL6mkTzI5SwjVNQtN+iygQk6mW9a16wWwaG02BfvbWvQIhWQSoYZhMZr2Kwr\nW7+jrqfLzRTndmuQ2QyWwMowYT+ZS6dD37oxk0J+jgbBQh3mjt9FY3CK7idB\nf6x/++YPY+UsBG1q/i4B3IYMzTb8Am7KIQE6B7WErvhcfIx6aLg1FQ/9XQ7X\n/S2zolAkUeKoRWI/Hg1PZQ9NWphfu0Wxgs2+eJQ2f76FxmNOf512RZhkENgL\n8Yrt\r\n=qxYX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClv98dS0iQWO/lvYOewPvO7WhBScC8IPiKwPWjzCMyKAiBm2aGQStkWrSxhMHkhyowroqIpZPJwFi5/rglXUKiRiw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.78bcf058.0_1613090928445_0.9847984022179446"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0c6908fd.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0c6908fd.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0c6908fd.0","@material/mwc-textfield":"0.21.0-canary.0c6908fd.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"f290af657508c2392a786548f206e90e8bc44124","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f290af657508c2392a786548f206e90e8bc44124/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f290af657508c2392a786548f206e90e8bc44124/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f290af657508c2392a786548f206e90e8bc44124/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f290af657508c2392a786548f206e90e8bc44124/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f290af657508c2392a786548f206e90e8bc44124/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f290af657508c2392a786548f206e90e8bc44124/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0c6908fd.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-PjGaftZT3lTsJo/YZEFV9ShuoeLltGymEbN4GWBfz6+damnplGvisI3d0I3ubuvqWOuzYpCJkl9ILEjbvaCwnA==","shasum":"da4764ff38e09f2fd484574a825072651be16cff","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0c6908fd.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJdj7CRA9TVsSAnZWagAAIdYP/jmgjcgZx0f8eHirBe+v\nl9lZ27vzV0wbJnBh2irXo7ob6TrIqVc7+ha536ipITgLdUXvEuBacyECQnIp\nwi7Ud/KOdNaBBCUMJ7zQt2FsJN7WTrYF+Nm/QoSmYsMCmCzeuE9mJHsEcPIp\n8uIyxLbKxP/f14CjMmyneU0hw6kRXwKtaZs1IrAQyLUbJLcgeewe7yEf592P\n/mJS3a1BosuRZsUj270tEYsywgkSbg2ufkmwBZRobvBILVwXFcLkB+4nLLme\nbEWJNeQCixGzhCrBJDDMPZ5yBo/Q+8kI5sbrw2fnV75K/0phQHOngedV7yIr\nkVUk8rPTpwJHpO7wTrm/lHFuCg1vn70P7M5Q5unbuyyAf4L3Whf2GOeWeQ6f\nQx+KU4vH+JDBFr4RBZtFMpr3WCQSwhX5DqeNbBfgttiePVh2RZFLPPZNW78b\nCsUCkBdmS5EJO5sauwcCZKmx7j/Y0vSR3iPlhudafga02IVRIYn+unC0RcLB\n3KipbrptPxig8N68Ywm7zSVdYpT3hZWVs0wvmA85r9APUQlwwRjcXQ9V0/Xx\nivr3udnKh/vxJXlrRWTU0tspYASYcksLjC2bC309Vqo//GVUtmxldYORNB5c\n4UyLSqg5121f93rjuefk030uBS6YzFSv5g0nbZsR+PYyF9mzpX7pOOUVhEDK\nBNSM\r\n=ShF8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrY1PQm1Nqbjn1I9aKUwt0Ux3polxsdNpIZVZ6XKeF9wIhAM6z/7p7jPsqnibZhzT1XJdMM6Vatx+WkovUMICjkdL9"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0c6908fd.0_1613093114857_0.5268988362182512"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.f1f34ee0.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.f1f34ee0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.f1f34ee0.0","@material/mwc-textfield":"0.21.0-canary.f1f34ee0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"b16a616d2cecb5d8aa3c279c76b01b2f49ab6965","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b16a616d2cecb5d8aa3c279c76b01b2f49ab6965/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b16a616d2cecb5d8aa3c279c76b01b2f49ab6965/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b16a616d2cecb5d8aa3c279c76b01b2f49ab6965/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b16a616d2cecb5d8aa3c279c76b01b2f49ab6965/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b16a616d2cecb5d8aa3c279c76b01b2f49ab6965/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b16a616d2cecb5d8aa3c279c76b01b2f49ab6965/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.f1f34ee0.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-EXQF5jVvkKcVqLHZ5XSNASP2oXbbFQersXH92RVGW6J19/zDYg7JWiVx/hBZp41PKu7YnwRDfoYht/kmkmIjgw==","shasum":"37fd9e1b5676506f70188e200061cb6da9e3d410","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.f1f34ee0.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJuKTCRA9TVsSAnZWagAAyo4P/jdqXN7O9kUWlaY+g2bI\njSoeA5H3Xv3YOn5pQcmg4M6iYPUG8Xa0DXwNF7eY60Gv54NzQwhtmZwh8B0a\nkFTHQZACs21r9T4imfL3ybEEf8crKvT4yb9qvtAL31/HsPpB/EEVaIrBfVfj\nrqJSl3pZDxiyTaf68p9+IB2AbpOoGOtmHORW7NYEx36HBd7npFAVm0cywiyJ\npeKRkuGNUWcn5A+aIU5wQ4g2fcpo6x2BSGbZPMPi7+6LFhs82b2SgaRZssq5\nNfiFs9gAWGRbp5Q5M28lYtQM/8IrpfGW49A4IVp2l+36XSjda1U95qVPpx2u\nSiqc3D5mlgzt5hmmj9ew13F9w4d9IuTEeTJ23O7zow9eYFlMujUT3A6vHAbF\nykXwFr1SJGYOCihX1fbNR4rubxc+zHqVkHTijgL5/IUorAOR60pY3XvNSfia\nrmGWGb5JDir9BjaoUcXcVqdE51UhTTq4T7V7wkfRbSZhBobb+6zm9urhHksW\nZRryd/mxcvMDRd2gxXb6mcdC9zZ2SwUFdtjUNJeYhsHA47PxLxsDfc1RpL6f\nvWDx/AC283aZF3G88EB4G7ACHnzRmJ3vWISafCbRqtWmJEvANDQ9lVW8MVBp\n+09XyZubtmHAMjOtLLg2clebvxdCm3uW/M6p5q9nCkYERJrOCklQiyMbJzHk\nHOMt\r\n=/z9K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrH/te7MdhdRQiz/9YipSuDqLI5+hP77APtZaiqhMBOAIgfUrxy0pyIEVrX73GhZ+00CbB+f3xT7NiTQjrQe/elEA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.f1f34ee0.0_1613161106613_0.30119182934974886"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.d84df029.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.d84df029.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.d84df029.0","@material/mwc-textfield":"0.21.0-canary.d84df029.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"af09ce2e1ef6f6b486ea977ab8890e81af842541","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af09ce2e1ef6f6b486ea977ab8890e81af842541/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af09ce2e1ef6f6b486ea977ab8890e81af842541/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af09ce2e1ef6f6b486ea977ab8890e81af842541/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af09ce2e1ef6f6b486ea977ab8890e81af842541/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af09ce2e1ef6f6b486ea977ab8890e81af842541/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/af09ce2e1ef6f6b486ea977ab8890e81af842541/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.d84df029.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-2WhReLkVWwuytNC4zChrZN4uvLOMuPtnMzUucZDDOmFdE+GQ1wJTQNyPq8j7uPPRU5EzqF32ciEkbYY8ss7F5A==","shasum":"b4044595315bd523cfee0463aa42cc5e1bc91b63","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.d84df029.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLBhGCRA9TVsSAnZWagAAFggP/3ULzsJpk62m9ShtON+O\n0+qV/AMnEZ/qoSrHq/tt1Mh/Qf8uKgKJiOIT6S8mMxTSJd3jiufHCnI04uEK\nM+YMG1CXPx5YmwMMNavFYgfUavZGa+KfngKD+Cpm82z9pqbptkGtwxiTeyWS\n/8ZI8NZXS5WvUC+ojbj+/f/HFeO96uZpNSMG2qP5Gt6/B1JdGB+2Ku6ensC5\nKgV34UzbLoah3pEDb3ikC9tAYYjxR8AVlSH7toH6SbGaDBPisG55RX4e8h21\nQcxSzPQG3zLKAjR3k3OGkDH8UmgbTpfZn7gThOeaKYtRRPB+hHaLEtsn5fMJ\nROHTQAfxr9Fp4ftKoEjxKgtmz3QKiu13MjUqPtsvjDtUQdWpf5nZi6dvww0G\noRb79pIy++4tZF2ze/dGWp+HCUorPN8/7zyC94Msh6wTrJr7DYWwMauGc2lG\njswTw+LKRXXLcWcxTNwRiArXXZ/+ncETuiAUL5md6b0lkHippKcpPJJDVaA6\nB79dQJEMXKDW02hWBRExGj8r7Gy9G/3w+YyTzl1/u7wal7AQ3cjH67KL2Zsv\nJ8BVCgFYcpUHFxlSkcGU09gHAnV5VqGEc4DhS4DCc9r4gz52ESV+lauLF/bq\nr78m5SXc15HDNgkBpoI/NjIg0oqt/2ddyZoaXG8+0l971e5aFB1lx0NLPCWy\nQ/1r\r\n=QGn2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAzcCuFVeRA6Zt5JpltUzu9OKKDOK9uOVrtyxSV/SUjgAiB0WSQFUzr/myOiygMiI/4d7UU1il1SfXIhggOsSNVa2A=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.d84df029.0_1613502533877_0.26077387939878416"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.c525f471.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.c525f471.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.c525f471.0","@material/mwc-textfield":"0.21.0-canary.c525f471.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"eb401daa998f20b7222c2787e22c669e642586fd","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb401daa998f20b7222c2787e22c669e642586fd/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb401daa998f20b7222c2787e22c669e642586fd/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb401daa998f20b7222c2787e22c669e642586fd/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb401daa998f20b7222c2787e22c669e642586fd/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb401daa998f20b7222c2787e22c669e642586fd/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eb401daa998f20b7222c2787e22c669e642586fd/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.c525f471.0","_nodeVersion":"10.23.2","_npmVersion":"lerna/3.22.1/node@v10.23.2+x64 (linux)","dist":{"integrity":"sha512-qZ7zfnvizScBZ6Fma+nlWTmLKYc6oYwItShrC+LwwYKkp1uSmd+My2Wu7f1OxaduNWx3LQRj86lf65kRj8fMVQ==","shasum":"c5fd496f1c7f326a4d62e492afafe9c14345da08","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.c525f471.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYJkCRA9TVsSAnZWagAAg38P/Ru4dh9baQIGKN0d7GgM\nSntzEqu1Rvpk+2BvX8rWgIi73MvPfE7hsevcXL8OsQnxgKP6FKWa5UOorqXs\nPjSa3v8egCOtUjfzvmddvd5RjiUqraGCS849iotfxZVI+/uGH0dc9oiqUx4j\ndg3j3rHr0xao5qltC9t/AS3S+iqnJiacECcjfPKMhA3KVvCY9EPfBetdESi9\nPJ/7+alC95z5I6G6I8TAc7Y4+0tksRsxUmSaTaxl4uuW0g3j7NPTYA/dT+px\n2eNXQKN5eh29fhJ9PXRZ4HCOG4Drabk9RnEnuQHzfXLr4OiXI3V+dR8smG0Y\nwalx4IOg2KRCqMTPHctfyxTI4fqrpSe6m/P+rLA4AALZ03NnA4LxEb79pl0X\nMmCvy76NK9vLGix0D4ztmW/od7i039DNwXs4hGJfUGNtnQlX57uQOAaq781d\noQHO6AD8Z11lhjktPZtTqgt1bLENjOkjfBqqeRbj5zb0SBgJcwfxmachVGYH\n+HZOZtMay7+qEYVtZCizeKOffVOqEgWsu/TMJkxaoXlTTIiM4BVlpWvzUIGg\nN5Mhr2UOFOcXTgVKukMGGEurGt0dFxHTxh11hhSp5vZ2rm2bYnPQSWIGG+dc\nq8szsLxdNP7WOU0oduVV4j4HQB1mDg8Y2jpQXaP2uiI38qRm6flNiFvo+fej\np3Qh\r\n=0+PL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICDemWhthktNCJalwX0UAYW2x+gu+NtBi8r3SNnwKexUAiEA8sQS2G3VmHOjRqlljgyoL7FfHEQvMV5NHHz/gJL/Ub4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.c525f471.0_1613595235633_0.022833526239129043"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.ba7a1b35.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.ba7a1b35.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.ba7a1b35.0","@material/mwc-textfield":"0.21.0-canary.ba7a1b35.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5d1b1f5b6c909a9e26befcb63e69de98a9b6fba6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.ba7a1b35.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-Gij0/MhFdlKij3UWvYUiveeDokVNVONoIONHd65nHfW0VZbLqjXqiYkNijshxIeOJ6CwTUj1L8UPdN4L8FqWFg==","shasum":"ef0d52eaef4a2d0a507605ebae8081343ab3912a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.ba7a1b35.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLwLdCRA9TVsSAnZWagAAyOwP/3Z7Ba9u/7Xmix4+8R9C\nexK8ttl0BEP0KYUpTgCJiwzs5u7/ixfsGcmQ0yISzgWmcSurtPnn1pay5UJf\n2ez0ywaZK5Nfndg6pH+z9faklS27XIFpaTwL009fzN1Mje9dpVk+nmvFqlGO\nrxPJjVfGzqWHc46bEMyTMYlxtW3DeeqSXHknvHVZB3m31DMdVGPwrFMfOSa1\n77w2f5iT++GHb8hE7sX1zPkJ6gxBUtMfYqytipaNo2aXGbvJfj77t1sWDQW5\n8eYohQ5hm+N1xoYKS4Z/mEoGeuveWgCcl9k2nnrwltqi4ch7K1AH9jSBBULK\nuig/S21RNRvaE/yjR/+PHFIQclGUb8iSpFb1XbhfnzCXQk+3RuoqdLyvRp0v\n/+o4qK6CMWkXVeL8cXyghAuBIjuW/RGYtnDF2X5iSLhaHUs5cBCWmlupsvcl\nOwLpVzRZ//eHqsknHOYI1K1bhKR8gDN9sO2/euSgeapNZlAaUTj2FIop0Zyq\nzJsEBqVA7qOtQLeYx6cku8PB/KVSgh9vfF2V3cP2q9xX/wUSIOUkSS9xLVJc\npL0ayk+AtOz6CHHxdcQGhJb+C89cnfpcypY1iP840jseDO2MVYQAn512/GzA\nWL+MLC4/2gxqjDwMlqy88NnBCb5l8vkAHoDn8cuppE0Tpb9KcokeOqHjQGO7\nslda\r\n=/dG/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJvNK+c0/bIMPw1LJNfufcRRV+7r4ASLkJ790arGr+EAiBzFwaRI8WXGsXzkkA11nA8OnRlhmrFH08PuhwqhbBwZA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.ba7a1b35.0_1613693660650_0.3628455986950774"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.9a566dda.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.9a566dda.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.9a566dda.0","@material/mwc-textfield":"0.21.0-canary.9a566dda.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5093d1f8984fe9f44acd6597512a2de2ef5fbbca","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5093d1f8984fe9f44acd6597512a2de2ef5fbbca/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5093d1f8984fe9f44acd6597512a2de2ef5fbbca/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5093d1f8984fe9f44acd6597512a2de2ef5fbbca/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5093d1f8984fe9f44acd6597512a2de2ef5fbbca/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5093d1f8984fe9f44acd6597512a2de2ef5fbbca/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5093d1f8984fe9f44acd6597512a2de2ef5fbbca/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.9a566dda.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-zGTdL4NZW2u37OgjfIm3SQjXzdqP36zrt0aDVVRIcPLuS46/B1yyaFQbIMlBJDOmMegYlrSgwjiLGpEEmtGUgQ==","shasum":"039f5e29105456459596b6f46b8d75b490e300ff","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.9a566dda.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMAWmCRA9TVsSAnZWagAARqYP/2gtniXapJuBaEK8TB1V\nvRT6Au/tGSn/Owu9f2fLr5fvjQqDCDSFyMgPoW670i+I8S6dUzTWfn3GtyOy\n0Vdgj0ILdpcxTLWOMiyRsnwEqt5atXJD9aGw6HDSO59EuhaV/B+28QK8Dgu9\nYRsvBvP+tNRrCIHRM0RuZJKpYYGr0tciNC1kFLxHY054kMQ3B5VdNkZjdQNO\n/0ahuH2D+sjn/s/P6TI/A4aMOZz0Nyk6qbkOUMpwF08jAA/Y32GzpEBfHf4z\ndhb3vj+C65rGC6oprO6zV1P5ut5u0ULP+e7HKzJH3PAvXJ9qUJ0U7bVinR6E\n0T6Dyu5C0asckQXaLPTrRrSfOkRaxi0MIvWcBo/0m57aUYcFcu0PdkodE8F5\nLr83h5StGwHQblk8T5rz0t0TFxSE0ROwmdG9tuxodWr5XZpSWtap/LZ3uw5/\n+527ydY3dDSBHk/ZSDpD3Ev20dElWlZnGrtITOP0UCCRXk+M6hx3r4ZnU5I+\nV7hCQAzK/gaNAEp/zbc9uBxOJSGOxKyJzQph8HydOH8CMxoQRTDxn+ZWqK4E\ncX5Hrzl3K8BAzB3b2w2RBp9SwC50OBHGhstTS2bmaoBY2yHr1F7uXWunF/RE\niIm/A7mpFEDOV5xbpsEMHA+MSpPMZTFAXbT5uR6CF68HRlSJRLxrMVdjpFr0\nD8m0\r\n=f3ht\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvKVbs+KnEKNHiT9Yl/7lPp+Wu71HLHwyvJtnBAtcCtAIhAKNdlRR56OtLdHG7anj/AO4wSLTQGEG1VbPKUBZUTYWS"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.9a566dda.0_1613759910017_0.12147232992508661"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.55addb8c.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.55addb8c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.55addb8c.0","@material/mwc-textfield":"0.21.0-canary.55addb8c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"02634c071c90f7c1124ae44f34cb20a61bf49350","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02634c071c90f7c1124ae44f34cb20a61bf49350/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02634c071c90f7c1124ae44f34cb20a61bf49350/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02634c071c90f7c1124ae44f34cb20a61bf49350/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02634c071c90f7c1124ae44f34cb20a61bf49350/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02634c071c90f7c1124ae44f34cb20a61bf49350/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02634c071c90f7c1124ae44f34cb20a61bf49350/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.55addb8c.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-ZUs0Tq134C6x92ZPq/zohhJtfotzbItYJxkcOkaQlwSUNHftopLyRNAnYOiE2RP0jQES18VmWZPG8GVYYFooGA==","shasum":"aa8b74540a92055c227a2e87038dd849053d0043","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.55addb8c.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMDWECRA9TVsSAnZWagAApeoP+gOucslMYXKb5pQdUzxR\nA/Z4BQmJ7v/tddfv8m11cQh5MdjAjsXIj+2PGOe9dsI4w77KVTsWxDoVOu3e\nISoGDGUG4aUUtnnSrVzTuW1vGjDAmIQXCe1HaIi6/xxhh0I/hhRJrDqM8HQD\nDhtE6OYEy4h8hsFdsFCoDwKla6wvpsX1YTov5SYimzpSlv/R/vIRJbIP9BDQ\nBuApI6+U5Zw1ZXh02KXkKvSYLgsEmEyLF6bA4KVKdUIXVP3yYvZrwGR9oW5O\nYNn+nCrLMzeovlliUQOEdpFcjkgtYmxjslSqRRTLRskSYtMu9X5VeHd3CWhf\nc9hGzdWckE0k1HDwjBQrA6HbL/5cBAkbZjfLHQ0mJUqcjypDggNtTLiRac7N\nBCI+qERjThCkCptyTO7uxlE3DG/gKJFads/8Qv7o9NbdPMmFcxaVuPn+O12H\neDWOHDSZZQToxMakG/l9lnPhw7OFXuR3Td0NOq4faH6yihVUxW3xdTXHNk82\nNpoccNI0j3JBCXOTqH8F/FweEhVxHTND68IazQf0DCDqmAJhKKEmbZWPmOiH\n/mF1qDBXKR+h0piE+8GpjiThLOiZFBmvxd1rb3tDUCSXNS8dJmL5bIlDayLA\nWKJi5juWrm7ehAha09V5z9jtfUH22rCxBbaSq2fh3YSZEPjhsTnPrxfijrL8\ncGlS\r\n=oLB0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCfrESv38OC03g/KrC2hmJvzof9ZaVxEqMwA2g6gj5vAiEA7QUdM2O4xgtFRflokqSpOhIvWHjaCpDkNTcKztO7rbc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.55addb8c.0_1613772164255_0.6037049358549953"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.85dd5e9b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.85dd5e9b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.85dd5e9b.0","@material/mwc-textfield":"0.21.0-canary.85dd5e9b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a723fb0b68d5c0ab6eb13c066a9c255b58d1e19f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.85dd5e9b.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-kweWxm+vVNcTkJz0bO8GbvaY8KqcBtUj5qMW3+wp8oHbRyxkBz3AnhjTkqHcEjJeHVn4L4f6PBP7uYQz/SGlag==","shasum":"9f9d7331197e3661284da19b191764d47cc96e06","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.85dd5e9b.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNGZCCRA9TVsSAnZWagAAOegP/37An/o/DUK+3nuYF7kU\nusWFGSQDP1uTBNa98tJJns03JtF8v7LovZDo9esi6E+jV1QlS8MTqULncsnP\n1Z5y6efFkVu80l41UQWPX4ZpjLRtnKBxpvNpgPxGI3QRCYXUjOFZv8fyDLhp\nJZn7sP68qPAsOaUbxL8/RyXJX72G/rHlXXcjowGp5QdJiZ1MvZwFydTkv+VM\nxkt0ZlfpN7sE+L60zwI5t/sw0+W6m0C31xML1AB256rp/kMoPXzD/LkGySPp\nV+73g9lmjZ/A2Yn4YoxwGoyawEeLr0cQXwzkovY5lvfUHZUnq6wsoG4CUO15\n2kYYImTY1ChwN+5MvyDvzeFKM/V75Pey9ajTtheG12kz5V/qhqxHySHYMs83\nadNWqyug1YpREHItQvVsgySwnAaACW79XaZUTx1EcAiLrs7qR4shUd5yMqV0\nbKmS6XEB4NJmilvJ0bo8IfMIeABUBXPYy6HkepJ2wVAOLojSnyQdKNP52fQr\nzmvXLR+oSWV9SgMj4x6Nk8mRaPoluU0CTCayGA1mjySN8vzFhhaQ1/mh5NQH\n0x1Nd+hKPT1xQ0V3dDrTtZDwKiqqEKJ5tL3fwqv7EeGyQvWrpGnMXoxLZUTh\nYNAMldtHUbjol0NIPYZLqMYhUulJ0td0oJ8fX2O+GjJP7liS7tKBxEVlLVni\nAhC6\r\n=u3H5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAqKLXjFYkiHbjU2MJ147naZmVzcVrLB+zmS861D/OQwIgbVheu7yflJjexui8ERZH+/AImOkmQ2gR3GPen6MHwDk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.85dd5e9b.0_1614046786262_0.4747522945046314"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.aa3e078e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.aa3e078e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.aa3e078e.0","@material/mwc-textfield":"0.21.0-canary.aa3e078e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2acbbc6ed6d9f649621ee54e8265c9d26c49f634","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2acbbc6ed6d9f649621ee54e8265c9d26c49f634/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2acbbc6ed6d9f649621ee54e8265c9d26c49f634/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2acbbc6ed6d9f649621ee54e8265c9d26c49f634/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2acbbc6ed6d9f649621ee54e8265c9d26c49f634/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2acbbc6ed6d9f649621ee54e8265c9d26c49f634/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2acbbc6ed6d9f649621ee54e8265c9d26c49f634/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.aa3e078e.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-Zlse4GYJRHxBxu8oT9dAxVnj4e9uoui1Bans4I2kt/G6A0s/qrDFcGEZMEkzDKQFlwVCGbo0WaDQMTSKXgojpQ==","shasum":"7f0993467d72288051986763937c377b3247d18b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.aa3e078e.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNThECRA9TVsSAnZWagAA9FkP/3WkP66kFt70KAq/GpcX\nui5A6JkmF3bbvJCPbn9e4NF05OKQXJDrXTFF1zhtDDKPQ4uGfChvwvrY9oRL\nq6uEeIPaqFznUSk4fHkaL8nbizoIItTwQiQsXdtEn0rcE8GBpHHWNY9L1vrT\nq0LCN0qJ/W4hdhRjVflKEhAPLDvjo/XGy9cwsl6PGQE4+jc+iCyOc35Xo+RC\ncPMeQarejzt7xjJEJmpAT5cd0OPHlVjd6U2C2GxQzWbcZ/SrLEGoR2CoRvNo\n+3YqKmrqzNvoyU9o0g2vWd64QLSt2gWt5rtzkZIvovAi1bcf/qfprmeVuDfI\nLux4pd3wrJmRJlYwzlm21H2+q4uiPpXqt3Ge6ive/+wyYefRCLxdgqzR3K6f\n7NXnw46wF1a8uYas27JbZlbSYyOf+6coK5cchyfEfXQuZTI+fWYMq4K05nZu\nGappuFCJCSGaIk6ltpcfNOJNnZR7qlW7FhibUE1NUQJKl4CSsvbFqHM5GA3M\nrByH/xtcPbMAHV23LmF2w2393IryjOElHYrOamkt+r/iClodtgfVvwo4lozz\nu6dSINuVgDrHz3PqUmvlOwT9PHFLUvb3fGPsUom55VotHotM+XzRIaFuVhKF\ndIbZjZPhwbxN7RgwmoD3Dzxad0n0+PEKSpjN0PwIzHxYJ/c4PVkLwmWZp8KD\n/W+/\r\n=ZipO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFU6tM3mVj5g7M87GrlpzlvAzwKF1XixLTri8FF9iq6AAiAgOMOSIEGi9iFfW4DBSNuhY0DLS0c2Oi5SVv54hJ/sAg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.aa3e078e.0_1614100548375_0.23019815697463852"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.dccd254e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.dccd254e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.dccd254e.0","@material/mwc-textfield":"0.21.0-canary.dccd254e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"7c3011f1d9328f6405596f794c28c98485d9d40b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c3011f1d9328f6405596f794c28c98485d9d40b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c3011f1d9328f6405596f794c28c98485d9d40b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c3011f1d9328f6405596f794c28c98485d9d40b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c3011f1d9328f6405596f794c28c98485d9d40b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c3011f1d9328f6405596f794c28c98485d9d40b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c3011f1d9328f6405596f794c28c98485d9d40b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.dccd254e.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-aK1G+Lwo/h63V3ptZX1d6ooC/wR+nYt4jNB6DeGNOwvaf47d6bsIqHarAe8jddZrJmgD7uFD8DgfqgVQPQRoqw==","shasum":"9e4b33a65c5bbda7c703e6e6fd9cab54b07527f3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.dccd254e.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOWPgCRA9TVsSAnZWagAARwIP/3xfNJPtwf7pguR+eWDN\noJjuoqB+xwOXG2Q05Sjox+cqAPq7Ngffw9j9n1VzlDMIBI/Iu7GUZTMXBgit\niOqd01mFqmLzrOGBz1Rb8SiTpYTEFsG/6CrFKOKeHiEb+oBDnz3Xo4udHADB\nq3q+kAbN8eM/D+QsvUN6Ko0Q2xM2wuTXqmmRiUh1qAzbEWZMQsg02aGWKjh8\nC2+dZ7eZhd8SXhDcaeDn+CkAWaHPCjvKa3r/3kHli0ltcOVSf6DDnpC6ymsM\njGPl6LLDRskhNk0M0Ajwp95BL1JdqbEWjmcUCz0ZTAX2/eCfFcss6o0l/UoX\ngZDkIR8XKOz2HzNHgF5g1RcLV88jlb4GOMy23BEyUxhF+cc5QlhCj5CC0lcg\nunj2Uf0/UVJF2DSm3lfIzjDFL1hYihtq/IesDDg0jrQkNA6kLBI+B+WNehE0\nywCHBpmey+6oeTnoIHw6QtHeux6X7HFEpHVPLzs18zLYtgORNAGoDgv0ADYA\n5yxtTkb4JWx9pyXCwn9/zLa8WW2epEXWrj8WLXWLvJusYyADscxVyJf1OBNr\nvAKYn/VaKUJSLdlXORgQaVpUfsuqbg0ubMUen3hrdl5JuAliyGMuyxJHXhzn\nxm3yxac51OD8cs9zU7z+tekLACG+nyryTAK9TMA159ns+Dn4g1+VSPaPR+IS\nPPUG\r\n=87bN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbdv2tjrqA5hqifkIRR4kQ7ZjXFBbUPKf7zqqlgcngMwIgYh7ziqNrR2VTQqmalV6cvSIHAgyCao0e+VnhzBUWdEk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.dccd254e.0_1614373856471_0.20097198172094366"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.7dd1a27d.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.7dd1a27d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.7dd1a27d.0","@material/mwc-textfield":"0.21.0-canary.7dd1a27d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"15fa381ead1eb4897aa006da0f445765fa9a037b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/15fa381ead1eb4897aa006da0f445765fa9a037b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/15fa381ead1eb4897aa006da0f445765fa9a037b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/15fa381ead1eb4897aa006da0f445765fa9a037b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/15fa381ead1eb4897aa006da0f445765fa9a037b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/15fa381ead1eb4897aa006da0f445765fa9a037b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/15fa381ead1eb4897aa006da0f445765fa9a037b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.7dd1a27d.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-r9+zUQ9eZAZaliBfsixx/xzAxEjH1fz+/j5mcHAHZY5dL6UCzCuWK6ywO3q5Sc4PdbfYEa7Ga9PP9zRDBFczpQ==","shasum":"951d7bc114e3ba902797a3525baf49b9f036698a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.7dd1a27d.0.tgz","fileCount":13,"unpackedSize":43166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPWQ7CRA9TVsSAnZWagAAIfsP/AkcgPLPB22GkDnOQHcw\nOvsC6fEXmXHaUni1mzHr4Whscsgiq0lVnAVtnV8Mr1aLnKfKpdcw1XLc3swA\nnJmA1qdKh/32MFNOsL4pLq2ygBqj6OVj4f6npvPlWSMLWrOvXkl0KtXHk7eL\nBh88mkj0J30qq3eEblbYz4S8NvdM62tPKzN928xdUNRxinFZ2Kgou7OiSsEb\nwsEwExCILtym7xEsOk9x+Ph5q6hpH3u7Z+W8UdObuFes2K578UALrh8HPmWL\nuEhKCbSzeALtnoyYPAGP61EBVVN5Zjt8AXvALxvuEKoAO5GV2Tq7BMdi3laq\nt/j+Utx+A4PzBN4naY+3U2xJf1/9ZpZheKwvNYYX2gOajH0b6e72xtDjiDHJ\nuMbiSggv4lVK/D5UiklfrGhCZU4UplVkLOhYxi77GugVCf9ApWngSK3s2/Jn\nfE8zxsIdtegHVpuHz+YnP+wa03qWeXmBZ89bw/xxvKWsfM3ji5UDbFGLBkMT\n97/V1mbeKVy8Gq2ihNJFoWyv1ar4IEGmizLLe8ECJENHxF9mmnrm4Muq56nv\nanzvvPt6Xvim+KE5dSIxplr55Eucbo7dmZKe4x4rN84//8zSmauy4ForuWS5\nSmTBDEW+vKzvn6znJp8gbsE0EKmiBu8ckjvcoaTaD0Vw2xKsaZET3wnGfUhE\nL/k/\r\n=yKvl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYM7KRKmm5ksHH8R5GAcT+x/mS23xwTD4wEv5NxY9/eAiBawVh3ou2rmghpi7ZCUsk2mrpkiIh853rj58jkQAsxsg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.7dd1a27d.0_1614636091166_0.4203270387692397"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.12574572.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.12574572.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.12574572.0","@material/mwc-textfield":"0.21.0-canary.12574572.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"043d9159945b812192eb864b33d16f892831b4d9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/043d9159945b812192eb864b33d16f892831b4d9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/043d9159945b812192eb864b33d16f892831b4d9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/043d9159945b812192eb864b33d16f892831b4d9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/043d9159945b812192eb864b33d16f892831b4d9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/043d9159945b812192eb864b33d16f892831b4d9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/043d9159945b812192eb864b33d16f892831b4d9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.12574572.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-GYSBiCGwNhFaSTqHuBQsSNXjJp+PspI5z7KlKRR4a+wCu4ZTXmQCrJf0tq4t89JST0BJdNEREMepS5n7yaXRog==","shasum":"e2938a85035c0a4d1abddbfe99fd2b472db9a28e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.12574572.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPqA+CRA9TVsSAnZWagAADngP/2w+w97CHPaENtVluR8u\nNdz1Rcxf+ETntaciqP2vQEZrBhY4UB7aOwetOIuMreazEnGic2vOScX32bsp\ncRErUxUd8+bdJ+JIlqLqQ89eQhnp4rq5bBPaaMoWzEBf4jjuj5pUlZ6xiTIb\niBbs7gUK7CciFIQ0WcvqkgBqXJy9ZXgQ2vhw4p5k25XIFe452qbyYwaEDYPG\nAgad3Zw5EI2qDs5waSgDnZM/DkGAhuHC5QiNaJMbh7em7YrB5XVkLTmAlYH8\nXdDomfaSuWwkcI8e9sxOfO9qXSJdzKC8jM0QaN1lL9SR6gHvHSkZbJrokvP7\nBBtq4eFPk5MAJEyQyka/8zE1UKhrY2HT2R9mWyewyQxOQJmiSvymhBijizT4\nZAokUR7yv9YgwZ3CFAjqOY7dYcFdG6JZlox0jEhT0y0PdS75fOeyVtbyXKXj\nJDHcO0cdjzIphPe69TgllYmlkF2wrnu7dypybIDuWtALLceH60ryE6T/Fhvj\n0Qvjbvm3FFV3hAB1ZqQdYJBBeyx6huzSTdh1qjcZeS0GI7WmefRygoGCzcmR\nwka8kPy6DbxD7f60ONeGsgds9tk0IqCw5udr3iUYEPBBhj2uk67TS75iF3ym\njIHfyyxnWR4ExTEdU/snr+LCOSez8i9Ha3BuQLl179phzMSewkiWSNsfSLbx\nD7PR\r\n=wY4f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrodMDLuy5rPRTm+An7RGynZEyV3AdTYH+kRGxXdRMGAIhAOESnSHv7YKbPBSVpKM7XmX8L27yyyZ+IRUqSvEzhcad"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.12574572.0_1614716990193_0.010722956082612312"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.1109a3d3.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.1109a3d3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.1109a3d3.0","@material/mwc-textfield":"0.21.0-canary.1109a3d3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8cdd512cc62bfc703a1cc766d67d04509e4e0c08","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cdd512cc62bfc703a1cc766d67d04509e4e0c08/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cdd512cc62bfc703a1cc766d67d04509e4e0c08/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cdd512cc62bfc703a1cc766d67d04509e4e0c08/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cdd512cc62bfc703a1cc766d67d04509e4e0c08/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cdd512cc62bfc703a1cc766d67d04509e4e0c08/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8cdd512cc62bfc703a1cc766d67d04509e4e0c08/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.1109a3d3.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-Y05jfhCQdOXcaCc7zxMPrarkKbqwjmztV4o6YrfMvCK9NHIzy0TqFgSzAvnH/cWk7dfO0+xhqvvYJ55pEkbe+g==","shasum":"b92b7f3fc20ab0a3f7790c6d94dca514bc979a3b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.1109a3d3.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPqF8CRA9TVsSAnZWagAAjIUP/1fwyVVc4zhvENVyLw4G\nI7dQsZpR3vqAlkCKn6HE2uSsL3CzHLeZZBtQrSkLHmwYidbPFFPz/OrG/zj9\nrIAICZybqpKReLK66HWiG88UEWjvKiVsVSxmzdioCvWKNr/O573nKc0BoIim\neuzeiG5A/tYaJ4QQl1IivdQMx1bF7svmdYGgdatt6dBqtG1AvBLS/dasqQvz\n+rXCw/fzFcMCASVRfdZlblMNPrdQ1IVX7R10EEk+zGyaFfTsZOWp27yDBWw/\nbcWiQde6vXbfg2fydNc2At3n8HEUFxmCW2H5QHzrVLQ8RrT4XGhH034amFjM\n7inaPtnjL8e3ED6pcd+OdikmZpMTeACoybOFSrKi3HOi7chkLwsYt7qjQi8s\nGD2joGPeA43MjyNfk0NDXvk5UALZnd80WQXKaqust0zjuxxHDXwE6uLLt9+D\nbZulgSb5Z2XKJlTWswEQqoaecXEDFLFPndqPOT6Sn2r59jBjZFk8E2NTrdG+\n0TTXDcns6uXfMYX5RXpd8m7EB/twl9uPYWmjEvd0OaZsLGMoUT/ipzDjYgZh\nm6T8r3v1KWMivrXUo3FIUolRErn9z4F1SuD8j/7gUxgqWYxb63pcy4vWAtTv\nJVuI2h9BJar0c8kK6XyKH9pw0F/QTWLE7LEdupQpdLpB+R4J+QtBLmjzVCQw\nibEg\r\n=w99m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHxPksxSZrC+jEPXoQjgBZyJbOeLtIJa5sMPgRmuyWUECICZwFlL0F+Tn37ZGbZPvPtswNihbNr5wO3gHT+IL/kIF"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.1109a3d3.0_1614717308480_0.28558497900826896"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b9cd8739.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b9cd8739.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b9cd8739.0","@material/mwc-textfield":"0.21.0-canary.b9cd8739.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"89fe0448abab4c371af17b2866ec736d9ebd8cae","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89fe0448abab4c371af17b2866ec736d9ebd8cae/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89fe0448abab4c371af17b2866ec736d9ebd8cae/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89fe0448abab4c371af17b2866ec736d9ebd8cae/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89fe0448abab4c371af17b2866ec736d9ebd8cae/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89fe0448abab4c371af17b2866ec736d9ebd8cae/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89fe0448abab4c371af17b2866ec736d9ebd8cae/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b9cd8739.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-mKfFvzn5rzBIync511ouNkeI56yKW06urs/FZvAKkxOXy4uktnM2CUYUcnEHEjQwhyFBJ6bUGU/7ZuAjf/TBgQ==","shasum":"70b5cc7c0d2fb98083226b569ad9c5511fb1498f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b9cd8739.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP8vjCRA9TVsSAnZWagAAaHoQAImki2e5TB3q4q6ft7T6\nneC89zAwCqBoJXbfg3q2HMlurICxQB8tDxMAnwQ1vwm1dgwVS7IThZJ2peEp\nyyecgM4foRK5Bqje8pz+javafad2LLCzh19Wr0G4NAF6oNmdtgt5HPaMflct\nRi0Z5OLss4vUaKmWMhEryoaMWyrX99/3Qhx/e0RQ7oRBI9vGC2SOGnzdMXJW\nsGLqdbTEvOmIQQqEUF2Xsy0q27exYbFhcv3gEO8gobiq5z5yXcRIzll0Wzi9\nWcOgpiZcIm4v+4VwChaTIRRlqZNj9WzD0xHqVqhCWaJjVPSHBZx1TcftHnDw\nnaJRytzIS6Jv4neCVPywfBv4jbs+D801UN3hNlR+/tw9F3G7iNKlilGXLGno\nlhgWxPlKau11+qM/6RjespAgjp6TdFfaYaGYvu5kFKQ05jeHacZ4nG2LdfPQ\nyN0L16W6tNzxMjJok+d3SFLrtjvpL8Es22mn5jT9QgvMaCi1QugKMaB6ubJn\nF5BznKzsjePCJQyeQo72uoDhEhrSUaxCqosTx8OO7hDdCUKlOnuN70KtNsls\nCuV0fOzzjo2+b/OgbbUL1iF5NyTlZfHjqGa97VsYkGPUfwcXVskcl7BDYF2R\nRm9sMcDRT6qwZ64M3HkZtxeL/Q6fQpJvIbX6Xk05067rOZdij0zFGB6e7gEE\n0etq\r\n=zr5T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdjDWkx/z9RordcyBUAbIYo9kewZysvrg3X5u2q4gJQwIhALTBMTloc0VgjeckTJZmituiZu54vKrzN0aSqG3AHO24"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b9cd8739.0_1614793699325_0.94477154125912"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.71ee796a.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.71ee796a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.71ee796a.0","@material/mwc-textfield":"0.21.0-canary.71ee796a.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d989f6470cdcdd144c7021a4eb0ea47e63945cc7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d989f6470cdcdd144c7021a4eb0ea47e63945cc7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d989f6470cdcdd144c7021a4eb0ea47e63945cc7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d989f6470cdcdd144c7021a4eb0ea47e63945cc7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d989f6470cdcdd144c7021a4eb0ea47e63945cc7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d989f6470cdcdd144c7021a4eb0ea47e63945cc7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d989f6470cdcdd144c7021a4eb0ea47e63945cc7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.71ee796a.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-0ITWxVnb3G01nSszbnwpGlWIJRddnDxJRqlQ/M8Wf+PsmQyCczwJ7M3mmSyyeKlIKs2UJqC4c0wOH7TB/91B/Q==","shasum":"d44ac67cc70c56e907e061165a9d1a9ec2f73849","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.71ee796a.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP+14CRA9TVsSAnZWagAAUdwP/1VSWR8dLREkXqNZUZoN\nZSdD+z8oyz+HZOaOsi7D8h66tXShGHFJq+88OmORX9jdZl+8PipQtWnBXLgk\nG5Xoqq979KvH/I1sNR2PwWX3qptHO2DBuhk8hMMlKjtCiNQLQZiAydLQiamH\ndpsCwZyxsj6yZXzyyUtSzb3IEeaJxbCBH/4eitxZSEPRTphmMpwD5DlGGQ+g\nKz4+2Gp+9G2aQS05fSZvTnLlhqcPMHUMX2BK54do8mWjT24gRldlx7A8Vx2b\n+z1K6CG6JCrtHi7DMRr+klqauspHAcAnKAxR29bJWtDMndRksXguq8xwPUQv\nlImubT1U2M2HQcAO3rqtmKgRSLHFc16CZigE2vJzKQMnKydPcP3V2YaD0dfr\nKVDuL+7cMx+R4Bkobvf14rqdBztAR3E1Y1Mz3pmXXBw2l9BIENmVlQeavgKZ\n8rsNuIiXFCRsCKyHqj5/B0hyAkxqcPRKDuxkXwQ0Muu4epiL0AJJA6R71Ev8\nkmL7vMV7pFoTfDQDz7vYkfmkw5ET5lukZO7MvYwZIioSFjqwZrGlucnh/x2M\n/m4VVzkD+kCSaPdrYf8rIIrlz0dQeKqYmNzvQcmx3YuBfCYJt4xO+BZvWGLv\n2sHtxFKWo9X6rVdgv5RHyDiMJsfdCIATvDvYlKUqKoyA4eDjPcYSNLM+l0g+\n3TMX\r\n=sb5m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnMtMeEIpnJuokTkKtsN2/oin+IJHSSzGP6bAsDeeMOAiEAwo8wY1XTS3/oAViGzKcm9nnTBld+xUomwbYF/MPiZwc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.71ee796a.0_1614802295788_0.8236354584742345"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.2be191ed.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.2be191ed.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.2be191ed.0","@material/mwc-textfield":"0.21.0-canary.2be191ed.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"e273563187c689092eb053c50fd9b94385380fb8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e273563187c689092eb053c50fd9b94385380fb8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e273563187c689092eb053c50fd9b94385380fb8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e273563187c689092eb053c50fd9b94385380fb8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e273563187c689092eb053c50fd9b94385380fb8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e273563187c689092eb053c50fd9b94385380fb8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e273563187c689092eb053c50fd9b94385380fb8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.2be191ed.0","_nodeVersion":"10.23.3","_npmVersion":"lerna/3.22.1/node@v10.23.3+x64 (linux)","dist":{"integrity":"sha512-p71OPdAQDo7sVnE/feXwH6+Pw/AOAbXbImXsRxVo72B77hw2ARodIY1PWl7A5OGM1xQYOJXZVvXX7GNb6iXw3A==","shasum":"f7fed52981eeda22d544d786429eb63840cd0e13","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.2be191ed.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQAUCCRA9TVsSAnZWagAANMMP/2R7BEn8fRNfI49pAujk\nOVBHTCpdacGrUVYL/rQsZiyXOfBQgB75/9sP1ZuCK4kFfQqVRr6n34O582k6\nYJk5JahEx+eDuZ14SscIwE8WQ9VSp7khKY4X1E07PmfipyBdOJU6B292Toz+\ndcPAJmH7RqVgLPJB8Y1LTPYmFt3OBAMyp7yvYWm+47NktZAoHfihccyp4AgG\n29EsGtp13/2amHF866MPpZ55uBt0eIPVucDLMYv4Dp7xNwtoLemmJ5aedkCV\ntWo0OlHgwxN6pDlT5cATrtsjdbozXO23AnzRTxTzx0l1PajeAacfSVOICfEe\nqEJhRL+LKkhFJcbSmZhvvAz534KeleUt6KnyQGn1GG58bjD+xajrRSnte1Lr\nGTGgtz8Qmlu7O+PL1uIhoVfbEBbobEOwi5sgWZXFfMcPHKvHPi+uBwpKdX6l\n080nQhstaqcVW3GQo+Lpc0QHifXGFU8Y4ISc7OVaOY4vXCoMkbmEABeQ+E6R\n9Ua071H/JDtahqdjleJS/4w/S1TDCuI2StUmoXHSFqTP+1nZctP4wjvhnxb5\nWktTRs/ncbh58S96+Im4spFkY0t0lAbs1yrkTGM1Mzj0eOeQB6oCIFTqv9Er\nByWsKhDqwRhWGOYY6auW7+UGPoYIB7PfgbmqjIZ2wlZjNC6q3lXCkVNgV4Sx\naoNJ\r\n=dCwh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcyulc8fKSlxCXTm7+FLI6yz4UhLnPGegq+yVM3wC8pgIhAKQDFJXS4A/UdXgsJmHID3hYGFaJJwDb6fMJBuveozm5"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.2be191ed.0_1614808322532_0.41292280898521483"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.6dc7b06f.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.6dc7b06f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.6dc7b06f.0","@material/mwc-textfield":"0.21.0-canary.6dc7b06f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"9a8a072daac91e9fc841e2f6cacc0fb753ada76a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a8a072daac91e9fc841e2f6cacc0fb753ada76a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a8a072daac91e9fc841e2f6cacc0fb753ada76a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a8a072daac91e9fc841e2f6cacc0fb753ada76a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a8a072daac91e9fc841e2f6cacc0fb753ada76a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a8a072daac91e9fc841e2f6cacc0fb753ada76a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9a8a072daac91e9fc841e2f6cacc0fb753ada76a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.6dc7b06f.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-G3XEeJK78EUQq+h/dB691v/AiOfiicamlVxuy1sExSC9PGJM+ahnG3eXPYTeUBCp40IX5NvUEj3a6bcdaEQGhg==","shasum":"bc9366852113eea9530f0c7cada730020157e9ad","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.6dc7b06f.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQXnXCRA9TVsSAnZWagAAcawQAKRauHrA1CkfChj41cDh\npkggf6SAqSMfn3zRg1+XyRD2UQwHOLI0X5mqgRYHunJXXKm/IqfTfm7PoXyq\nN4hyzFm8SduzNMfmgniyyKXuLlb+GcDHlwo2Uy2YastuHwNmaa/cBarmgBgg\n3etMI/e9xVy4ygW1gfnBXmhJqg6WFGniwD3i2oY9a0y2wotErVwL4txh+ybq\nMVp3yNpQIs0zJGQuV2zNn7hZiyx5rc3p5JQH6Q4qcZ9JcWCCF80p40pHoWWC\nhd+VNklmh9YSMScEC8CpfKHS35wzCxq/PvvrtUW5E08ol+e0dDM0feGuzwSn\nsCyRDEWvPjsRzbgUcg1ifIa+CAEaXtDVQO/WUSAxep9j3TMNIpfpGPB6KIQ0\nEbnUpZP38vCimrs/dHDo1vP6PjwRvN2EBLaqRn22TV8tZamC6tqFpNz8gw2P\nL+RaFEE4CuD7ds3DQK/HvHO5zVivqSCvB2ZDWEmOTCjPH27pFWgH8w+oRymH\nI1BZLydF6JF0RjHrnkW+jgUnq0N4E5aXLBmArrmK/Z3IJu81R4wVX/jAtI8g\nt2kdvZUIkjW4n+NXC1yYET9QS3pJW/6x7piImnnIdHUxXpzXrwUuIV710PnV\nNZux72l/GtvWF6WHIgRZob5uMokG+rj/Nt1puZ4hS2DQHWxzgLttI0PWTOpW\nD9Qb\r\n=u7vN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTIv8KanKBnHPKt2zWb2BCA32C4Su/jOXQQ2mopOJTMgIgTmF9FLRzjfMzKAZfInoplt9cwURIDzGia6WCM7Ex1tc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.6dc7b06f.0_1614903767495_0.3319884047485815"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.24fe7ba6.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.24fe7ba6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.24fe7ba6.0","@material/mwc-textfield":"0.21.0-canary.24fe7ba6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d87a6c320af38bd078f91bc9ea457c0e21cea9cd","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d87a6c320af38bd078f91bc9ea457c0e21cea9cd/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d87a6c320af38bd078f91bc9ea457c0e21cea9cd/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d87a6c320af38bd078f91bc9ea457c0e21cea9cd/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d87a6c320af38bd078f91bc9ea457c0e21cea9cd/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d87a6c320af38bd078f91bc9ea457c0e21cea9cd/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d87a6c320af38bd078f91bc9ea457c0e21cea9cd/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.24fe7ba6.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-TeCb6mhEzvTj3+0zFULZZTBWYqrObgDtOHrXcxUnNTpWZFdwq6iwGz4wjQkM5Lv7yhlahSCPMo4F5N84gviAXQ==","shasum":"0afea7a0880ac98efaff97d368ec678e8d360030","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.24fe7ba6.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQmoDCRA9TVsSAnZWagAAfcYP/ik7oBvzrMCbtV6uUorY\nb56nzdyiyqK5qCx73r/x5/Xcz2ITY4aqti5WAsVYj7KugHAWnVSOAoTLiq6b\nyKgCPm3pm7egkU2gOvSQ4jfSMKxI8kUAihbNqsk2UnzUA29JuxSbfY1tnP6d\nUAbkklSbBuhM6EI//so/V/beYiofFtndkdlebCz+Y90SCcvddcius7arA9Pn\n3zFtpNT8BqH4y9MPMhVYuOpqhWp2ylYKyw+dizG1/ueFxJCcNxunkaJRaD2m\nu7W7HUsVOd9WhrCuju56GmoeuvWV+8FOhYaZdGEF8I6+Nar7pgxoozilb8uP\nFEKgneKbaWRYaF+8QtVnBTzdQ8slOim/VkXOhO1J0SNdK/MdyT97pU+wh00t\nnBTzxE9zS5Vr5C4c5i1jxzW/9N8NWXC2CdwMH11LuxUChTsjdt4ibZAZKrCV\nu0tJLf0ab5RUVneN2XI5WA9VmuLtd3kGyQJvKbQEuTUf3qn+0ggqteVoIUcE\nUtGco5Lp7u7R9d0Cc0VVRViimFZEbPppo3PoaWD4l4GcZNjOXXVHGz0/7/P0\np7f9FdMjpUO6ZgRXj8BnyjtjnXhYrHhG/iiBHVBZrfvNXuuXK8RWZiGEHM05\nrsSRKnYSJmtqe81XvyviJa3GNptPEVAEcgpQhVb9u1hpdeu2fRCpcvAcims6\nC7cw\r\n=sQEC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMI5cjzDodhivxaVknQHJvQ14xnegLVquUD728Q5gN7wIhAK/5OhtQ3C95xF22uJ3/2d+bTlwYcPzueCfkkGceKoza"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.24fe7ba6.0_1614965250973_0.35981639758023287"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.12c477d1.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.12c477d1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.12c477d1.0","@material/mwc-textfield":"0.21.0-canary.12c477d1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"ea7731f325b77f7ec93ac77e442625ecf14e7f25","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea7731f325b77f7ec93ac77e442625ecf14e7f25/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea7731f325b77f7ec93ac77e442625ecf14e7f25/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea7731f325b77f7ec93ac77e442625ecf14e7f25/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea7731f325b77f7ec93ac77e442625ecf14e7f25/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea7731f325b77f7ec93ac77e442625ecf14e7f25/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ea7731f325b77f7ec93ac77e442625ecf14e7f25/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.12c477d1.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-2JzimwbS+E6ZhM20yDnAM9U6nvRZbzWe6eCCc/h1LZ1dmx35re9AtEq+U8gZt4N86Ip62S/CcavU/G4HFe4ysQ==","shasum":"57e36f8d1b4cebb18cd4ec79a6cffa845e22cd29","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.12c477d1.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRqQACRA9TVsSAnZWagAAFVkP/2w7DU1nCzmUzE+q8GBS\nLROPmHdqotYBPMdIL6V49bki9aRop9qlBsWeum5+rwe0mnPAMtYlJuNTVkE/\n3k6D4DTYJJaVO42oMBnzVzbckHP5fTtHU5ssGAdkRc+EouUNKFVA8zRfBjPm\nxRktQZZGDXbub5JNpQ/4pmE76oavJ3Vi8jydOi3eNG1yyA5l8iOX8v/+Q6nm\nkmISJ44firrgAk1mVdeQzbXLlijLYZbh926TBGrdk9rxKewBLdB6DxM8/ZcH\nc8TdiW8l+6jK1n6krLYzZm7Fjc6zp19aNF2whVOI+WhBe/7nPzXg/fP3zW2M\nhaWiLxcyC/57Q05jYfobdJykpCW520lMY0DY7YAp7aGd/vIQ68P3gg5+5Mxh\nuCuXHU8tWJXI1jfISJ9A2Jdbx/A99Sx5quqkfudjq/9vtvucGbSYP4juls6J\nDM53pNeGiO8/LL3kqMWSvktUoMaWvbI20HxPv9Xa3aJlia95pR2hvUKW7+Bo\nO5r5vegGGrtrp3pPIZTdO4Nn1foTRxjPCHVvK+Zbz6Qak7QBDzsQqThcsTHP\nHNpb9fpzSjFvrQKAnL920rmIlbDwBVdnXKcDxU/Yx1L0+pH4cr4PUSd9OT68\nnbdnJZd+DM1j54ev0MFpaamugmTY9LKCbWzl7f/G2uudyORfiFDXA9Nge2t3\nRvrm\r\n=fB5V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCam4tt4pPHRLBX62o9PBPj/ir0iUNCY4YFFtf3/gSOyAIgZ5WxR09ozcRb1jGo+oo2Hv5bmkLte3NR8sbNnU/AuAc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.12c477d1.0_1615242240093_0.22581939101384307"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.4c38f801.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.4c38f801.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.4c38f801.0","@material/mwc-textfield":"0.21.0-canary.4c38f801.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2f19e904d6306b3a12d41b0158ca0c3fc34362db","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f19e904d6306b3a12d41b0158ca0c3fc34362db/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f19e904d6306b3a12d41b0158ca0c3fc34362db/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f19e904d6306b3a12d41b0158ca0c3fc34362db/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f19e904d6306b3a12d41b0158ca0c3fc34362db/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f19e904d6306b3a12d41b0158ca0c3fc34362db/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2f19e904d6306b3a12d41b0158ca0c3fc34362db/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.4c38f801.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-MX02Y8ork2jbE5Tqw2liX3uMHM6lSC2rTtfAwFERjf46JZ67z2srTl+A0JNAz/fDD7PVa1g1MDE73PfR5nWdOg==","shasum":"b754a3772ce94426f5048cba1c11bdac8ae8f978","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.4c38f801.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRrJOCRA9TVsSAnZWagAAsiYP/1ZO3evUIIECGeXYfnIB\nf+18y3dS1mCeB3BerbQUtBCdH5sBkIW3WzYK2L4QfpYFVNr2D0KdPEfify+w\nZclPfl837BCeC3pKiK6+W97cBPvPl+lsk5PhvqbnvuE9KTWy/8Hg5J9TW1N7\nIeoAq/VqUu1n93JAvZlruuFW8AoxKlwKwdB2MPZA59585AQPifOstdYl183E\n5LzLZgZVQS+H9tWAKQb1dIh8Gf4UPXqifqB7IQEbJWa3WWRofh43xSmM684R\nlu1V6hDXtxdmeshuyw11L3zMzaP/Wu1mrn9sZ+C6aC32G62lTBsAIEP31AS4\nwywPUNM2fziiwFZlS1+FjVAvMli16sjIMabsiZZNKsqRO4zO7dhFR4r/9GQs\nz9dML3BAAX/LmEq8AYQdURDzR1x6jkzKf/0aDqPtCpfPOCC//VcLIMblV5bC\nw2ppLZ0LCOHKOsXiCOKhiY8AiSWQoS6Eb3HY4KOZbHekVzW+7wc5RBoW4cOT\n+9xQ8FBItL5L6YA00YxWTVN89R/EDqiN3vMVHz66XVFr6X0KFlrDzO+v596W\nN4D79MZGCv1R4xBk/X2HsbDpfrnORL8nYK96eyAwByYdNRyCyfWOVr0gbfO1\nMNpMbqU84n3bsyyGXlFGJr3qGTlgm6hJNJyCVl7gQbcev4J8qP6xLiKYcOVn\nuSXA\r\n=XAug\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGbt0/AqR36P0MemdnG4yfPs8Zm8ghYM6ug74B4KSDGTAiBOltONuuUZAj0Mdcp5cxthN6gjG8iK/BnBDO21LnPhQQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.4c38f801.0_1615245901388_0.5599332479073729"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.8795b83f.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.8795b83f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.8795b83f.0","@material/mwc-textfield":"0.21.0-canary.8795b83f.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"e3e75af3d23a6f47c66e86d2168ac672364726c5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3e75af3d23a6f47c66e86d2168ac672364726c5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3e75af3d23a6f47c66e86d2168ac672364726c5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3e75af3d23a6f47c66e86d2168ac672364726c5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3e75af3d23a6f47c66e86d2168ac672364726c5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3e75af3d23a6f47c66e86d2168ac672364726c5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3e75af3d23a6f47c66e86d2168ac672364726c5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.8795b83f.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-UqAU4xIotLI55IniKJRVlRVhIahDQRHdwBTgweQbR/bz3rJdyQAiSIlh2H6rgIps0MkKZHthIgOOVNI6TYfnHg==","shasum":"fa1a5735edd95479003f12f1740fb93940d6a489","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.8795b83f.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR74sCRA9TVsSAnZWagAAErMP/1ACcfl+50mvEfkpLIIa\nptD0KIzzBxQ9SxjKAMblJ4mOfZnkHFvqrSof+2A+bvJpDLz61LpUdPMsc03Y\nnGHlRvomBqK4SPouh/i7oiaYtempgnK7hSH13W5tsGFIDK+lSmy/96PAJmNW\nuF0vEMkBRSXfiG4CqiETYUkBjR1owSYAZ+dYuuscXXJDeXlkLDBIAZgI3FH1\n8S7sRO0GynbDHlCSkW607vpHEVyDtvCLX3cKqDMBVUCxZzwa3ugVBlIteTOY\nkaya/USuriP294bPMANCXsuXClDOAkZOEmRCfHMXshkiquxqg13wy9oi6ZvN\niXT6/S6jXxD+qA4nPE1tGmH0ziGSxehmM/wDpAkTCfgho7dsIzMGE5J0KDsi\nf2Yv92zyfepWLnYrWEGwwYWYgY3qbcFYUZjY48ILBT9X1J1Q6qo8OMatYakB\nNlVWYDyHb02tAEm2z2hk2SZrp5CHnRXDBFQLDwqVxnZyqojv1D1IWro8khV+\nrZpQp6HFbXU9hGaB6PjRb4fAZ4OWGrQ2cqLkVXqTt7P0L7GDbLd1MFOHtQzS\nLyVqYf5ltlm2cG+caDmmESjxu9N5uJcKy6x29Li/A04HZG+B2iUEUm5pPFbE\nPJlkpkfFKduBqoSFGOz3brHcXoLJ3N9QbcuLvp3rqAI2kyO8vZ/AbJ6QXY1+\ngPaA\r\n=CZk2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7SLEjct0EbeCqwenduRjRugCJKumQj3hPNA6n+J4OCAiBhzmVKR7IkweeHS1y+KYzEise2bg1w2ww0dCpvOpjpeA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.8795b83f.0_1615314475538_0.22469373117204738"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.12b84cb7.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.12b84cb7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.12b84cb7.0","@material/mwc-textfield":"0.21.0-canary.12b84cb7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f49d8bf5098f7acbc51aaf3dbc6880cbd46a2e8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.12b84cb7.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-ypsmqJF0DqKRT/fwQl5hOa2zPfEu8RSO+N8Qoshemhwjch4PORuIo7RXGBG/0ctcEXtd6a413u3jqVRfQzgKZg==","shasum":"052210892d9dc5b3efb26044dc495527a546b2a1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.12b84cb7.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSBXBCRA9TVsSAnZWagAAq40QAJNJrIzl66EjLZ9qr4en\nv3mAUOmypiP3ZW2yx8Vk1Qd1/y5sQoOQnhdLLIQBpNhwSGlaG0NnvNPgT/AJ\nx0cRCH9SM0Y1ZNw4WZU8Hg1/DYw1KWuw4+zTRVXOeYdMbxefdJNiK2YElBnG\nSrf0hzKUj81TJ298qqeacyhzMhVQw2qaojOYtJE2xVswogya3LEBAQssbgR8\n5cPpWTpfk8zvh+mxxH7pBsoyAtn0xoqQJKnmpDZy6VAHaGJ4eNpmH8WoxfEF\nSjG1OmZ5tIMeIaf0LrwXXnHdNSZmDLW3z/hRc0v8ML9LUIFRSGyH5fBaLfdM\nZa3F8lNeZek7pJWBMEvoSSJkZzVdMVFGgo/cR/0er25DRSH1yMRtKu9gkopK\nDUPookHSv+2/o4ouVYZXAacUIHUpRh1GziuS9wo4+/avQP7TXM/yGnkgd8tf\nJq68Y0nS/nwQJ+oQgyiLoa/P/t/FCsysCsfOv6sNaXAXUSauBuIeVkhxBIIZ\nHwV1Ll1zX5pQ8dxr6hFL9fbST2/L0Ob9cictXhtXN9yviRElFtkqYbJtJwkj\nVwfKUOdzIRws1hQyC1TAnyFQ+GrZHo9eZJCP53zJiMFpz8fCiu/XOT692sQ9\nHw3oQ/KycxuEwpK8VFT4fuUNJ9Cq71hcwWQ8eY8wO/mupg570m7cH6dYJkEb\nPNsC\r\n=71P2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9OUnv+FIRORnS7EggPIfTBIT5Pb1n/nDFRsJZ/P1FlAiAG2NOd8Ca+idUeJ3mb05P97VIQeA67rCc6o0jRg3m8MQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.12b84cb7.0_1615336896885_0.9923060313547316"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.6ac6784b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.6ac6784b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.6ac6784b.0","@material/mwc-textfield":"0.21.0-canary.6ac6784b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c60d8f8df8e8260f94f9e15fccf93afc356b0634","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c60d8f8df8e8260f94f9e15fccf93afc356b0634/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c60d8f8df8e8260f94f9e15fccf93afc356b0634/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c60d8f8df8e8260f94f9e15fccf93afc356b0634/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c60d8f8df8e8260f94f9e15fccf93afc356b0634/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c60d8f8df8e8260f94f9e15fccf93afc356b0634/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c60d8f8df8e8260f94f9e15fccf93afc356b0634/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.6ac6784b.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-AJzjadIUOXC5kTIEjqUFq7eyvJgMalFSW7kuLgqcE7Kb0lDvxx3CrZUdeRpmP2CyTlQ1dCQhsx34GfogYGZYkw==","shasum":"0b0da9b1d89c2e01b913114b15952152c0e606f0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.6ac6784b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSBgyCRA9TVsSAnZWagAApegQAIwO2AR80jhK6ZLzY5Vl\nMUvWdfLQQrTJz5t8OaIDZwIwOlylpAOrxU/SsOvMQJBddTD/uNi/3/gZMDex\nqVVs1FR6J2aE8lmrwEGZ/ApnBb01iQrm0sj17DHoNlRMV4O0iSbQQ9wyM9sV\n+jAGxQa8P4BrfimPrNakW72Ay57+gvHhwpSYOTAbMNK+ss5gVnItWS1nabO/\nyvCMSU0yVFISxgp7eQwRCfK1qertixooMZKVD6diwbsX5g2F8GpMlOU3WQ79\n/VASsMDi5u4TrB9IdwMatJu+3P1o+p5nDiFnpvKsTwaAof/m+5MCqTjiP/WV\nYn2pWwVJZtATvcMcvFOAcruoo95OD2eMREEwErOjlyjr/MXcPLY8EORNLHlW\nolktl7V5KukpJL/aVrxHsXiNepTUNbM1AmlmaNDDSr02+mCPHc84iq3r5xSP\nD3FMHI0cJqv0lUXRauw79JIalOgVbON+gBvrMz0HYuD2M7K1bsTRh/hRrSvv\n3q0tk+vCJLK9vsNMsmyURQjwe365/dESB8AEfU7yaKs/XoB1uFj369tADKmA\ndupuZs6ztboUAKfaHm0oSLzkDPwj9PtxS8qSyndLCmatd81aj9GDF8KzUEHr\nXS0pmr2Rgs3qHRqOqo2OU78ahhimy57Y8aIhmDtlHKFcFWh0Dlk5LsGDF7yg\n7Tkn\r\n=ZZty\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyvGcKEj80nDduQ5DeevxyUyOKUZ2F3Hhez7IuU7h9vAiEAsbkUm20i5AuNFKe6hEVYNkhaGxtsAqOjGKuOQmHB/Ew="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.6ac6784b.0_1615337522491_0.9042358921384812"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b6d92934.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b6d92934.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b6d92934.0","@material/mwc-textfield":"0.21.0-canary.b6d92934.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"82c48b7f335ed9103a3bbcd062d3163b1eb661a1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/82c48b7f335ed9103a3bbcd062d3163b1eb661a1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/82c48b7f335ed9103a3bbcd062d3163b1eb661a1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/82c48b7f335ed9103a3bbcd062d3163b1eb661a1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/82c48b7f335ed9103a3bbcd062d3163b1eb661a1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/82c48b7f335ed9103a3bbcd062d3163b1eb661a1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/82c48b7f335ed9103a3bbcd062d3163b1eb661a1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b6d92934.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-f9GOEAU1oCOKiKISqdz4a7/MNDpfYG9I56r2oIHP/4d8iDHx8QmGgwmeH7JaY35B5BlSh8WaKOie9DSW3HqDtg==","shasum":"9332bd2f8eb822006965eae8289b7966941623f1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b6d92934.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSUGyCRA9TVsSAnZWagAAS60P/1dAwg+PgeX2xKRMqgwP\nEYhurFxySpJ08es90LvBWbnbaogF/cV9pQXnBAIaPB3Ly94PvqGtk3RGH9xl\noDzixmLjwFu6eIc5ZYaTmlDzrH7Wq+UlNquV8mnGLp/llemqcLtqxRH8YNDE\n32sdB/tgBwSyqER+CwDeSvtt6/021+v/qHBD1N4cjjZ0Ef2dkGqZvS8mNaCB\n/logYGYHH+wNeshFXML44R5aDAu5cFAvkU/dYYKxseR9M4LKtAHjPNEM9Ks2\n3G9QRtpGXH6IdxXBJSJ95Cin4dPmm77Fwpt0dnH8X7NvJ+PknlIuiQFgyxY6\nP/Eel/K7S/rPheP5DPOv8MnmIfS6tqDj17NJr052XC9PwJ4dT1FXpm7eAfC/\nUYTOGCO7sgy2PxVyF8mBTKC2zkZwXNEbWMW8pKbHyb0rT7j+q3f6N8CKwPxX\nmb8eRlRSQcDQIs23pP81cV6PueM97ESyGQMgCk2NSyxtP6BAdxA8l/AJ8113\nQVA0kTb63MwGEk8jOgWiMg3ceBjeLSmVyCF5A1yILmDaadKu1uz5eJQ0V9ow\nxUw6LxHOLqnORItmUzY7rDpEJ/QmQhKb0dAvUb29YBf1R4p05bu2+d+kYwkz\neI2eSN6Qb2UtjSz8Vqa+kdk0nRophX4rSC3NrkYg2LVV2GYC8RUf+8izPbMc\nTKUI\r\n=6ZWN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyQg+OCItmyBq4zdEs7tEE+D7659OV8ZT1JwHDih5y1AiEA91YfMRG+8uVa0HGczRGEb3CTpo5Uhb6X2by9yFe4l+k="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b6d92934.0_1615413682095_0.6460915136512293"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.99a55b9e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.99a55b9e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.99a55b9e.0","@material/mwc-textfield":"0.21.0-canary.99a55b9e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8b0d740e8ff12f180cf11caa9a264f3dda6542f7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8b0d740e8ff12f180cf11caa9a264f3dda6542f7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8b0d740e8ff12f180cf11caa9a264f3dda6542f7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8b0d740e8ff12f180cf11caa9a264f3dda6542f7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8b0d740e8ff12f180cf11caa9a264f3dda6542f7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8b0d740e8ff12f180cf11caa9a264f3dda6542f7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8b0d740e8ff12f180cf11caa9a264f3dda6542f7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.99a55b9e.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-TaskhNOLOis1qjnpG7NtBkxvYSYJnD2VpDpvLVng7U2FvrUBbfznE/+P+cQRHqF+mShF/3Fa4C7oOATkplbV5w==","shasum":"4d0b31cd4366363970bf503c640b8fd0b44a296f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.99a55b9e.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSU2aCRA9TVsSAnZWagAAXoIP/2S/iU9HqRhCGrWbifb2\nWs2QhSfNo0S/RakZ+X6YJUoPFVm5LjTnf/Dybqc+GU1trqdSDplfgQY91P7U\nbMA3eKBjwqEmvnrbHC7epRTWVL+4TytZwRgziQn/sx/qZgd7JhaNWIJN2kB1\nFP036e7biInoHB/C61fWbVL0k8w0RpcF/ytp0fnR/Vvmkpn1UdETTL85RjVY\nXx5is7dTnWVIJBmljMMHP8k2j5futNS7M3nM4lqZ2PahbZSQug0BPNoiEhUN\nxB014wrV8PuSklJp2mVfObrxczV6oIeNSxDcBexJZszQkR8zIdpHUJgKoKLg\n82BVcVKm/ZgeQWsU9ZmgGyNLNluC0VnmZBXwN2BB4wfCX4h/YPjeswhJKpmu\nGBs/DeSQgkaRyULsl4FOS16oQExq/uJn3H/u2JVSfZV4ADzzLiVPpqdyyM5A\n4lRt8UroJh5Hhxc51SvPow0E/76jCyYNlQHuhfJZkPELexjVSOCCUicuPOUb\nXCaLAvR0xJTUVO0We6cteL5PC/9Q+QMmhXF0efq9S174tgccAKe3EIDBrOQw\nrZVYgRk/vChwFnkkvrBs3gqKBLr8HXpQp1npLLNp3eerJXqHxth+e9h+NRbe\nd++bhbiIJyomXRrf+J0A0ADc2rtTsDq9O3xkgfqnCqGVvon6vHF1gENfRljO\n21cG\r\n=sRmP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKW2KquCBQu1wnOYfIUO2NF64kX69wkE19PwfztkRplAiEA2vbF0SPwAGOLfb0BBxqSJXXlYDBmHQWm986hHSbSQ9A="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.99a55b9e.0_1615416730065_0.8238165387474166"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.bb14efb7.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.bb14efb7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.bb14efb7.0","@material/mwc-textfield":"0.21.0-canary.bb14efb7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"00644005f58173e15c7e271bc9c226535d1bbbc7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00644005f58173e15c7e271bc9c226535d1bbbc7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00644005f58173e15c7e271bc9c226535d1bbbc7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00644005f58173e15c7e271bc9c226535d1bbbc7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00644005f58173e15c7e271bc9c226535d1bbbc7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00644005f58173e15c7e271bc9c226535d1bbbc7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/00644005f58173e15c7e271bc9c226535d1bbbc7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.bb14efb7.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-wDUh/5Tq0DrK/UBTbmjr8SyE89lNl/yoPDrp+QWI6EUOIKACbufcI7izBa2G5fRde7qeboFcOlTDoFXC63DsAg==","shasum":"566b3b5ebb5f472d2e6190569a700fba0e5ceabb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.bb14efb7.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSVhICRA9TVsSAnZWagAAlYMP+wfGxza6XS1ziOY1GKfC\nwTCHTNbssD8iJSkbIxtfmxhThjHkXweNzbDjqbMhBwNrL+xtHWHItdyDoJTO\noe40GOh2kG3IFTJYuVv20xqQIMJz/y30iO1q8ASxuD0briy84wS6VzbZdlnY\nVHFwogDBddcOw1j069APAv/cd6/3lJxOMwASXiSlbtHHUhTlajuwGbB78OuY\ncELK8wyNDOY2YVS06/3BX7ieJuereVHRrscnaJchUaDx/JNwJx02Bs2sb9rL\nuDezHkizFFMKT9+Q6Cj6KNqo94TDiVcHYKfakJ+TnqM4xb1FuymQ/h3NechB\nJULhBce03xa9x49UbMDRoEpNSfwl3MNZkHyICzfKHcKj/CrpeyJSrjb9Db0o\niSzS5EbxoDXn1XWDb0tM3yriTlzldthrcLaxg7bYldrAQGbZxUAxMV5TOYZu\n05pxtFSV/B2oKfsZigtFeyNond3oVJ+yniZAHB7gKdKy2lDYXRic4c9u+5ie\nS98Ql8aidiR+roAzMDV+LMHzz0uUqGZ5Jf72tPyoZVcrVvsozqQB4VeO36pb\ns6Js8CzvuDABOzmF7WD9swrc+wbqIrc8+uBNkOEAvTjGgSsKjAEDS+AHw9fi\nsyHXqsErcFZY8+vefJIe83SmlSvpbUizPTQD7dy1/BxXw/g3zvxkj/4IPsTz\nThFx\r\n=BMqS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDACI6jswPuitnizQysQ04ozlbj1f1TixJIXSQ0IcY1JAiBwxo5Xsv4/leHCgPi3N4OtQLoHoWqgvhtKboBJYV9Lvw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.bb14efb7.0_1615419463917_0.9175307570257227"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.9ecf3bdd.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.9ecf3bdd.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.9ecf3bdd.0","@material/mwc-textfield":"0.21.0-canary.9ecf3bdd.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"536269b5f421223a32dd73271ba878cee3e04ec0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/536269b5f421223a32dd73271ba878cee3e04ec0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/536269b5f421223a32dd73271ba878cee3e04ec0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/536269b5f421223a32dd73271ba878cee3e04ec0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/536269b5f421223a32dd73271ba878cee3e04ec0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/536269b5f421223a32dd73271ba878cee3e04ec0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/536269b5f421223a32dd73271ba878cee3e04ec0/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.9ecf3bdd.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-repExzIYAn4SbS2UcGkSdQx+LNhO6DRCVzfuH1e9J0BbuTFcme1eAzodeqkyDwbHXzpe3QLzhNFS1ALEKIkKfA==","shasum":"1e33b306972c2cf6d5bac0deaaa09d32ebb950f2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.9ecf3bdd.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSWMlCRA9TVsSAnZWagAADIAP/juYkFM0gpNztFtYCbPC\ndbxNThyGtwzFNJ1ACwNnWujLQWKImCJnDbl5YJN+0f469vubuoDZlqIQNA0g\n71kUs6mTBsXQ0OUikvIa3h4bJedWKU7YgZKsRPbx2EFFuk7wQMCa0tP/WnNI\nHVg1MwMi+EGd0Gh/Oq8beqX/qjfc3TT0Qc6gKOCC0X1ctKp4bKPPxJMk0pYF\n1MJcyTvKMyptPv6L+L21Nj50Jyca0uEpbdzQVXWL8fXzcpJYLIiUGsqeCXrY\n91jNq2To3KANBjeXpgdhxpyXilHsYUDjMeqaIthusfOGfYVJ5Avw6nY9C2eW\nXi8d108gKKOgtmP08VM2sC+GRHy5F5QaL8kTBCfH/OBz1OTWhDiMz267PqdP\nyG2T82Buf68ZTokYvAvzjzP7zV6NlOgfo+GxdtLuok+VqS/bi/A2tfWhwomg\nb05Y117aAC88yVomus9EUVqc1/ROiSL/rIkVB2zkaNzSbfcxO0UHBJzPwpmE\n5IkhuD36GmuOjoSx/tlwGNYRQ6sAf3FBw5dgMVGktkW1uSNkSWTh6GR1vVEh\nvEzGGFpARvm9GhEKeqK9qu3OaBNf/IzfE3eWZ6HxQ/yV4F6RYRkr58rksBdg\nhcGawt4jZHy7aIJsUEd0uynqANgHgalUCF1BifiIZ7jEdjXVhlql0sJf8z6w\nfLRw\r\n=PRZ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHSJ3QL6kLm9x+8dK4w/xvMaVFFUEUuK7mlT88j14KfAiAHplNXb27AuubMsiaZQsBsEPZNlzLApelFeACggISTsw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.9ecf3bdd.0_1615422245522_0.04864454438111143"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.7c0e02fd.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.7c0e02fd.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.7c0e02fd.0","@material/mwc-textfield":"0.21.0-canary.7c0e02fd.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"96acba80bdfa05054613c4753b3c0211e2ac7a76","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96acba80bdfa05054613c4753b3c0211e2ac7a76/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96acba80bdfa05054613c4753b3c0211e2ac7a76/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96acba80bdfa05054613c4753b3c0211e2ac7a76/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96acba80bdfa05054613c4753b3c0211e2ac7a76/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96acba80bdfa05054613c4753b3c0211e2ac7a76/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96acba80bdfa05054613c4753b3c0211e2ac7a76/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.7c0e02fd.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-NKWVaxRIoJfObMM6vN/lJ7Xs1zMrra+Rko/wm6qP4yW91w218Oip2gOAF8QlfrAziKR06Yos6bB9efu4p4kohQ==","shasum":"202b3b2a4b93dfbf6ef0ea58de34518473e9aaf8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.7c0e02fd.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSXaYCRA9TVsSAnZWagAACoUP/0Yg4F5V/0wOIGIgpQ7p\n3JG+xnaWMP4YxrUp+9RBij6fFwZet0gqjql3HEP8/KTChuuwxqddXH+gWiol\n9q2LjTGdp78shd4suzgJSUM3gv0cnngYqrYjwMcNoszt5QJXnxmMywVYLzwb\nyn4V8pDi8p8mUngRQL5EyjQPZxKHIIIV+6dyCjIdMkqiDUT6IYyM6px8gdEz\nGkMeG6zgdUwUy9pbmgNpGAmrtr9hdsgAXJHF5E1OD9ZxaDbzp8/+AenPG2C0\n5d0Q5muINEPNI5N4HQ6B1d7Uc3nKynQenqeBNVeOkrRl9/hZwu+r86z4RElg\nUg0Tax90VoC1PpnvmLTGx7RhKjVxwpnyGqFP9RrmS5+O9hrq/Qbn8MtoV5bK\n6J5sdBr+6YjTf8AoHuhQNSOOlubu70l3Zx7iJQ4u1w5XAm7nfhMQnVRHII+D\n+/KjmyUk1nkKeqjo+ejVX7Vs0zSD/d+66+R9w/piKRAbtpl6aBIiBftt+BZm\nj2lKdIk/whJK1/ARAGtgncXau3tMxHEcGVvE3vld2PulKB/ZRLDs2gMZGtDR\n5tjtbBcDEJejVyvQ7MfLbh2qB7TuuprX55Qpb8x1+dVP9ABSsoWfeGpUXAjZ\nzMO4MAf0eyOKm9ShcrMXGG5Z5YWLj+ZscJejtqy7c+3WwdXhRuuHwlmNHV0P\nYUyV\r\n=xkV0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFYgMgV7YVeqnPSyyvgRMSztpEUgngjTlgbSKg19TU5MAiEAvYuEq7nhAl+7Xkzem359zUmTtfSBfY/SHLzExC6RVJA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.7c0e02fd.0_1615427224257_0.8411098347837118"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.2d6d59cc.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.2d6d59cc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.2d6d59cc.0","@material/mwc-textfield":"0.21.0-canary.2d6d59cc.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"52ad91ef80e9719962d213826d84928a37cf809b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52ad91ef80e9719962d213826d84928a37cf809b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52ad91ef80e9719962d213826d84928a37cf809b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52ad91ef80e9719962d213826d84928a37cf809b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52ad91ef80e9719962d213826d84928a37cf809b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52ad91ef80e9719962d213826d84928a37cf809b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/52ad91ef80e9719962d213826d84928a37cf809b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.2d6d59cc.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-I7X4iNWkfFz65X6hb11Z+gqZR5G7pRU1ZpmmSs/kxRXUtd7ar6jYdaDjLeN+J4OeQ3R68sX3LZDsrEawrI9xUg==","shasum":"947c153734654aa2d742a937c4b92ec140f273ff","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.2d6d59cc.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSmGmCRA9TVsSAnZWagAAqwYP/i8T2P6I7cGJaV+ywqRR\nBuCT5LVogKJO8izle/NFUAWU7S1dY10Yd/7cg0lKtI8JtCtdsfAZ4wi9xPJ7\nh8Htt8M+pLyPQJvwOedcJ7U8/5hC/SM3S9JbVRu0zcc1Oe5Vyy9apA0lEbZP\nMb3qMl5DD0NBygGaxluptYqI7cN6mnMokHJUwH3QWBB5e+pE9xZeXeLw9Say\nHl0TEtaHBpKNA+xV5OJVbVIcXc4h4f61ch71mJAOTahDJ31iK05jGC+cpZWx\nNc3+raBgvwGGssN5dXeamQdwceeXCg2tnUA5mhomAcOwZL5gGijGP1vkxmYw\nWGFSOosM1SAcTIlEnVVzm2Ew/YLUxgYEE9Q4VdC8tB4jAdiumdPJ4cyxTgNm\n14WFVWtJx4bn9R3Mb3kKay6+0o0cMHIEm3zoO6pyAKU3q11H5ZaknuElvH04\nuLAqs8WqBQWipuYBjLVlreLZ7hIbE0FF5ZIIl+H2mb8l9NbDCpUEB6SATIuA\nY/d1fqgqEJxO6QkuSW5NdgclD/wi+U2Twd90Jl3f961Q/FtvCH5RUNwfapfM\nEuWK2JdHH6OMmwPPJwNHv4nawAalNZ/YWI5KSJRnlyDC7BG5sUDGg31q0hnJ\n++rt0bGApM3mtRcBGp0G3Qw+laMqJEsHDXK1CB/ot4cYf6BwW3W452e6X4kf\ndyST\r\n=yn83\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5YdPEIGoSSxE6EqMGQzAf3X5ifFEpQxhCnNBUoVB/SAiEA04SfP+BQG4k/8h57mWSjTSUDG4k5wrkEEEyM/kQ5hDw="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.2d6d59cc.0_1615487398109_0.25554787243943156"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0138863c.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0138863c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0138863c.0","@material/mwc-textfield":"0.21.0-canary.0138863c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"851518435241b4315820e91765f5b26a5537c63f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/851518435241b4315820e91765f5b26a5537c63f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/851518435241b4315820e91765f5b26a5537c63f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/851518435241b4315820e91765f5b26a5537c63f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/851518435241b4315820e91765f5b26a5537c63f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/851518435241b4315820e91765f5b26a5537c63f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/851518435241b4315820e91765f5b26a5537c63f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0138863c.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-sh90TcLXcGoWJRFeZ4F9I0IL7OyQ7HUs1HB4eca/BvZdvg/kFHDisDoYgbfzrZ+7ppBDapaeDrrZb9aNBW4G3w==","shasum":"4a2de1d912452c2ee1027ab8a524b1bf367270a0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0138863c.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSmNiCRA9TVsSAnZWagAAZz4P+QElppI+aOc9YjRaAyQP\n+lxGEtASpMBYij+c1tnCvzyREkdFPYtn87tFU+9e3npm99DVoEeOMZgWbLfx\nExRgBvqOS2G/pS08Crs1mJCRy20siOFsa8Phmh5oyNu9c6t5G1lW9zW+ImhJ\np+vOS3+2KBtfwPmEkPZgZSjaP76tJ5j3JCQi2S43KH/kGZKWZSkc6nLhQWEX\nrwl5P8wo0pBPzuEqQpNHYLDqkeE+j0yKZJtPb622Y+Um5+W0E2uqFYYQ0ild\nx8Xkp7ctgB6dW25mnTYGRa3gjbMyCHATvaDBD4yk+MRYigFj53UJbss3Hi7r\nASgNDJ3RYQXh2ZIv6Q9WS/TNO9Pf6oiQQZSLcchWUPscWj0KBplcJ9/NOE3A\n/o4ZY6r2eTmiFGuISvymbRSeGgnS1wq3PKqMkvLlkX7JtU45a6mPJZV0TH5z\neqbNBkXsJtagX+HuOoH7UFYIgV/imF8ySruLXhtMBmi2a2OKMrtNWAfd78Fz\ndGJRcK9ZFLoW9ekOagwX4uQC/Ws5Q9KAeIytc5lju9Gu0nXiOarleMMRwo9G\nXp9rCqcS8RxmPfRwTwkCznGTtrjo11kkPt3nhlgfo+RsFhugIlykWb+whUEr\nLL4ldg+jQ2i8HvmLNo/ZUm6vHm5n95tig6bgwjHXpbB4zqKWxBIXBmceMzAQ\ne0zx\r\n=gNWH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFovoejgnSV2GllL63yaiO5rVnTkSubdvht2XtTxkbnVAiEAvW7Wl32P+XV8Hyltk2ckZeUsnlUyWY9oxqkRBREiH8Q="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0138863c.0_1615487841749_0.2468547336785094"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.926f5bad.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.926f5bad.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.926f5bad.0","@material/mwc-textfield":"0.21.0-canary.926f5bad.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"516a00bc24de904c4782b3d5f4f0d285b7fd1d3c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516a00bc24de904c4782b3d5f4f0d285b7fd1d3c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516a00bc24de904c4782b3d5f4f0d285b7fd1d3c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516a00bc24de904c4782b3d5f4f0d285b7fd1d3c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516a00bc24de904c4782b3d5f4f0d285b7fd1d3c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516a00bc24de904c4782b3d5f4f0d285b7fd1d3c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516a00bc24de904c4782b3d5f4f0d285b7fd1d3c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.926f5bad.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-GXkvURM8j/4VF/Ag9qP2xKPd7zso4EAhU3NFhwSDdOTTMcARX+/bSsb+ryuj8LmnrM30y1bhObSIB6U6wwpFQA==","shasum":"8b7cbf16ef3ef253758d754fc93524af796ad4bf","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.926f5bad.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSns9CRA9TVsSAnZWagAAv0EP/28DyFIlvhrM4jTxzmht\nM1nN78O9Lb1XSRpx2p6+1ooznm7tW68sWziVaY+izQEs+oAv4Hlsemm1N0AM\nsPYbDf5pMmSNXr1FmQK24YGIdcgTP4/0NAnUbd7V7INinhW2NcjLA3rRElRk\nGYG3zrcwqf4uoeLYF6XT9HtwbfZ7hkgjuq4E3lbm6QUibG1G61NzDINWjVwC\n3ELoWlGKDf4Ndy/cUI04JNMkQsfMngFphlbtOBqTdcaVUhmgWha1PDJjGcHk\nODL2gr16unX388+WKtLhYXnVf4k/ix4TcCzENwM+bID+jvJKxQ0F7wwHxopL\n/z96XPVgZTpWSM2k8sHKnqzN9oAZxh/syLe1CPD0Ie4rvktGwB+kPCvRc7P1\nzxKN2P4RWbZTjnt/vdG72UA6DEQ1DwnGC7RwvU5r8jEv2mYPiwK/tdxPm9ko\nKQcJRtwncyB81LMLMzdM5kKHE2RJaJ48KKdHYf1QsZ2mt9oIVa0XoY74Fr9z\n2WjHlwGD9iDfJ2yoRvFeOUG81whMjr4SBra7BSFGOVy0F/g8QjSulNCn0eJI\nhLfucE3k3VYBsnAxE1Xr3R+c7JjIaP/0spki3gXKdOvZmBjjVxcOennWU07I\n/jPXUukcuXuk4iHfylMG9l5MsvSAMCW5uP332Jnhpxlp5qU/opELmm+DnJc9\nb7QJ\r\n=EeBS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG2CGv3BFbMR/r+f9nkktF3rzrT+qK8i0Nr4HtWRw4e8AiEA5wuaYpks0geRe0Fq+CF8HfLaIWi093vhdf76+uDQUcc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.926f5bad.0_1615493949342_0.5118088750416541"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.520290a9.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.520290a9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.520290a9.0","@material/mwc-textfield":"0.21.0-canary.520290a9.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"9817154a83b0101256b341e18843332e354f6c08","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9817154a83b0101256b341e18843332e354f6c08/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9817154a83b0101256b341e18843332e354f6c08/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9817154a83b0101256b341e18843332e354f6c08/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9817154a83b0101256b341e18843332e354f6c08/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9817154a83b0101256b341e18843332e354f6c08/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9817154a83b0101256b341e18843332e354f6c08/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.520290a9.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-h9SeypS9r24zGnsleymJ74ITqX9Plc5R5+Tb54mHYbYi3x6AGLVQnwBJWvKFPfOU4Ve9tRfysMaoELfcKXHUBA==","shasum":"8be015b746ecc1c220ae430312b9f77d10b9ac8e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.520290a9.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSpmGCRA9TVsSAnZWagAAv6oP/AxwskyBqgbL4U1/L6B2\ncy6QIWmqxOeKH+1uu3uec4Az8nF9FseDUzbvzr5B+uS4gFHRQT+8TEBbrz2h\n+BHY2tyWfaOPCH9nOx8yzVXjjK0lbI02gQxjnGYG9XoPE67WujDA2hSpr/L3\nfBthBsY0o68vBKQPxCUxsIwewv2oceiP3BguMTfgFBt3eDbL5M50N2xWoITr\ntncTxeEKDRi6QVs4UxR0VhU5EYT3fBSLemAl3doE3sOOba37+PUUU52g7An0\n5yKCNi55n0GpxNXgiDfQ6sKsYtNsrWYrt6AWM0TipCXH3kGyWvGTEiLW3grk\nurj+BZkvXK84sMrGU5mxbNqcL33NJdZlMeIGPRRBXrf9s5CGKkQuLcorTeq2\nEbeLbxeS2oQqy6A9mbVAz+FIaETzNDDu01Po7MBPpRxwQrPI6CqIvyYCG/Qd\n8nEwOP1IJLaR0bczAuSOlTvTr4D5HWy82Tf/OYEJkGZ0yOx9NNuARYBVErsp\nlPQst47pe+cmdtbvA6EjZBLCALRJklIJWU+up+uVhPYjdPEhm7DKhd/YbC97\nTsw/V9FX4nCBRwrI91VqGPEecDHomgJIEwxcBJeuzbgq6bDmVmSRwDzuoJp0\ngxfwPAN4IPkoye0w7GVhwS2XnPATvDmr7dplYMgAAB/mSYRDKSGMfsvJefZk\nJ6Ex\r\n=5RON\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDboxNPVmg8mnkhdO9jqJ4IxY6PPvFCmil4eH3+Mv4kQgIhAPg2+9xE36HJmJQVykVrod/gTWNk7RG3v4RL96uPN0pY"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.520290a9.0_1615501701848_0.3725998335471987"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.9ec431d1.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.9ec431d1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.9ec431d1.0","@material/mwc-textfield":"0.21.0-canary.9ec431d1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d7159bb385f7dc7e6077615de2e9bd441747fdc2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7159bb385f7dc7e6077615de2e9bd441747fdc2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7159bb385f7dc7e6077615de2e9bd441747fdc2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7159bb385f7dc7e6077615de2e9bd441747fdc2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7159bb385f7dc7e6077615de2e9bd441747fdc2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7159bb385f7dc7e6077615de2e9bd441747fdc2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7159bb385f7dc7e6077615de2e9bd441747fdc2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.9ec431d1.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-rauI7hbeBrl/1x++eSSlC+vntUlJ7dUsPqYEmHxL7k7xPioJgYKabyQafYQU/4eHN4qDrk3pIwAbQ+MFcEnlvA==","shasum":"9fa7df2e0f18a6e7e4c822317d8c9da12521d7d1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.9ec431d1.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSpqVCRA9TVsSAnZWagAAc1UP/2WUcySvk7XqVdizVXA/\n4NfbmMIPhPwGyPRaLeU4d8k2PiUAiG9PeRMavj5qLQsnD9Y+uG7OoESBYun9\nTTnVP6l5MbgKaV+MjktLVMgcuk6rx3bJQzNEHjWTviOJuVP6g7y0D45DYhMm\nDnE7swmrcRFOgz0DaDhKOBNJI2FiFJHe5YJ77E+pRE/1K+0SyB0hD9WKV59f\nU1mYiI8hJQ741ytt7fILZ6rsHgTMwDF1a+KCrjwAKruF1iVIsC/q40BNp+AG\nOtd85FY6Wbx4r3unFnnJXQwCW1SBYYzPPmzNJnDOPqDoHWX3ZhULhHpsl66I\nUbuxsqwAWIZCq0muizv3Eu6x09+KSNz9sASlsk52gPGT9w/EdMVpo6e0ZVbf\nsUtSoZ+U8rXe1MqXwPBCa7pq1fUtXYHUhNzc6wu1r3Qbuqqoyy2JEyjVuzgx\nSwkBajuZe/nRbVY3+Kk3uRlOSbT+tIFV9aLVSYe9ziEvFKES6feGbIcTOnVy\nreUzND2ALR4AZ4lR4bycGL4ugza5PrzRJoFuvIa6ThzMX9SBfkpYXh3YdxiD\n8WpEdIQM28AG+1gEGDr1i/RtaZBbOuIQtiM0h773Zc8pyhn581Z1SELcUtan\nBdHVmjLWGavZx5XAUz2HNkxVAHZPn77q8s2JBNLL8fH5vIiUDwzZkgOqGgMj\ncJtP\r\n=DPOy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7yyUgrkxXO4lW3hRhZH+a2BtuASHUdIlR/VcGdX62agIgCYRwTth8ItW8mg5vsKAPM+45B37av4nO0r5R3SrMrVk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.9ec431d1.0_1615501972554_0.42562174256790186"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.4246c082.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.4246c082.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.4246c082.0","@material/mwc-textfield":"0.21.0-canary.4246c082.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"571cad0df3b7d77ca4f17d7248d6115fb50b756b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/571cad0df3b7d77ca4f17d7248d6115fb50b756b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/571cad0df3b7d77ca4f17d7248d6115fb50b756b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/571cad0df3b7d77ca4f17d7248d6115fb50b756b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/571cad0df3b7d77ca4f17d7248d6115fb50b756b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/571cad0df3b7d77ca4f17d7248d6115fb50b756b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/571cad0df3b7d77ca4f17d7248d6115fb50b756b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.4246c082.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-LAV+e77Gva0t/caS91gy35Hl1+U+b9F66DFcqWJ75vV/8Ot7hqmi7qnuA7EOZSgT6U5W1bdXKvuViZ/vTdRWjQ==","shasum":"f433c02ade6fbe963d4ac08b76a49e7fb8f81846","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.4246c082.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSpwyCRA9TVsSAnZWagAA/P0P/1ABEZBjnzLEs5/qsXsG\nGCYk3REWa4KxRFVYpS6o5mnPxY3OgVBJwbSt71YyBxg33fQ2guFWEnaoDTwv\nHyNqno7qgOV4b+R7pC/laBEHsEKojl2j7UXg7N7a2Kgy3rR0STTef9DHz9w9\n9jZgFcqb6tPdXxYcXM5kU0GwZthvTh39IOHwaUKSL+eQyeQ3pmC6TV0gfo9N\neOna3HkIkx0R+IfpqSR0uqxyQyw79OaooJaiewibcU1nlJCdpjed3xoqDx3l\nUDUrcuvkBy8JuY45j4yWrKtq5M8aTPhhBmgJ4Icnn8v/OqRy3E1zu3Ah9TR5\nFNmmgrZ2q0yt1s5MIvDfOz2k6szWiHqP6qxVh/urnTar+L2AxgyDcWDkaqWx\nYERjnysxaP+IX9cn9KCod4tTzTmiSQ4Z+xdQ97gmcoU801g6Vvf7Fume99fF\n7nsDS2sXL9qY3rsK7BY8BLmfZBhSbuFyVTSVf+1FCsIaoY1/lQg6N9gfmSMd\n0udTqH6N/678wSUIjtOJjQ5nOo4vYvEgR9M5OM8iiiq+7PLO8l5uduDsnaIX\ntCoUZ0FS+Y5s4ehc8SZ2QtsCHP4r9hV/k8qDeK8qhx8/pcGiscAA65Xc2xoF\nyurXWXumaO3o1P1g7zclQPLOQ3te4+fNQRY1isPdEpf/VnJyZRC2gZAJhSbX\nZ/D3\r\n=5fRV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhOjbV5hG+dq6YJLT3hjhqancOrwsSmIcDy4K7JVx/FwIgM4vCcsk0elEbPtMy8NyOyiqvyE8+rb4Uy5AK2QgSv+U="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.4246c082.0_1615502386458_0.8961031106622885"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.2d736253.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.2d736253.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.2d736253.0","@material/mwc-textfield":"0.21.0-canary.2d736253.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"4d8c53039218a8da7cc5199162317802bf01f7a6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d8c53039218a8da7cc5199162317802bf01f7a6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d8c53039218a8da7cc5199162317802bf01f7a6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d8c53039218a8da7cc5199162317802bf01f7a6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d8c53039218a8da7cc5199162317802bf01f7a6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d8c53039218a8da7cc5199162317802bf01f7a6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d8c53039218a8da7cc5199162317802bf01f7a6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.2d736253.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-viQ/jRYwvoIJP6rt0sZ7WpyE7pL8Oc+XsQiDIqx59G3xdE5VPuBaPnSOk9QfIps2shETvvR73TmUPTcwoybJxQ==","shasum":"ac65a9c5bf118b0ae21bd97003a76971a085ac79","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.2d736253.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT+FjCRA9TVsSAnZWagAA1wkQAI/Tw3FprK2oLXR8lGns\niQYJQZYSvPGhGiX+ZbAmE+el1AOEM+PBK9g4Zc2QLImC5J4nhiUAoelIO4i3\nqI3BWSCRzO9X1JxqRAql3ijqEx7lemC7PAZJhKwT7TL155lznbgw6YLwQ5hW\nOYP5ZCtY14ckNJfNQ/b6lIm8rCm5qF7TvHdbJ4j7JmRC7TL9YTKr5Vkq5pq1\n995MPfmADVa5XgEjds8mphzPCiAR4FUDmMa57c0bXjVdM3gZGPrZayyHRt0O\nHIU7hNsHh9QBEmSVGQ2GWKWPjkzZW6R094TsUWnN7FjddQvzrjk+S03fv53U\n+M1IwzEx5+pHpw4tzupt11T3TLJW4rq2msPW3wjqfPMdZ8qKNAPjv4xmiIaZ\nVqJaO/88Y66bEOdcTKsYbXaBCyOQ2JfiScfI7x7jgG6kPIlNoa39qBz5QLIk\ntcdU22ws/th78RbhpCKyu4K81a8Ltf2agqqf5nROVaMRMCAF8yySUcd4GIw0\nsreRgfL/BQdulAadiq4SR2PAVOrgPmNIavQdOi6ilcKIyZFD+FOxsCfYr/Y2\nenD3pW6wTOvu1MLD4soskJIm+n67All9setX1FCSdGJo75jT05E0Axj6cw1Q\nULsakzDw2Uw70NsJ1ANSpdkOjCf2ob0T8Ab3iG8S2nx8e4YLSTCaU+zJjPin\nv5hu\r\n=9NUd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDopfb7P0Qr57k4SB/2I0yfgxPZGb47IOKSrkEwoqczGgIgHMc5t6+t8fjjgf31sZ7tLLLL/1NChPS9RoVfRDiBZmo="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.2d736253.0_1615847779222_0.6834872665204845"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.7033124d.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.7033124d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.7033124d.0","@material/mwc-textfield":"0.21.0-canary.7033124d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"7797af96dedeb3641f0889f0ae67bc02a1ff2332","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7797af96dedeb3641f0889f0ae67bc02a1ff2332/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7797af96dedeb3641f0889f0ae67bc02a1ff2332/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7797af96dedeb3641f0889f0ae67bc02a1ff2332/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7797af96dedeb3641f0889f0ae67bc02a1ff2332/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7797af96dedeb3641f0889f0ae67bc02a1ff2332/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7797af96dedeb3641f0889f0ae67bc02a1ff2332/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.7033124d.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-NkZaVTMfhXpK+0JkeOiy5SJkdfiYwvhuz3KsPI6BHW9W32bNwZpIN6sHmLdv3AfC+pxl2BWRum3V0BTRKt++lw==","shasum":"bf5e7d8100173bf9aa0cd3d61affe9e96c941273","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.7033124d.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUPsPCRA9TVsSAnZWagAAZNoP/0K+EdM/ts6bFzSILmj6\nLvURo7HEh29QPucgko0Z3xyYwq2F+5Y17hwk9ePxjulVqZU90ewgr409HeN/\nJsK7A5Qd4/OVSrI6SCV1woi7z1qfaPh1+tkZQ/U/uwzj19shhKimQBIOpqX7\nQpm11qJjHuwfA54ygNxyDIW8sI0U9A70/QyPWrKrnCuLgzHoY8+Mj5VM5DKW\nd95aJr9dzkJcrb51uB2VMoRc0VZMY8dQ5PgAwW9bwlsh3Z1+0e3csI+2fzOu\ncdM8pow/76Z4NW4FBOi4bB7XEFVnMs/PhQodSbt0j44CuN06P4aorNQx4ZDj\np/Hg7+koj0qjBNtGWFLKE69hGGRIJrpMdwBI0BSbbahozCva9SKMGyGnay2j\nl11ycvAF++tEdUgI05x7p2YK5AuqNNj6Dm+4LQ+/Fh5sv4B4gJGkjUpWEaGG\n34k9xC3eLKgsQEvvo7AiixCYJYS//B4MPQGSPcXHc0QheN7hEMAA882hNsfX\nMaDp187A0smiPB6bxQO83rPe/TDElBfk5yV4kO02D4JfqTvJI1ZZumnraj/S\ndquWLUokNtEijerLDXjHY99v7FWFqktrQo0Gevln99ARIkewKheJshEjRygs\nTKqAD+OKcvJ8lHJSjoqDqMpspqA6PldKwqXez9ncoWEYN5ld7NsPqxXR3KFC\n3q+A\r\n=VERv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzGLWnABoTNv5W0htdbVMTynx1kF+xtpYhqFYXLPnDpgIhAJArXdAVJZtgk6lT+gTusejOgYjchn0eL/CDygNBr02J"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.7033124d.0_1615919887131_0.0785981280343242"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.6c0ee901.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.6c0ee901.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.6c0ee901.0","@material/mwc-textfield":"0.21.0-canary.6c0ee901.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d7894da96b1452ae771bb3096b993e3f51ce8adc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7894da96b1452ae771bb3096b993e3f51ce8adc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7894da96b1452ae771bb3096b993e3f51ce8adc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7894da96b1452ae771bb3096b993e3f51ce8adc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7894da96b1452ae771bb3096b993e3f51ce8adc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7894da96b1452ae771bb3096b993e3f51ce8adc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d7894da96b1452ae771bb3096b993e3f51ce8adc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.6c0ee901.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-QvEhwqEe6/PyXoovCB8JOwDerrhILM92Mlz3e9XAQesyRaZnUAZy87vWENMnRCtJtGoRjwI0h+1lO5WIMh4OlA==","shasum":"cbab62c0c18108d6d704dc75ea47f0408312c795","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.6c0ee901.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUTOmCRA9TVsSAnZWagAAtccP/jcryH4dJx2kvWKfDekL\neKwGEATQ7eDL3ABYeJBAtIeOqhKBU5Q/TkwWBk6lezUir6iuwZBWSP0f8ZLU\nVG8SZKtgghH1Um2X3rClxRc9C/XKqIJ2cPO/7KNMbDbJ98BMpbDn2Rnw1IxR\ntjumwQl1VAQL9axRhulZIPe+bUHBghBYyb5RLwsyEVfY8QtkfMaZ0SR+sCVF\nqSkVfv6c0qorbyUgF+5nDTbOvRvcLYykb1gYDpPtIMNk7QyhIfY7SMaSAmjb\nUI88I6OzJH/ySdymeRSsA7xRV7HobRKsIGR9CX0VWLbzwa6RFMJfep+KEa32\nah5hiQWoJo9PNZn+Ad4uv4hwtRJ7Lwy5FWcRpxc9JykWOcKCgctMP0VBd3e6\n6hmjCEr6W+tfrAyBmJBMsMCfjuE5Woi5H5HTsbb840kVdlTQFMNUwGEQClG3\nI1LzhuW0XT8HommYRQi1G1C2Jy6tmUTREioy2KaRVI3joF9hp3QFsyARzEec\nqYfiCxE7pvsvuzIf1ihZ4i/wjBt2aC+GdNNtW2XIeg70VKi8D++gAee1jej9\nx5VP3fZa8ysXOR76TEIuNEtJY9lZn32wzyzcd3WSQbdHgaXf8rB2HcX/OOli\nKaX6we7kzSYZleXUii2BUxwhMxOn10ICrDyXOq0OuZMFH6fnUjzGR0uLc/Ui\n0stW\r\n=VJt+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuBZh9zolXAgeywFqGH29i1YapNPfisw8tChIjac1NGQIhAKVJfS77p9ivkCQKbWUMc8/gI2Ukh60TrEZpECAogEee"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.6c0ee901.0_1615934374219_0.30841492858151254"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.7f0d605e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.7f0d605e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.7f0d605e.0","@material/mwc-textfield":"0.21.0-canary.7f0d605e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"77ccd00da9f68d22de2494a2aa4f35b0da375669","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/77ccd00da9f68d22de2494a2aa4f35b0da375669/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/77ccd00da9f68d22de2494a2aa4f35b0da375669/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/77ccd00da9f68d22de2494a2aa4f35b0da375669/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/77ccd00da9f68d22de2494a2aa4f35b0da375669/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/77ccd00da9f68d22de2494a2aa4f35b0da375669/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/77ccd00da9f68d22de2494a2aa4f35b0da375669/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.7f0d605e.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-jTEJ7Kh3SvfYMLnjy2cvfevfWTkmtQHKfUSJg0lOGeaq4uFPmrmUZ/sj55kVdMbofpM/enOMGqkOFJb/8XWkfA==","shasum":"eeaa4eb1b09b2cac93dac8fe8492627bcb5debd7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.7f0d605e.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUkTXCRA9TVsSAnZWagAAYZ4P/0+DuiTEZCnOUsxovX2C\ndZCE4jih0hfP3ms2RkPhmfHRbqxuyrNRDXBI0iyNJdbD5G67cFshOHcWfIoJ\n8kaP8Cye6EvXEZgzFxzm8btIE0oIfLN6HuEPVxDhcRs2Yb2M/XMuXKEuoFbl\n7013RioL+boP+G5Y/rD1DwmsIwgB8Ea3dXMMl/r2jcKfNqWoWw2vr7gIPjgM\n0Hlu82nVyyrLPydBGBmHOSFPAF2RY1WhtPzD/RAdKz61vS0Hze9PqQPLJ61y\nZuNQxZdkxoBP/HnHQU6Gts27BnSpSVGpVPd0Gf2EcMgXh6hFg5O/MnFarULb\nX/ly6OigbCieswXoucIyJrENhLrfhlaOy+Tv1vqvFvFxRGk4WRGIzHxvZpW2\n969j57eiBtRgm8AX2qi47zAzu6iU9zZCgVk46OQQ6r+icLwXcckDl99OTrBg\nYJYyBjgwkblldknalVzwf9T+GmClh98yJ596O70zeJMRIIDZA+g/Dh9xNNbg\n9Uz1rWZIl55OH42PlfEPR2vVpB+F72IOYx/SGK58+VpRUdsgC7fB4TetotqP\nQuUVk4wyTIJHKpV2H+fjaEhHHT6EmWwaX8kPmySNnu4ixMcmu9aZNdo5oCgT\nTUwRWqDbGPoubpUaqwNa6Xd0mnFB84WOscjAPv4g1PDMmRJp9actyVstKbZ3\n9I44\r\n=MaTd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+CKxWMQHOvmR7wjoBO6i1j5j6GKrhr7p2jwODBIxYWAIhAOd5H7CPwO2V2oxEwmWTykNfJLzqmicq3VNvQ2yA+mpj"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.7f0d605e.0_1616004311407_0.2055718852448316"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.572107b5.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.572107b5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.572107b5.0","@material/mwc-textfield":"0.21.0-canary.572107b5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"9399ecfdfc3b2f0153e16b3970555c1351c9ea81","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9399ecfdfc3b2f0153e16b3970555c1351c9ea81/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9399ecfdfc3b2f0153e16b3970555c1351c9ea81/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9399ecfdfc3b2f0153e16b3970555c1351c9ea81/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9399ecfdfc3b2f0153e16b3970555c1351c9ea81/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9399ecfdfc3b2f0153e16b3970555c1351c9ea81/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9399ecfdfc3b2f0153e16b3970555c1351c9ea81/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.572107b5.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-4QWkUtR8OeQQo/CZpdmAZbcKcYT+serpNSc1xV44ot4fDNnpu13/kvyGekFOIrCk7Jm9AFkb8eccalOSEVmS4Q==","shasum":"661ef445a79eab974b4c141d8173f75c8dce40ce","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.572107b5.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU+hCCRA9TVsSAnZWagAAkm8P/RD2/5oNV8M/X9TeXXhV\nHo5tY61SD6AYCx6/AeROx3d3EENKqEtfcR8NdRg3vZ6rfjtP6eHn5qFftge+\nbcCXHQ2M/S7bDuVnNWzid0TO6aI5R08zm/+Os3fyaTAar80DpJD/ERHyh4SX\ntM0yi+6q/6mtELtFJMpQChiMU9V9x67mPpeKF0vPFp8bhsRUidqOG/eAZKR+\nmd8Mvs+KXjnz6yQCt4jMSQp3hQ5bdb3WCXU0eSPfF+A4I9nZmQObhpdLGUHY\neHBka2ofoaRBN9qgsOfrSAMySCPRyM2/5GSs4WXasLjCVdfaRfdHPmW7sb8h\nVub2fMkr5nJ+b5vjgM8MNFehyGx3NK8TUOyj7X8DMrCACaNy0rrfv6JUc5nr\n0wJ1+z8exDdlNelCPMhDZr2kaOQg5oaX1xDDlhjMNcxjtNf2QST1HbWHVp17\ndcN9j4EBz1hN7bx9hZ82f7RvM8Yq5RmACHY8n7VsxnwORqBYywg8QaPXli1g\nmSv0zC0bvfEz4ISi2a2gYxRQRDVh42JeQHCIQBCRFvHGAfDMiAHHXCUhCrHQ\nMbcKdv7jjAF5wJzzc8fuN2FVkX4CPmqghhO7pLOLmJ6IHtRoZvTcLDAzGAHs\nrjGFkk/WyPGqOotrg/9YLGZ2NivCukYQysJjDocLNF/NcS+vdufHGwaXACkt\njtig\r\n=fjfK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDi0l1X5OyT3PHcCdS73/7OqxsUTSd1YLhfo74m4HFAAiEApHE5kKQju0D+9GyL6HtvBLcfZRfZNwDiQUhTbN/k/Pg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.572107b5.0_1616111681786_0.5764708193841661"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b7b220b1.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b7b220b1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b7b220b1.0","@material/mwc-textfield":"0.21.0-canary.b7b220b1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"23f87dc3afa9f7b0599f9673a9f27f15d9751f3a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23f87dc3afa9f7b0599f9673a9f27f15d9751f3a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23f87dc3afa9f7b0599f9673a9f27f15d9751f3a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23f87dc3afa9f7b0599f9673a9f27f15d9751f3a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23f87dc3afa9f7b0599f9673a9f27f15d9751f3a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23f87dc3afa9f7b0599f9673a9f27f15d9751f3a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/23f87dc3afa9f7b0599f9673a9f27f15d9751f3a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b7b220b1.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-zobA9gVWkgWcU+gkghhA/BntHnHeg7v5rX3nERePu80Ho5ngv7y5rNTohKpbTXEACkqFJSEhPGxLkxyZWo/6sw==","shasum":"5eee150e7590a0d05d518987442c680e9ec59ca5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b7b220b1.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU+5QCRA9TVsSAnZWagAAOHkP/ApCaKaPHw5ETj8wYwEA\n41P2LHbpx0i2tN8mjCsmpYJL53EKs9k1YQoCsZHyKBVbD3G1gkaWCMrZzdBm\nEfO6kImlLFjFsS4L/lj0UWL2clRLrO/2IQfsEP3EYiQvNiY58xk0H2oQyK96\nqUHhRJBIWpyxNi1xIf8oWG9yFBxGUaMqrpQIkq1QBcfHPjLkPbGTVOxPMnMT\nr0RzEohv78Iv0bfHGch0j+xQ6s4kFu7x7kKxQJdgTeCqz4WLlKgV3HOeqrVs\nhnCXlHPf6ka2SwnY0w2MfmUlXutwPAktMRTDitdr/AK4goqADn2UMrW24ENl\nQMvrJVpTVqJTHe+70205WChY9P6rc2nk5Tz2OiUbp1uKqNZkdPxAv7AfZqn5\nZWWAk+g2C5hbDyVIjjHC1kyIcXdFSThZm7azscx+0n93KTbIIFg0JzrWqzGM\nNlnvlp1CdCcKPf8IJ/Wef4oa3uZe6n9QkB/RqFIubTp034I6UHPDoBGRAg5N\n3Mpz8Gcu2rXe0u10XHNTA/yzwLb4Dc6kD+ZikXlIkumX9jZTLpRe7eD9Y/+I\nMesFPpAUsKdycNqix9sYV4gPXHCTiEJD0hcIocQg6zJbyKF5LmhskvzzzxPR\nY49WiNNNun5G0Ym91VVSASDrfHwSfg+6IhDlhdmevjJFLB4FGxsz0f6juMi/\ny6YV\r\n=KUN2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBe+iyEuB97SHxCAzn2vo/9b7WfqE/bRppJFvN7GqkZtAiEA1kf6CpA+gbrq5UXPqzNUlMh41aEuQe1io1SflhgJOlA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b7b220b1.0_1616113231976_0.6405830967674215"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.233b2de7.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.233b2de7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.233b2de7.0","@material/mwc-textfield":"0.21.0-canary.233b2de7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"6887e9dd977fe57d5199416b097952ea056e78c6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6887e9dd977fe57d5199416b097952ea056e78c6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6887e9dd977fe57d5199416b097952ea056e78c6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6887e9dd977fe57d5199416b097952ea056e78c6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6887e9dd977fe57d5199416b097952ea056e78c6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6887e9dd977fe57d5199416b097952ea056e78c6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6887e9dd977fe57d5199416b097952ea056e78c6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.233b2de7.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-DkEOJFx6UUnj08IyujHnjwApTmTTIApWwdIxNHZ1rSj+eLGuClpow0hFsed3zdAk/UURB/xnkNmY/CRx3xrk9w==","shasum":"9a4c6a4dd06e3f99753338886e5680c3a9317cb2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.233b2de7.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVO3KCRA9TVsSAnZWagAAfbEP/2eIP57zKz1vUzV3C60N\nhZhACu+yAVMjTSEtgMKGAJGdnl7L1GjQZoalTvJKcrTgLtbqo8raxH755r18\nhtu2r8pi/CD8Ta77YZ0mBZKAfNvRcUbsUzXUdsrUM/NoDyC9L8tNKx4hhfAF\nRbkZBkqTInnFsyAIn6aJ10KcxJfKJi2mW795JeXzq0c1UQjxOyewyLKe6Uw8\nWL0Az0yXGnW1IqRjlJ16JlOD/5x8Vk/wPR8iFlg/WrZcbgZUmIcDfonmUs5D\n6xisog5alQWkuagQXP1NrLzqtvuW04myjhmfrpD3Ocjqgk90/AvrzV3KPFyA\nIw0F/gRED6+Bdp6Sk9M9j4sx2BvNy+Fm25SKC1sTnix4cGStu1D1IHZyfmDu\nJNgGhpF3aeLLgyOutTGkY/iznPcAAVH3h7DFYOAV5zzFRnOHAiKdGfj2Fm39\nEmOdom/cKmjlgQkPM35tuhvQenZTPErLBkz+xOVSykmlMt2egITTBs/VyjXd\nnTlAD0+VhSd/I6NJFlNDf4Kd7ZfSlPHomitQYSqHQ+xQPWzqDRLLs5LJsgtR\nn4+awAcL7C66hYlL38ky7qbscP8R1U10z2XvQo78IHY/OGWtUtYJsrttfblT\nk9xdAyNzEJ1AO20zLiAfuqYIKFKsJ2dnzBgTvQ5gvAoMzAL8tYCdtgZ9sTSE\ntRQg\r\n=0Csz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvp1kAeACwOuG5SlU0IGUZVadX/mv1hcVKkyd60oAQRAiEAt1Xi3P+jCv4/OWJsbIAIG3sWsEE4Ov6aMbmOfCvEWQ4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.233b2de7.0_1616178633718_0.7932512923093444"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0c1a2d97.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0c1a2d97.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0c1a2d97.0","@material/mwc-textfield":"0.21.0-canary.0c1a2d97.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d341fb857369610d763723d28d8c9955cc461de4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d341fb857369610d763723d28d8c9955cc461de4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d341fb857369610d763723d28d8c9955cc461de4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d341fb857369610d763723d28d8c9955cc461de4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d341fb857369610d763723d28d8c9955cc461de4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d341fb857369610d763723d28d8c9955cc461de4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d341fb857369610d763723d28d8c9955cc461de4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0c1a2d97.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-6wD1sc2xjC7AVIotS65tOQh6reP1ZdbF8yQ1Za3zsQTtIxTf2ALq/8i9r1vuDsFPR6WZYzgj9ZzH4QTSWASdLg==","shasum":"a7c598f4e8487ee05b5c166375e883899374a8b9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0c1a2d97.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVRXsCRA9TVsSAnZWagAA8qUP/0WHj112NuPGr7hW7NYQ\naOsKu3F7IRH5Mt4ORNa6VwobTZlZuFBnFy7+DTCWiOPmRGwT9IxitJf7+1y9\neqIXOxqWrJdn/AgGh9loOXnsJSQ+OuEkVMvxjEchiUzrMrKdHwJIWFrzu0en\nT5vS7qNOTIufTVT8p+r8fUsXf0TNLOu6lzLWd4u+dEhnpyYkUvuzQ6MWkLLM\n6MA5caUE2hUFdOL3qtdT9Q50LTnTe8lurLXZmGQM93Y9NQx67Rph9/rXDEsD\nqdkyUbCzadJMgzmiULwWq7vcLPQSvOKnqDTgg+MbGFIdTqhH7QF/CnuwaRM3\nqzg1ATJnqmnJLJftYUJ764lmKRwOAVXWKzB0ydrvpDO4RX44DvOhnbO6+AiC\n20Pd+kHQWWJ2xGvID7kcGT5jWGTODckMXa7cLDKbByDMEPSc/qSnpUoX+uY6\nUKvnA00uwXXprKtMcuxyI4CHyjMFEGiHEPZipZM5+3QIr/YRAt5y49Noa2Do\n3VhnWjK+zQDfNbpVnPmdpEwqIBLeic0h4MWV5Gghg915eyEjOR9gR7SevbIX\nBiRs0O4ym7NxX+wlSVURrSxu7D3dcanSrYv76zI8CjspbLKyln3lSUP4kM7y\nG5yC1t2tiDuXuA392NVbi6lLewhczEU2OT96ub1wGXsoX3ehJB0KKRSrTiIz\nbhJf\r\n=qQTP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIhzJPRryo0oq2HmMwfuAScW9y9o2rtE07i9Ejtl5pSwIgC1QRJ1pQGT7nso+fCarVtITQe6Unu+BcMeWQ5jlgG18="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0c1a2d97.0_1616188907493_0.18091739187021028"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.57ca2e73.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.57ca2e73.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.57ca2e73.0","@material/mwc-textfield":"0.21.0-canary.57ca2e73.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"aa86345a10da02c5166fca78e72e367ebeb95677","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aa86345a10da02c5166fca78e72e367ebeb95677/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aa86345a10da02c5166fca78e72e367ebeb95677/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aa86345a10da02c5166fca78e72e367ebeb95677/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aa86345a10da02c5166fca78e72e367ebeb95677/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aa86345a10da02c5166fca78e72e367ebeb95677/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aa86345a10da02c5166fca78e72e367ebeb95677/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.57ca2e73.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-BlGe7r3Szzn+Q2ZtRSYn5czB7JglK7MKSC+aRcef+6RMnoU1uVzlIxHSnoPYI6TepQa3UEqVDENf/ZK9Gw70GQ==","shasum":"e759bc2904ba4a18c37a4adc434c78a80347359a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.57ca2e73.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVSiOCRA9TVsSAnZWagAA6BMQAIaz5EJGlpdya25wWwIa\n8YoOx1sL3ZWlsBVT8HeLnovyxIUBBFUW3Xp7JB5H/yhKnhwG81tUnz8fUyKS\ne0HELVlmz1EYwHlJdN5weWNexFtidvKf/IxJmMxzpsStCyLfAOwS1JAWA8ab\nOX1qcglqVtsoymkbr48/66W0FudZXVt/ldf+v+rGVBEwYdX3NpHdLG5SWfGL\nqn2NuY5jmcd7GYRrnCf1uyOB4cvr8w5d0fl+gy0yfno6LwTjICMz7iBK2x+5\nKd4dtO2jEHQxyQjkSR7HhHFKmE02POKpD5j9+ZVvmaSd6q1+hbrjycfYt+Vs\nzqMVR5NSrdPgWNrsvmYkRgXgzcVgJHr0bFn9EDg/OV3cwsX5AC6+P6C4tsyf\nKW9ty/GXpW6tWwmk8avb4KyuNA81/fTw2lq/JApdhd0dG7yoJDPncK3RQDtM\ndbQ+0+RuYX4eXeyS5dvPk2Zh3TjPGFN+H/wf/+aGzZJvoGwVQhia3GAzFd2n\nYVBRfYXCzD6M41Ecja3tcvRjB6HJrDMm4oHnO3mPLtZt0gFIPgjmsuXzVmW2\nutLmQ83kW2Di9foNdcleR0YykJc3DBhTrVCPnCxEBCf/vPgo0J0AvcylOC5X\njt/JreKQCgr5g6zUIhnHMxUEIUq8YLty3G3iyc58q83J10btSdyjas8TyauA\nWMdx\r\n=PWuV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFVafIyVgyb6urzvURwYoMb3qjxEZQQEBkE2bZB9Y+yQIgS9Vhj3ONjXym8XkKBdfvteZ0jDF46MwnY71pIaOKRtg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.57ca2e73.0_1616193677993_0.6947945837999476"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.5c058f4b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.5c058f4b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.5c058f4b.0","@material/mwc-textfield":"0.21.0-canary.5c058f4b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"6a50e9efec728fe20024c0ac52645387b1485f08","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a50e9efec728fe20024c0ac52645387b1485f08/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a50e9efec728fe20024c0ac52645387b1485f08/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a50e9efec728fe20024c0ac52645387b1485f08/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a50e9efec728fe20024c0ac52645387b1485f08/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a50e9efec728fe20024c0ac52645387b1485f08/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6a50e9efec728fe20024c0ac52645387b1485f08/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.5c058f4b.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-ejJ0gfbAdq6l1kD942V+8IHB4mbosrOO19kt2jO3toUhj0Id5k88SyQsSWn33uuqjXRbfKiDnxxGU6TNKkZR5g==","shasum":"d99a0af72870cb8e5f402ed27ce93acdb3c80cc2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.5c058f4b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWnUHCRA9TVsSAnZWagAAVagP/iMdpoFdGCbUa667RQEd\nEazAq8TQaYByxTTMDfobo7eNOh8ABmDy9Vi3KTpk7u92+NwfrYsKebI/ywWP\neVAboWG9vIExkI/tHb0kc35hD1290QDDkY1Ry+KIO0pvChLLiCx3U9hQ3ryB\nlESridH/GQPlr/BEAdoqn/LE4+TlOZfbDTqqdtH0aXt+6qpoDfomjSzbiYcD\nr5iodi6DtScMZbEyAhvrEEsuTgITg7xfhIFk+nCyoGVyFocYHh6c9uiLu/iJ\nKGzEa3AZxRx/OPM9c7gyrpxlkTOdZJeLcv3StlzqvvO5DgBmoz8Naokgg2WJ\nPdPItUJ+hhiIXN+Zwcj+tyrcQaJ3ZybyZyG9JNrkIBqdGYHFm6m0aa9JOb1J\nJezhlYTzswoRbHtmC53QALxJDxIQ1ts1HSP6GMS9j5/7/msnZk32aGh9T8qb\nefzqha0oKhdnNQKuA1McreW+2LRLYXpp+roE+3HS2u9lCQXHnWRayq/ss3Bn\nnM+qQZiQIAdO4J6bAOkugjEQos3npYZsugwy98atqPqTTTWgmSMkOMlocnIc\nb+GARQjgqS/eafBvQhcwRDGaiYNib0XgL57avawwUqbrJ5guqLSLpWPi61qo\npvirEZ01znAQfy89dOUxmSRplUilfE3xM1E5WWRl9nTrorH1U/kym6RNijyU\nsGIp\r\n=NCvw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdmnGZEu6F5CWvQ8eSNiDdosegDj45GIhz0iEX3JiYywIgeSFjDXCi0YWgEWXtbslPgTbPz05oPBzFA633weE9D3o="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.5c058f4b.0_1616540934702_0.17766249275784873"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.e27ef7cd.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.e27ef7cd.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.e27ef7cd.0","@material/mwc-textfield":"0.21.0-canary.e27ef7cd.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"7631d1b220323112ce72141784e75c8356ca0f88","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7631d1b220323112ce72141784e75c8356ca0f88/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7631d1b220323112ce72141784e75c8356ca0f88/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7631d1b220323112ce72141784e75c8356ca0f88/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7631d1b220323112ce72141784e75c8356ca0f88/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7631d1b220323112ce72141784e75c8356ca0f88/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7631d1b220323112ce72141784e75c8356ca0f88/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.e27ef7cd.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-W8ywLOYJ7TdTu+1nzLyg0doFVQ2Q1RxgecdL+8aFjmvavkOH6MJzabwswy0i2NHGIYBSXml08lIokM0YPlr7Yg==","shasum":"510ffcf71c2cb52bf2a686cacb1b9b961b9cfcb8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.e27ef7cd.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY4YFCRA9TVsSAnZWagAAG9MP/1NOWzrd1NFGbKNtLjt/\npl+hcb0aU62ChYtrsaOCSWwAUwiUMHeHpK6BL9wXYQd13kTHq5mE9nELO5Uk\nH1e+NAZxsW/7Evz/Gf5ndLksAhLhvLXbMptG6GQX/lDaszFiWJZM/o7hufc1\nbXMUlvkInukIv8ixnGUqeYQvQCZbyq4t4DRaYc+LHitFLwCHccy3TUWquu5F\nPK0Eaz1/TnmehmHkZXtpqi0pCSbHMdXcgloqCK+RcG94WUiTDhHNL5RqEPKf\nng/F7+G1l8G8UMPE77+N1avwCo5vgHQZp+grpF5MqiKSvkwb43hub5yv4qw6\nVWm4aVZ8NHCggYmr6pkbMmv44ggvt/weu89qjFo5lmwqFHffpr8jfq4XGbWN\nW0VQ7jUJVVcXrlolv+Qnpvuw1AmUs81bM6t47AoRV+DcXGNNwfOif1V7mu0X\n0FLCNuzy7PcMLPM0IhIDKnHclp2fdFKKIkbizb3mi0g5gnd9tcNVbiUCiokd\nfgFtNCx3gw6a59V+oUOZv3Ao2EV9gHFx9HjcaQhLnBUmPRBfratyzQ8JP08T\nwRmtCNmUjaKsVqWMeaBPTUpPdTH1Kqs+L/hO9tQZD2JJqGgz4LRj2780g3vr\nA4HspqWx07a8K8M7zwDETavdtHrYbIwVfPloJxpFGXBERojbKAdnoKuNUlwd\nR3XW\r\n=CtHe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5yOcqj5wCVSs+nJjdQrTmd7VIZEeDiqp/EjFd1VLDhAiBx7W8Eng9jTXliWOCek9Tu4XQMU+cQE6HD6PUuxNCLTw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.e27ef7cd.0_1617135108866_0.8717089112908407"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.15c09e74.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.15c09e74.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.15c09e74.0","@material/mwc-textfield":"0.21.0-canary.15c09e74.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"6f3ebc4bb5f04f139f9cc24061e00f418b04ae88","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6f3ebc4bb5f04f139f9cc24061e00f418b04ae88/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6f3ebc4bb5f04f139f9cc24061e00f418b04ae88/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6f3ebc4bb5f04f139f9cc24061e00f418b04ae88/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6f3ebc4bb5f04f139f9cc24061e00f418b04ae88/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6f3ebc4bb5f04f139f9cc24061e00f418b04ae88/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6f3ebc4bb5f04f139f9cc24061e00f418b04ae88/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.15c09e74.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-QqFMpasCePqkLGPxPUpZlONHO/NZi+Ray/AgMz8jcPXYrnkEH8yyNMJAFrLWXsfKrfhlYr2O5DSR/4vj4ic9oA==","shasum":"0970b995d3eb4081b0621725a347a77c6f4b3fb8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.15c09e74.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZKfMCRA9TVsSAnZWagAAnZMQAIQcl3XjjlYj63DQQGGN\na2QoAXn3hjhNqLm5MtPA8DMgPNIZTgc27cFhOKcxjqZogs7SUx8sxDsmScIX\nLzm8nRYmqqYqWbJ4Eh/xb8WRMGAoKl7TugSD7jWoLRoHLlmgVK1epVETeVSQ\nTwyJkRfoWdU9yPkibZUkeXzXSb4KDkvDhctaoH2aMFOytjKdD12NoLof+yIe\nQPbCL1O8Rd62Dm2NXK4srkX7ONxz/rORCVIDKbqsEwqHuIoHmWIJ2Jygd3rz\n7fINc+Pp45syjR3RnlelFH9AkGZdUsViMCLvK8Elpa0Y5JjF8HUEVWnQMB8s\n7OvQHsfj0eq5Eos7whCXxKpMD0QzI24JmJVika6ZepkEKfffef9XljFlutZ/\nmA3FCUXEuJKfWc7IFD9mCa4k3dVlULbYJCHbTKODeLcrYlIFO/sGJ7irnGKT\n2avBgQVvtJZj2lGYTrb4klwyOC8nr/PGw3iRkkPvmIdvlpGNDhDW1ZEYIJsX\ngsDT8Y0Sfq5VX8VTRvbRNPkCMcgbaq4VKd0uWsCsX9SuFzirTlWgZ2VgzWko\n4m2pSL5Lwt8Xb/FJaWHAWU2xBFHaQ28DlZ5BUbEb2iNTooAi74+41mHT4+Fi\nBFfbjIxQ1tbzh0bxsDzisKh6YyN9gnhbCoAy5Xkyv+wGusTY6qyvJ3Fkk2oz\navzi\r\n=qTTp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTpKibgY01eMquj44QPNr5q3d1e9ONc03ba6cMMs1qtAiAuJBjH6H7t7i902PdzZ7DUri4RrZ9X1YTsrbeQ4PaT+w=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.15c09e74.0_1617209292411_0.206961538078696"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.4dc32be3.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.4dc32be3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.4dc32be3.0","@material/mwc-textfield":"0.21.0-canary.4dc32be3.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"1f71c032815f456f2ddbee58c9b175e65da3c18a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f71c032815f456f2ddbee58c9b175e65da3c18a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f71c032815f456f2ddbee58c9b175e65da3c18a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f71c032815f456f2ddbee58c9b175e65da3c18a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f71c032815f456f2ddbee58c9b175e65da3c18a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f71c032815f456f2ddbee58c9b175e65da3c18a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1f71c032815f456f2ddbee58c9b175e65da3c18a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.4dc32be3.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-7W24SrD+H2SXmEtVDWCdibhwWhda6fXuFv0sDU/S6Vl2kih8J+7UT+NmrCGFRYpjX65omtYO60OFKo2YB/lbKw==","shasum":"a34fe4846ea7a233adfbbbb9c974ce7aa7a36e31","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.4dc32be3.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZQpYCRA9TVsSAnZWagAASgcP/0doBQfST+bG3UDL37Gn\nAbdV2wxTxrjdrjoZB4+oJU72dYaLZFlahD1u+BHSDU06xe2eVJOIrq0Gs4FT\nqFjGZPlVKKD+jaDa4sXxpKJewbW04gKPpJr/Wfm973KecOIl7f4nXAGwkhvl\n33UGvPDtmkpIKcHH8yg4E1vJB+JsTkQP+mVFBkk3EaRy89i+uFvjl/r2WeWJ\njeDXuJ6pakcdbu4frd63awhcbz4lbJ4FhCUvaYmF4XH1qI6n9/kUPR993d0y\nJSVKTE7BAnIzguou9+ePc+/k5jV3pwktBWA1NPgLyRqCUW+IG8Tbr1lj65V/\nolMx53TunCVB9RU6YvNAsVVvQlQLWRWyAUuMTv+plnat5WFUm/MiZAZ2DnSw\n4x/ijI8Es0d0E+BsvU89o3Zwyp45phuubHECf0BKkZle486pzliP/1Ima5nB\nOvsWrTlzV6iLvkoB9S/iroeEuWdyhVQzhRVP0EQTBlhrAx1iqXUDYb72EgTG\nUxdiwol1hLLzXk/+XSLci7OGB9muWsQH2HlAj32ZI2nFzaA3tOZU/cIF86GT\nwtpCCzhi3wld7q7zP9bb9QB0BDxkRnupjUEVlVGcdPl+8732b3srnTKmlyYw\nhBilVb+cbo1kqAB6tGyHcA2fMZ2iyx4JZk1b478w6q9f3fvaq9KtpWw+dGzz\no86U\r\n=TwHD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtnYU4BiCTnIa76GQ/j9sPi2ry67JYR97JUe0YkpsuVAiApXqvRNv7YeeCWYrUCewgxpMAmFPberRqdwXTqB8yzDw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.4dc32be3.0_1617234520438_0.054329616034857864"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.4b717f65.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.4b717f65.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.4b717f65.0","@material/mwc-textfield":"0.21.0-canary.4b717f65.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"a7b21246791a74b1ae4e57975b1f4a394ad9cba4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7b21246791a74b1ae4e57975b1f4a394ad9cba4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7b21246791a74b1ae4e57975b1f4a394ad9cba4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7b21246791a74b1ae4e57975b1f4a394ad9cba4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7b21246791a74b1ae4e57975b1f4a394ad9cba4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7b21246791a74b1ae4e57975b1f4a394ad9cba4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a7b21246791a74b1ae4e57975b1f4a394ad9cba4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.4b717f65.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-QKyQJWlKAiEK7jyDtTIT97YYXOAs7WCW8MSSj1rnRZMtXopEPfNzi6xt7QOKgiJb4E+RjrheMOfHEd37Nxq2Ig==","shasum":"df5f32614d4b1fc973a83f028ac8577edf2870ad","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.4b717f65.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZg2pCRA9TVsSAnZWagAA9kYP/1U4GNHq+i0V9izJBS5s\nTJIY2CeBWkheskvqbvb1LgbKFrAyRZr0bfd+nAZajbDtJwB36r7CG8Rfwahw\n4jCIfiQCOxR2xoauwLAZfChA2IWFcCk9CqD2zr7bz3tzNmmwLWhX1BGou9wz\nJPTINoh2mRKqivP+NrCxPqJb3RtkSR8G0fSeTo++OQp4MMJZQ4w4f+80kMGf\nK6OvjWwSVufJh26nfXo3PRQ5vEsG84T7/aJVQiA0hzMMpGftC2GKrQvX4H04\nUnmcUj4PkB3/pj0liPQwRHM6iiyCSuNbxqg2qhy1ikzZf3ixVjzkpsQyKpaS\nnV5UmdVTZK8HNPzfb4DkqvXG1El3xHNojWPvFfpO7iH/RgztgOZ/z1PwMSvx\nFz0Zt0Cg1Ma20as8SRwEjkRWv4RPHGb7Zs78YNwPHuOB7GBq36e1Adt0QiPa\n08qwmnsDcq/Q2xAO+BeeU5loi0siIEm77s7yAe/AbW9Jwe03jHX3oPO8PP5k\ndFwGvQERPpV1GkVU/SaUU8dM0m9VZakF34sTF3j3s6NDepAtPaAWVWfE1iJA\nXwef4zctp9ei9CHAf6/dQlFMamn/l6ukwN2VReqt8R9Shb/dAF3W4NHHNvMA\noI8FGg4RvvFJytHMpoK8Ua7KzDOIJi3sjKZRuQL8UOT7R7SjBetEtCm+w2gN\n41Zx\r\n=F8/T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQhqScmEX1aAap7ojx9GAgaXc7QB5BSnhL7Byi9BQiswIgcN5Wfkp01lEpll7izQILK1ATu1cgSg6wuFTK3SnvTRI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.4b717f65.0_1617300905220_0.1984441917852644"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.c6870f20.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.c6870f20.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.c6870f20.0","@material/mwc-textfield":"0.21.0-canary.c6870f20.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5808fd48fe9ee3cfe17f631aa6addaaa847cea19","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5808fd48fe9ee3cfe17f631aa6addaaa847cea19/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5808fd48fe9ee3cfe17f631aa6addaaa847cea19/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5808fd48fe9ee3cfe17f631aa6addaaa847cea19/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5808fd48fe9ee3cfe17f631aa6addaaa847cea19/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5808fd48fe9ee3cfe17f631aa6addaaa847cea19/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5808fd48fe9ee3cfe17f631aa6addaaa847cea19/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.c6870f20.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-eKOabxcNitoZdgHM7wMKKF6P8NVxpE215oNuy97OE3UVKIkmzHAsQKDr5o8mwUekXRP/WfO+nsEt9gYiG4/F8g==","shasum":"9572f3f328a0145d7f47842786d3f267ec85f94e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.c6870f20.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZlpnCRA9TVsSAnZWagAAxJMP/jXrOZxbZTUACtbN+uY9\nKkNvM1f3ww87wuwk4GES2XhdU7TTixShjFW2m75/SIUX2XAcWuVZKImZo1og\n2OpgiXVSYE56xs863iO/vEklJY5d838ZVpkcFd6jRhZmjVYtYxOkm6GI4AVC\npM3KtEG3Y5zcy+gEV62T1eiYYTnbXLSKqWBVVbdM3ag+dk7XM2rCIz2GVlzR\nWg3sSAzR6Yv8vCJRkD2i9J5m7NUxQ1DpGY1Dy+CI9y2n6h8c00u+1f0U2JlB\nkbhtk7XmhdzOZD+4xWI/GIGCTL/vXMhKJgv2LGM8/iA5JSaxsszgHOJgf2dc\nLNlqBCkMGPOmhLxKYc6/3uTT/nTwFFDaEYedjvnfgtAWeKTt7kb5bApcyTDO\nIBCZmyRASzvm7TcqYwDwkky2lq0isvvwcYmMJbJKv7GPIf83qDNGoqt5wn2F\njOMOxCDE5yP857ZOOcxZAVmX1ZZHPGZYhyamFND4PzVwCHwzjYgjzhGOpWmz\nD04J3px4FIYth575wM6NeVGSRow5/d/gEuf3fYhbyQcITJVyleCsnNCk8Pga\nKZCR5rZWINrNRpqNF4KQ/By0kuNftP6lm18MTwHkLGnA1jd77byclzZ9lFgS\n5fGqzQl0gl4ICAsGfjia5QKPxcvQUSdaNSS+CMvKJh1MNwoTtUw3pKz+LYPN\nBHcI\r\n=LT6g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhXWtEiO2dSMpRlcSH3S2sriGaLwFH65eoBxDC4q6QvgIhAJsW1TaOkE6EKtxFvU4E5r+EcYthdJCICJQWQNKModxN"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.c6870f20.0_1617320551290_0.49589756646655947"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.852f873c.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.852f873c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.852f873c.0","@material/mwc-textfield":"0.21.0-canary.852f873c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"f528b03c675bb05baf871766e103e6e35c28e203","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f528b03c675bb05baf871766e103e6e35c28e203/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f528b03c675bb05baf871766e103e6e35c28e203/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f528b03c675bb05baf871766e103e6e35c28e203/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f528b03c675bb05baf871766e103e6e35c28e203/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f528b03c675bb05baf871766e103e6e35c28e203/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f528b03c675bb05baf871766e103e6e35c28e203/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.852f873c.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-Y9+pUeOpDvtOyitqcSrUb3I5s9VteGdbWmrMNmt69RGcJX/DeaiYeg1OvdoySdwuaS79eDEJZG1TOveHEutKlw==","shasum":"a9d6bbb9ae868fcae59da2a60e856597d84f5890","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.852f873c.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZqoaCRA9TVsSAnZWagAAns8P/3ixeOMllugyhovikCSZ\nSGeldjWqZkwsuEPtUbGOZ0JqOP3E9qlfR1s+ICbKWZkHmwYb+oHX6Q47ExQt\nPj2XxvuNY9PX8+DdZ4murEIAgcJhJ3RG4PEVHM9bF9QDb1yhzTC1gYlR4k7I\nz/aqHocD5bCk50GswdD3Puge8qXxqaVjoQpq2HRfW9xFKWSYH1xz1dcp2UmP\nGxMqH2wy2YxFQeHwu7Yt6Q6m/4CLaTPHWgN29gO4N/rYMXJ6GbdxTwz8xdl3\n/ISX7PIUGh9i1HHTdV5TsCvBCCKiucbkIlp0rgweGPAwaCvQBLxXKHRl9tqa\nn+zGD2qIZNx3w3uDBJC7dB/cc6vAsADq3KUwRq5lCBFIJwcaR/y17GacWMBt\nD786B27SdliLdNNw/euDy6AM8MGr7EMc8KCyUuZbNSsQkxu1bVvUzmBya6SW\nJ8oHNOuaO8ghM39dj998wm0614PgJFwWWAasON0rNOwOksJXiAIV7h60nu3k\nUINCwC1yYXwVNqMdQZ6VOoGtDwosjMwGCqF1Vey8xShXdnlOlVqEjjVjyHdj\ni0ZTzEQJRq2K7G7TO5fpHjO3YLzR58tgR0oshKPPU9/qEV4Fa+l0mEpEG2PP\ncQNaOE2is22g1Q5xW0ftw0C2CGH9yFM2qB012i1zZ5kWx7HyE8+lvnZfLu7a\nlIK9\r\n=ZrKU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGDK2RCmTEbsBQ9kdj+GTwYdf5Gi+PwTSREeE1NJfsLCAiAR6ynUQufcXznbOiR5KRYb2XMmgFx1Q6pVhyCUbWiiVw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.852f873c.0_1617340954464_0.06683959956853869"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.4a674a1d.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.4a674a1d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.4a674a1d.0","@material/mwc-textfield":"0.21.0-canary.4a674a1d.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d4f9464090813f45495113dfd52201f8c86bab3f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4f9464090813f45495113dfd52201f8c86bab3f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4f9464090813f45495113dfd52201f8c86bab3f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4f9464090813f45495113dfd52201f8c86bab3f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4f9464090813f45495113dfd52201f8c86bab3f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4f9464090813f45495113dfd52201f8c86bab3f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d4f9464090813f45495113dfd52201f8c86bab3f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.4a674a1d.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-O3YU76/WYJhDgUexRn7TCGJuiOwtusGQ6q2Y7/+Ah2xlTTPzjo1HjYObGCXq+vnhHcywf+JvjQn9x+zj1Q+y1g==","shasum":"7c0cd2ad3fc1e7fc7154d747399b1137c91bc993","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.4a674a1d.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZy3eCRA9TVsSAnZWagAA2FUQAJzWt1HwPQY2x5RuWBCn\nU2Iwy+J4fZjWJOKXSiFolsZ4NtCxSyUqM2o0aH9P2/lDOi1y05AId8x7WA+K\nXCElllQO8uxSsaeNqr6cXLUNTeJl5+sYy/4oM4a1lUpUrmjFAt3ReBWBruEX\nRa01OYQqWTq8+k3ZZtXRRffeysnZxIh+hKrvIdeK9sTLJFtsb5A2OvxpWnod\nFwAgRagf24uSOPIrBa/rBcPnb5mJu2y3HBdr9mgz3YWGS59pyOKdKANEBaiE\nXFeLb3sYW3ua4MsVp0zVI0c5QPkj7E0W1NGZK3fdYAm4r1L+xyKBHoA4TiyC\nrBU4rlGwwNkOIpFUma7LG03tId32GKdfF8UJXdI8mlUXPio2iTpgprUbsTnJ\nj+CQTY0YggaMcejUDqc4TQ8v1sT6px0En1WUPy3Q4vbfiDKnLZV6/i0FM/gh\nDUmayxlEULgLIbWwC468YAliD1Rp8+4VlRqJadFnqrLcXNMEeHv3J/pPv0/B\nb06FmGj7h2R7ljRi0sWEGHjjbZ2HsIH4iJAwdAcQ+IymoWfB3DKCwHEIXVyE\nDU+FwDUHSFpTtfOoSsHxKbTjIaXyKfMybTtE5iXC+VtCoRKlsJ8iEzYEebCz\n6K50+vR15E9SwE+p6rdiTbgtIGRJZyUdhbcVQSgKTzC0v+s4gzID/Lx+6RbB\nG/p3\r\n=Z0Q5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRclaxvYJ/wTv2PUw8BJHz3tljw/ZI/bpKhwMfRcy8jAIgSN6TGy5tY2efpz7XuhHZTceAX70ZK/QXQ4EQ6lCHX5g="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.4a674a1d.0_1617374685725_0.37848908356585653"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.c5b29ff1.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.c5b29ff1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.c5b29ff1.0","@material/mwc-textfield":"0.21.0-canary.c5b29ff1.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c1604e99ccbc76c92a4371c529c43a4997f78c3e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1604e99ccbc76c92a4371c529c43a4997f78c3e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1604e99ccbc76c92a4371c529c43a4997f78c3e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1604e99ccbc76c92a4371c529c43a4997f78c3e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1604e99ccbc76c92a4371c529c43a4997f78c3e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1604e99ccbc76c92a4371c529c43a4997f78c3e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c1604e99ccbc76c92a4371c529c43a4997f78c3e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.c5b29ff1.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-0DglC+rHZ0Uq/w7qvu4mWducz1EpuhAdKy4S3TIHoRQ+WsaG/AITjjnzFLWZW18eWszJAk5oeJ939MPw8/5sKQ==","shasum":"4332a906d9efe62d86542ae54b12ab409a0efff1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.c5b29ff1.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga03jCRA9TVsSAnZWagAAxa8P/ipuFv+roFrkzlfRGKn7\nrBcDv+rgOKnXIizVdDHxmRd2NI7XyhDabNA2SLGbaJgVie3HBxZtgcViDD7w\nds83dw6ifNTslYtNrPkLUVeMgHpI4YiLhpeYK/BZL0NaSxnVhocLb90q9BHs\nEE19KZr9t+g7JZ1btxEeCUQoZhU5cT4hoEmFYOY9pAc1Qx4D9VVijZhgkH2d\n2ThlFrcWAtg5Vlka/kBh7xxt2v2crSTxDmBWb3qFFaX3+SCjr5Wi+PlUPUNd\nMxeX07W61FGQIpiIKJ53NfEZfYL6n2VXWULG0ZI7u1xkXuVvmsmxdLrtHkXl\nKJUjjSNiD58usbmIHuvBWm4sB1eOobHD5nQ2ajTL4HGk971isNchieDBjme5\nRTYYjx9plOb+bmGa5WRHKDudglhIeqyD/VKbMxumsQPcG1bEaFQyLC1+FZR4\n4nwU4Cgv93dNs/wMaXv2uE21ElyckRJiig3X4o743F6O1q/afgNI2ohoK0Xa\nCM+hWVbhwqVfNtLGUPZMEK+G7cPbJaSqxL4pFilXkOPrKyQ9z/GTcVPbRxFT\nYW/7vZmkkH36Wfl2Qrms6A5fUl5r02+LOMvhO1HyvrXPT9JZLpqXImtUg2jl\nOpyGgZiV/++HaU4rCwj75ZNiYexgxM5GWVn7xBpYummzM+GfZeiDZMlN746p\nwqbg\r\n=sABI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCec2tQM+QNWoXMa3SkPeayicm7EQkU/270ITEr+7vbGAIhAKyZsKs7VAOIE5rbfdSuR/dfsz6F+cnp/ULpZdCn4UKI"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.c5b29ff1.0_1617645026632_0.8008848241378452"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.583644a6.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.583644a6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.583644a6.0","@material/mwc-textfield":"0.21.0-canary.583644a6.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"bf2f1c715105004d3849ec66e044434d48e08296","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bf2f1c715105004d3849ec66e044434d48e08296/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bf2f1c715105004d3849ec66e044434d48e08296/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bf2f1c715105004d3849ec66e044434d48e08296/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bf2f1c715105004d3849ec66e044434d48e08296/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bf2f1c715105004d3849ec66e044434d48e08296/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bf2f1c715105004d3849ec66e044434d48e08296/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.583644a6.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-Q7ErqSEz4x1RrSLc5+A/Y61N9ZnXMUyAQXl5NdUd5j3v1t5UNhMLi8UlAb2RghlUY9SHzKWVf6XCzEST6ZLa/g==","shasum":"fb6aa356105fe8f5ea68c323d5fff7132488a4c4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.583644a6.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga04kCRA9TVsSAnZWagAA004P/1qb03OwRZQqgMA9mW5c\nYe88E6Abp3fPMEE5Zl7B02nNZNhO+q33H1wG/egVm4Gu2V9tLq9A/jISMC3Q\nXK2aStDeS39MBDi1pmt1E5c62lrkt5urWxQymikIAsxUyzDz39EO6VY4nY+t\n3YcTW7MPkVxhe8tI+4BAuUYn3brKYmJwNc/HDu48ywGae7KeYdLTtnSEgD31\n6GoXBoHVve1gQvfZzbAk1pCKp9AUfpanlJ8qDomsJAjJhLMblhmhU2xM7XF4\nimqtcqHuAyniQe5fLHkI1em99PX+I/u8OlaHJYT1PP51P66fmkbkQWAwhvMt\nMMlW7C2GF5pH6tgen4ZPqvQxpGOf6cL1YfYjJrQ8tVv2LL9CLbCfEeXRWVXX\nInlVvlfkePYzPhfxIbGutrQ81lN2MuXZdAiplRF6fMBUFDWJz6MgVPN6QJmr\nULuKgBPLRRcK4tpUp6gGRxRNJIYSxYiIU642QKiilDHUq33SBY06uAT4jYyx\niSsnfzzhEjhVonQHKwXhtQwbYCUuhKkKFvvV1Ay3AXZ1UjR0EXmH6chh8mCY\ngZ/Ka7jwnwj6d1F3xqIGlAS+lHVbmBv2+5X+cqmZrzQiW/qQaQEBBNeUb6CJ\nrytt62hxEmH79P2+XrLZEErYW4FnPFY5SwQ3OFon8Zci/1HkChigKt3CVf8H\nr0M3\r\n=533I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtVQZBlEcCs/762rArIL7FpS+N47E7z2Ao6WoSuHRwYgIhAPxcVoPzOgne00lBt/5fICkf66g97wGoVE3X3pHur2Wp"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.583644a6.0_1617645092182_0.7689878843932962"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.02ac1e6b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.02ac1e6b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.02ac1e6b.0","@material/mwc-textfield":"0.21.0-canary.02ac1e6b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c6e525b215b6043eb042d3feb1f6066bd536bd94","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6e525b215b6043eb042d3feb1f6066bd536bd94/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6e525b215b6043eb042d3feb1f6066bd536bd94/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6e525b215b6043eb042d3feb1f6066bd536bd94/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6e525b215b6043eb042d3feb1f6066bd536bd94/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6e525b215b6043eb042d3feb1f6066bd536bd94/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6e525b215b6043eb042d3feb1f6066bd536bd94/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.02ac1e6b.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-1fd0rMtM5q8vDKpAIbko1ubtFpTxERbklh/jWG8m0NJ5rsFKVGbfR2PQvW9EAB84XW+a0agHb+Q0JkaX1oN5ng==","shasum":"154c36655389f1e1138b01f006ceede1c4cff0f9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.02ac1e6b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKpDCRA9TVsSAnZWagAAgS0P/2G9gU3OhGVEI1XggdpP\nwH1OEiRp7Sy0I2CxcDHGim9b/wQuHah1L+3BkVG9wUaqJuBIiwYWw2V+QPkL\nsF9za08YLJtot3HtYI4CrJkWkI7zuL+nmc6Jp5DgnY2i8ZdZHtFLC47VVug1\nQXKSEOjuMp6HdBVBxS5VAdsSVIvSiDxIUif8zm/gnIklIVZ8gBJQ5YVvhxk0\nTxR5fgfCPVXVdqaeNhWySMauJjjTpIUMaLpBF+SC8IvF67I83tPtdwt+l0Jq\n7NIbpgJMEHb5wNzV1e7mZMCNxXMdF0GwEUPfC44AXvlhkTksBk71CMmVXGd7\nlp34XlsUUDFE6f8yCfmM0vg7hQkjzy4KbpGxbDFO+hSTZrDi5IQdlq/dmM/w\nOF46N08VnbDtvDxboZkEe5Cb+8G8QqqOzSgVz5yHmP2X1vL5NZUyYTJPl3QF\nLiL9mxuF42nRVTUSz2pYVPE8o0H6KYc5zBIqcDfwKg5yejICfvakidc/aekg\nYg1U5UMP8wI26zSiBrkKBd3j7Rtj5OJIzxai8DSD6Ro66gYZEKF5K/a1qyWP\nkFX30LqmcG9caaIhu+IcnctGgxNommKTyfh0UO5/Gj+6BWZWiHtBVj0Mwqnn\n1zwcsQTrccPnPyu1sw0ymlsl/slLUEC+ozW/HkdprLg6nircgF7CrT2YN6jg\njxDp\r\n=m7dF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICX30B9G8SYPmBD5cU6PqPw8/Jpdn1qWB5e4Vk6zpmGDAiAEdARtYKMgd+X0Bd/5p5B1mevYwv0mJwURq3y8yvoFKg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.02ac1e6b.0_1617734210567_0.32879291187256166"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.5ac5856e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.5ac5856e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.5ac5856e.0","@material/mwc-textfield":"0.21.0-canary.5ac5856e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"66f695ff77b118469a93aac22c76e5e558c242a7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f695ff77b118469a93aac22c76e5e558c242a7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f695ff77b118469a93aac22c76e5e558c242a7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f695ff77b118469a93aac22c76e5e558c242a7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f695ff77b118469a93aac22c76e5e558c242a7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f695ff77b118469a93aac22c76e5e558c242a7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f695ff77b118469a93aac22c76e5e558c242a7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.5ac5856e.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-SOZVDzwhWaK2dOZyW2rFdUGx0sWASoEQQrPq3DShL3Nin6M76100a2d5YBcZ9d7VBjnXWeE7x1tXP8sx9yVSPg==","shasum":"ee9cf26522ace69e44aa500b09a9cb53a2e651a9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.5ac5856e.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKvDCRA9TVsSAnZWagAADy0QAIBRYcRmIPEMbCtmHGvr\nVrqVTKVz7x2Uz+y/ByvBakgPyGfZPfKVH70rbQAMQNq4AkpFY6dTLkYkJ2//\nVdeh7bmupAKPpO1xzfvRNYXbIYNq4qv7IbLASpQyxHerBGWcZqjWHvqHKVQ4\nsiNYb2IgfyO3mDLsBDyum85RU7Jz7RE912i1GwOPe7XMAL5najwjXPNBPNZs\nldmmrvGE1HM071Lo5sC7d51LgqRBe0Pm/hg4fe+we/qZvIIpD4uN9vMrcq8G\ngJbj8eHc2tc51BB+aTuFFKq/aIOx0cTftO7lgQreIB5qHmvXidU2qeqRMeZA\ndXBN1vsBLEAI5d8HP7XKOrMwDGz9KQl+KOJBC6v+dMD96CNsXs/+BZJyqp/u\nPdtSe5lDDUjLHdNFEcECfXnbsop5NMDLLSHsFAN7TMnzh09NUJovqOkyDrmN\nUVqB+pertAY/ek8yQwLV9CZeMPPe5n/6G6MwEBFoRNF5y0EU1UDbsswQf8QH\nYh/dIi88ttCcTtD1JnrpQoNL/WIZu/9sgGFDzvfpHW3M0b18VZC+aIVFtzZh\nSBAqtVOzfEklzJ5iBae3xveqHZQQI2gwyAAv1QL1/juqEZxYBsmFyHDC/gHZ\nukfhL2BjV3BOozaB1xqMUAy6m1wBCbzQ4JtAlskG2tzelvKTxs3lgGvnZVBC\nxDsY\r\n=EOPv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFw/kRWrcP8PfyNVHjrannLkDx7ERQlE73u4sMc/yBSsAiEAkzQkKbANOKTF0JBVywG/f9hI+Ir+C4jLpiwWuGntMJI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.5ac5856e.0_1617734594905_0.47649135876419213"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.bb23dbc4.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.bb23dbc4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.bb23dbc4.0","@material/mwc-textfield":"0.21.0-canary.bb23dbc4.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"42e5f906ec61897cd0de7e0e19e686d807408d70","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42e5f906ec61897cd0de7e0e19e686d807408d70/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42e5f906ec61897cd0de7e0e19e686d807408d70/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42e5f906ec61897cd0de7e0e19e686d807408d70/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42e5f906ec61897cd0de7e0e19e686d807408d70/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42e5f906ec61897cd0de7e0e19e686d807408d70/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/42e5f906ec61897cd0de7e0e19e686d807408d70/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.bb23dbc4.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-NmSvE7qjySYX42g2iX0AV0t6bOecbwdCmLsczEDahTOI5uLhIqPeCmaJ32C0FpspxuvyVO6oW76LFt7wtpxyCw==","shasum":"c476205486b1c59c9ebb33b8eedab99670535f65","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.bb23dbc4.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbiMCCRA9TVsSAnZWagAAZRoP/jmF1CVf6/IDjfgockkF\ndgct1IWhinA955nhEecQ/RcHaHtK2nkHoWGtfynF3whBsvailKe5+9Bt9jUg\nuNu2Dx2mpZNXhklRIabMyghlZDxRYwcxOV3h3bahHQxhNbpk5jNEoW/BC2af\n9Wnqs2/8F5bP9T5X4hu0Y6mAM8M7PzqnR3Hhbw6SxAaVo/o8PLLqp4Qpno/D\nKMyESf8Bi9LjpaW9abDVVyYYGormrJji2Mpz+Ukb8aWmVcCGXyZ5kYFemMIo\n3cqJIsXdfe1Mea14hMGIJc2NPnoNn+K8XhwxLgtxOdGMn0SWp6j/p1Ao/EXn\nYvtG5r8152G59afqxvjnnsnggIfW53u/ecSe9hf+GlyPcIRbgdHA3R4bxjdd\nrWBe+l+hLQNVEKuGBmiaz3Xd/tahwK10ihL8Mdevsn1crrQqtwrAqXGtaI3c\nNHgkUia92K9RIsye6nqVenCaP7w89bu32JVYDyuaS/zqfm+BN+ye2ZZK8JCz\naJvQtczWvtVcTIe5hp1kvSefGzuePNMnJhzIX0EkQu9Fh53401BvPlBplb/Q\nAn1vilx7cffIMjhor41emH+oGMs/MU1S6g0DlbHDXj2IDoFTT/CsrZ5r6kbs\nlxiv67FYYfCWf/VNxrBQ967OqK20AdFmTSFj/aJVPlDN8zZ2I625pcMl/+mb\na0U2\r\n=obgN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpFY8VjhtA8YKVmFeV5YKeD2RGPUEZSEc53hZ1ysc59AiAlDCTKj2U0k2ZeHvsQJPobxZHRWz9OTfvzARZ2cT00yA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.bb23dbc4.0_1617830658510_0.8908837745938281"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.e539904c.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.e539904c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.e539904c.0","@material/mwc-textfield":"0.21.0-canary.e539904c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"0522583b3f6a950dde45ae308718f06d90d40a84","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0522583b3f6a950dde45ae308718f06d90d40a84/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0522583b3f6a950dde45ae308718f06d90d40a84/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0522583b3f6a950dde45ae308718f06d90d40a84/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0522583b3f6a950dde45ae308718f06d90d40a84/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0522583b3f6a950dde45ae308718f06d90d40a84/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0522583b3f6a950dde45ae308718f06d90d40a84/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.e539904c.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-5bJiNUmqZPvTceHwqMCLBZinndltRqE2zHi17FqqfGY/yXMK8KoFlaWC6y+LD4Zy8+2UqJYSKSZiARx30/uw5g==","shasum":"5d9a3419a5d26f666841c16e394a1a72692b7012","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.e539904c.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb0UuCRA9TVsSAnZWagAAZxMP/10No5XNaQWVtt56Rrxv\nykOivCnlfgJEib6VBkShrPPEMgcAqhVy19ZHJOYSvFI5U6mgQC7G5b7SwR/P\nMBHLuBXVK93MfOnxJCyldG2a70mUOWXFbFRULClToqFA6KgUagBon/7uw191\nzzLQ3rujD3T9vXJnikAtCBsOq5U14BUXued+LO1phtZL4NbupYO16iwwMhR7\nSWRdIDJcA8FuJKwVJy6OgneSNDWTOFPuOsrYsarSB6Rsty6NXOCz3AGOOzeN\n47uVxOQOoyx7Vmhtn/IEoY1QZR1c029Zq/gDl76dq3uLD2RmCk1/9Et8RQQH\njKtIXTNp7pZq7F20+9XfTDK0zCqQRkxz4tX2Ewx+GY+1GPSdWn0BOPazOrpY\n+r76hx3Egk4+W8d1wHFFE7Q52YvooT4i0On7JWHB3F8IMN6PE0DyP1dXN0Zd\nPLl4vG7LS7IKLTB+Ecx6E6egEY+olzzOoXqlOF/O/3eZx1OxTu1CJ2JodFXB\nNyez/wOaUNNLHcTyHvJ0K1egQ6JrXid0tOFyxILom434+PAAEGXiwmi9ZEFS\nmnkZNX9hHWI8iRqcX4HrozKO9Rt1zvUGy3E6/tz51pmwC8X1/L7208OSRMUD\nEjG8UjMwHZEpdFn+m6g1mJH2k40+Ze631new3ZnipnE4APEi6qsNAj6dfbH+\n1CbU\r\n=8pTp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFw1MvQyYdCn/iTGD0J3I6DfFcMsfFWW+M+1Lf8UzM7eAiA9fEMm4gGl/joanRwjAo1Xl+PKDCkVsWyYq5RmF5bUyg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.e539904c.0_1617904942494_0.14311986164307133"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.a93ae333.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.a93ae333.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.a93ae333.0","@material/mwc-textfield":"0.21.0-canary.a93ae333.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/31a1d0d94dbc7ba9d8611ebd62d41024f6fa88bb/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.a93ae333.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-8gvWHsTm2N1nIxBgifBmH9G+7CE9+ZAMCMXn3WM597BQQVvk2TYv2ciJ3m941WjHHSXM/YCr+ntwW4Jmio3oeA==","shasum":"fa43fc0e53bb8a4e737e7fad96f3cd2f18ddec22","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.a93ae333.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLUSCRA9TVsSAnZWagAA6nMP/2VZY4xmrO3xUrs2Qp8+\nvh2T5t0ejbjim7ByhrNgKEu2AsEym2ULJKPOt3rE2lptOmdCAzDXBy9D7kWJ\nbYrEeCkmvHZ7xAZl9FUqrYa4/k9C5Z/ghDsr5GA9jTMgiN1OsRvuXjQhANNd\nKI/y8feJ9Xq2/W3wluDYDcHh1TximUd8JbVdnNFTUGy17c3HVC4LXQh0DOWc\nwkGyivbENxmUZjdzr5gcS/VyIbHUpWSdctaOuGkzcZkjMSa2c/OeJoL4yyqn\nJgeK0zr2wYJFoKWGYa7FGCQpo0VC4TDl6/WsBO5Fmjce70Ufxap56QvrP/dS\nvP5ub5B9kAFFF3ljI4Z7+0lC/sTWNOFQUwFbaWpVdAtMskjY7wsxC4v1r8yQ\nXD9kJ613e8AUorcDu31bc4vcn5KvXlpHz88wRMD2ijSrGfAhapqV0K7UahFX\njfeGIYnyxnEuM4FBGjlEEyuNKAEgdTcuxwOvfdm5WQ6AnQs/Q8rUsMszwjXu\nuSX7j0eUSVMQTGNaqWtKz0CNzbJLE6pN3Rsj/aCW0voFujwMZqiy0qeu51CP\nB32pYR+XOaNZYh4e5KBuzDSc2Sl03SOKCUaVpE/1LzatmZ5q7nqLH8y+r9bU\nAX71x/tW2vUfPJPHeuCvvrErIBK+nrEYE20a9Jgnwo66kl/hSU8Yt/k/6dXV\n5Ptt\r\n=WoTU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCm9srAmSGJKhOsXQ2e7TK+Conjt8jwIzRncEQfvB3OjAIgagWk9ZBf9AjNZ34OLjweNJElG/ntnHgWYuKoC/q6FB0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.a93ae333.0_1617999121545_0.9499809462718602"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.e142c144.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.e142c144.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.e142c144.0","@material/mwc-textfield":"0.21.0-canary.e142c144.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"135f2f0e24347fef74904a437124ccf8978e20b3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/135f2f0e24347fef74904a437124ccf8978e20b3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/135f2f0e24347fef74904a437124ccf8978e20b3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/135f2f0e24347fef74904a437124ccf8978e20b3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/135f2f0e24347fef74904a437124ccf8978e20b3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/135f2f0e24347fef74904a437124ccf8978e20b3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/135f2f0e24347fef74904a437124ccf8978e20b3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.e142c144.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-T6SjsOufTFxB1HfC++0s3MYeoz2bvkuMRmPiS46RpIBJqjiukWJMXT2KvzLt3wnHLxAdNPrq5Ca1ROPxvBcxsA==","shasum":"46197b06d3fce0d112786e42833e0c890d6f6f70","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.e142c144.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdF5aCRA9TVsSAnZWagAAGgkP/3aYl4GY2KBWs0vI7ykn\n39wkAtBIrYSrbPlNkTpTw2T49UiRBYjffN4SNsTSWmFCDzU7Ki6MJFCvaaPf\nG0gA9lyP6hajDkEk/yleR93G38JKyJTUD9ebyIoic7s7bqxMosR4Q5GaqQ4R\nyNOPYzY00gaFfwkrUwpUSl9tCHNx1s4gReskp6FGUK5YZPuE/YQn2xmoaNPl\nhQrAlZfnL6DK/EpN4FDWqYufIVpoDEYIm2RC1XX4uYnciVXSWt/9PrcA91q/\n0iAQ5qgtUY8CjLlMXAocx1lctRBOZ4cXh4BLNSA/S4G2i4RIiJ5k+adUU3mK\nenZL7Dw3TBonZHQp2Lih8VkD8YSLjsj1zXv/wpGBeTanEdfzdoHSgZYpjHgD\n4E7CeCKdIhWuqVPaoHJNL7YEYCGjOc0D1xOVatXAZtOJO92T94Qjpeu1QH0B\nhrfGK1YUcJR8GiOy9ozTKbkBTELeQfpET/h50jVJSgDi4uJRLCknWii1AmgA\npvy0pjCj+0tb5Gz6BauZcI69G7ebTYXf4g9hjNoiw+apyV9Ih80BZtkkuyaU\n6J23Fu0Xmpq93N4Xk7goELJN69IvkX/7TXHeVlns293nErV+WJ5U/Ee7a725\nhBfD5tURiwfoVPQMt3By9Q9N77gvuYzAkEZpSvQG7YIMXArvxIxbCQgmMgvV\no3Fu\r\n=LmIa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA2dvMzq2Yaa+5zdzEwLkUBb1z8afFSuG3SzpGoqXtQBAiBAmgPRXkpO8BrIcQ70Seo48F7h+EfkhqmBVxOqwGfE0Q=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.e142c144.0_1618239065974_0.49117590652228293"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.382d7eb0.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.382d7eb0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.382d7eb0.0","@material/mwc-textfield":"0.21.0-canary.382d7eb0.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"22f558ec852007036c1b01f2d052ff4512cfb420","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22f558ec852007036c1b01f2d052ff4512cfb420/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22f558ec852007036c1b01f2d052ff4512cfb420/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22f558ec852007036c1b01f2d052ff4512cfb420/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22f558ec852007036c1b01f2d052ff4512cfb420/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22f558ec852007036c1b01f2d052ff4512cfb420/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/22f558ec852007036c1b01f2d052ff4512cfb420/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.382d7eb0.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-9CpwMnrTv+shdUaV4h00Q+jAQFop7Lze9p3PFa+wlTwDKV/xeTiDzSbR01bZ3jWqiczERsY6I8XToLWsfmSYPw==","shasum":"f219a9fcdb8e0b0e8dca1c82f8e7cd3ddbad26a0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.382d7eb0.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdMQ/CRA9TVsSAnZWagAACcIQAJgaVbio6Z2rqNG6sCtc\nMA3gOfHHFwa0UaTuJZ0dTMoRkdeTKzeRR9V1bq5QkpAXQwr2+f5X0pBw64+X\nOJBoKa63mJRyU4SRHNpaxomGLueF4f+K2UaZDG9UgVT51VmQ53GHNS9402qA\n9uzpAcwEpFe4QI6KItM6FrftZ7HlQnXftV3b24Pk1W0hfTQoGeb9ajkkixXr\ns+DYx2AFo+aq27cl8CKrUMCc6SFdq3F0zH4nXMxUkQYghapI7zr7qG3w44Oi\nmGjkkifmeJt6TfcjtoVZ0Z3kagOAkbziJCTD9FI5byn+m2q6fM1NKcWEiTUV\ngxdeHzJrDWsjoP819CWMhlwLaECkEV/9kGW3KlyA3vVCqS4GCnhGsYIoRqix\nFH/uvF4L+2AhvvqqwM1J1TfVRxZVsabI81AxIFuw7GXyZ2TXJkj/5oPyrrTh\nKn0smNTvazFsFoBKSKF/rMq+MKj9HNLEb/SbDb7Wq59lTFQhd2ctS7/3zRmC\n4YRRgKkwG+FhAEMqxV+OHku+w5UTz29busRmJI+YT+EenTPRNVM/KqSq8thp\nfeg1dvCrfygoGz+xTmHTVP8ImVUMlLHXHKZOZfhoyga9mgdHszQw4YgH09PU\nWLU4umzd+WHiFZ4gMN25lVzvItnoFlQn2JuVlT1I+OWwolT3k4ZYpx5Avv1H\no/Rd\r\n=eLWa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDCAuylzmepucXndaal2dMhGi7NRHjmMP9kASGlAytdAiA0++hadNpG/H1r/Xl3wlDIQOXBZkt8R1Pa8trFAp1YfQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.382d7eb0.0_1618265150711_0.8671997356918413"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.b16c7885.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.b16c7885.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.b16c7885.0","@material/mwc-textfield":"0.21.0-canary.b16c7885.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"effabeb19d8128aa03c36be651c6b4eb98d15e9a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/effabeb19d8128aa03c36be651c6b4eb98d15e9a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/effabeb19d8128aa03c36be651c6b4eb98d15e9a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/effabeb19d8128aa03c36be651c6b4eb98d15e9a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/effabeb19d8128aa03c36be651c6b4eb98d15e9a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/effabeb19d8128aa03c36be651c6b4eb98d15e9a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/effabeb19d8128aa03c36be651c6b4eb98d15e9a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.b16c7885.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-GusOyL/YCf9ZupcSC5uxKezBwDrs/xOUbLawbA3trZqP2lKLeL9xcG/JYbYC1TOEOw5inVEbotm0XKzkq1kbFw==","shasum":"da5a99d7e7d786fc8d87173b1a4c0ba071e73de2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.b16c7885.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdMwjCRA9TVsSAnZWagAATOwP/RL7bv9HIfrkux+8RusF\npDouPEjiN+aEHtFT6S512qXlZg5FaSYSsxX2bkz0EuQs1Ixl0YeqSEtLQRzB\nXzEzRlO3sUXDR4RsDJKobPeY34mPahW5pkXsKQb65yN+PMc8ZqLwzSA5pNFJ\n0W6guxeuH50YNq+1cL+GPeWA0JG6ZVRgXnTOzueFfYJg2N3xg4iIYS90rJWi\n3w3hw0QD4s71nQTX8DzE0LvfVfutvqdg0T19HqyUH1gyn1Aqqa5f2QX2Dpkf\nw/RswI1vS9Cqo5W/jIZWCFTLe4VPUh5HjefhjlzzX/Fd0Gd9RXK1zR4s8cZA\n4recbFaPhKhJIpFzZjAXWX11aith1T0ppAFwfc619hjbL2ufEyX2VcjIX8vg\nIKN2RdHWJwik9QCwAV/edcmd0VjYqyOmgNOEArShUJMqqi7CQxXhA1ivoSaC\n2Xw23QvGl20XQqNEaeCuWXlK0s4A7xFZmbjp12HAFwFDP4/vnWQjZ5RgkaSN\n1rfK9cB7FALgmU5mSdLaWHcXzFgj/0OFsdIEdWdeC4TZcbpnEDJD1mEW4fJs\n1vxnRTGU7w57J+RMm0yN+90mkgvTjq8DuD/LoQ9WWhEy0s90ZVSlOP9hNRuC\nQ7OJ3OSQyM3oFOTKUrB7BRcid9PVdVRHQzXSDhzq4ddOaJ5gr2YiWxTcw83i\noBIR\r\n=rBaW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGZu4rBAiJ6ZBPdDPR9nY0MklCEGbVzAHUgXB0R4YhqAIhAOA7AqpYConeNGvwiY94NDYQAkkZ3x0I5prrbjd65jAX"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.b16c7885.0_1618267171185_0.40750533061449357"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0e92782b.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0e92782b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0e92782b.0","@material/mwc-textfield":"0.21.0-canary.0e92782b.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"7c46ee6728f96c896cbcb981be39309e7fd3f60b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c46ee6728f96c896cbcb981be39309e7fd3f60b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c46ee6728f96c896cbcb981be39309e7fd3f60b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c46ee6728f96c896cbcb981be39309e7fd3f60b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c46ee6728f96c896cbcb981be39309e7fd3f60b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c46ee6728f96c896cbcb981be39309e7fd3f60b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c46ee6728f96c896cbcb981be39309e7fd3f60b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0e92782b.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-zbU6KK+Warq712eMJwWuuaWvYKS410Uoevcrc7zvGuZfIltMs+r521p9YR6NbKcGS+iO7o7TmSrip1rO/mcReA==","shasum":"347ab51863b3b851643a73e5e67b11a755790811","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0e92782b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgda3NCRA9TVsSAnZWagAA+IQP/ieHajRkcDm8V0PuVHHB\nzlw1ygPTQwAyZFxg9U0Sf/Ud49OEkCYggviaMxAoznsvqrPFdNycGPFBlGry\n1jT1DUTMGs2Pp7L2CXmZHeSTx/S07ZhgpJ0gNonio5rmgJv+VkyuZzSRUN7Y\nKOFBdVwQvCxZmRatotEe6ma9xg+ZUOCY6DZuK4S2mSAgo324JYBczHDQKkGL\n/75MsA6Ou4v03MwtOXpJWM1C1HhM0dqdOmcVHuA6M+PMtp6HuapLgYbQgm4E\njXliNlw88Vnusoujq7Py9HZcLWnJo2An6eeinn+uYIKF968/Z74hXI1au0cZ\nT/bTG3MQem9M2jX75+a7UztQN2Z2LPwT3YWm89VwP88Z9jfbHcF6uxO5TQbO\nlOm7HKl31pEZcV+n4iDQ2coWg8rAmFhFy0kMH/8nrQoEMcuC940CswMXZHkp\nF2qHCJJqFaVAV5/bhT25SV6M0pGtEjXVL8EefZmyqoqk2wOBJrn4zna/4lVs\nqMA0ppHSN7JGXDSYqokhAV75CeZCmCSTzYYyG07oUfII4S8rMMfhppbzrC8o\noiz/ANxcTAMdIdOqbbvbQQyiS0j3p94qcZGqta8VMPhrTmlksRgKUX83/Rnv\nYyXbA0TJT4QdhBQ2xZp7BtxKnXeDa57SpOhCIDEHLbCvQvF2KsuRVexJl9+a\n5voz\r\n=pdlh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsg8Bch35KODHoZvNqSyasuJvL5lk863PErWRQaB+WaAiEAq0y0oj+Vuowsgzds8KUCWruFTTv9mVeZfgNA5seFcbQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0e92782b.0_1618324941353_0.45287347742450423"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.70b3a072.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.70b3a072.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.70b3a072.0","@material/mwc-textfield":"0.21.0-canary.70b3a072.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"12958287de673f6ce0eb511950c61be3d1a28235","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12958287de673f6ce0eb511950c61be3d1a28235/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12958287de673f6ce0eb511950c61be3d1a28235/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12958287de673f6ce0eb511950c61be3d1a28235/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12958287de673f6ce0eb511950c61be3d1a28235/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12958287de673f6ce0eb511950c61be3d1a28235/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/12958287de673f6ce0eb511950c61be3d1a28235/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.70b3a072.0","_nodeVersion":"10.24.0","_npmVersion":"lerna/3.22.1/node@v10.24.0+x64 (linux)","dist":{"integrity":"sha512-HgPCcsjtYW4xyXbPdOrAcjgitVBgT8TyeMytmkz9cZgcWTrNu/OCPXzYNPrW7+rLiLjL39NrYeOO/l6pDf/UAA==","shasum":"caad2996a3be62e9a7932fd25dbe2deef4dc3ecb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.70b3a072.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd2wfCRA9TVsSAnZWagAAmWMP/RJFyNIuq0XWGOa8GC3f\nZTZgu5yA2RpqVTm5Yy71/djXIbxi6ofnVVUPnwSiMbCOmUdXxr8xQ6etkyYT\n8IhBbUEwVrBNxfQmJebr0FXEXxtKv8bCEd2g5+Tr9s9CP/i+MDIMY+zBELVk\nsPmWYh+oezMITd+l2nvdMe85YhWFtM3L+/g4tJF0erJ2HTexGAiuEviJLMxx\nLFBHtqhy1hMTTZwWdX89RPZZPykDbwGKKh9KoZbHfoT1eWnYcVpq8gbCJhg1\nX6sPjjH4EqzroyTHcss2SInk8mnmNAXPFabLbL3cyKtF0Q2S/+hCaYIm6Vti\nbVD2WfNTCRKn1NzBR9ki2CAgHee9eQD4vCECROZ7GxmksxGKey75kxRR+vLG\ndbiHMIdkZaiXUZx656nXVwTdE8Hj8XmBRJliHBWYZXy8/HUuIzmOz82pMdHO\nnYWb4VF1GO8EU+lANobHDZVsLhwmCoYSWh4m2biVc1F1SyJM3jMhR7ShvNCW\nYfGfE8fpU6sEbEMwkObVOGRYRZT5dWD3sT84ij1GAxjoqfwqhrI/zyXQrHIP\nWs0wxwt13ZVjX9xvEvQE+/9nin5trDskL11dyx/EsWp1F6At6dqyzmS8x9RE\noi5pFJsW2jYBZtEu+p/Hz+dLmwZsC0yXZEll4PAe6lcyRRY7R49GY7CKj5Y4\n5wey\r\n=/Iiy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1l9OK8PQsUE3YrmbAg3gagaJTRRfLvRPTm3ecjiIT4wIhAJBz66zEA6DVt0ZUiE1755qCmwJpRgvD/DsnXWpz60Kw"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.70b3a072.0_1618439198992_0.4616068387024941"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.ff79b092.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.ff79b092.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.ff79b092.0","@material/mwc-textfield":"0.21.0-canary.ff79b092.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"88513d2e247534891581014622ab048f4f2c52cf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88513d2e247534891581014622ab048f4f2c52cf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88513d2e247534891581014622ab048f4f2c52cf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88513d2e247534891581014622ab048f4f2c52cf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88513d2e247534891581014622ab048f4f2c52cf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88513d2e247534891581014622ab048f4f2c52cf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/88513d2e247534891581014622ab048f4f2c52cf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.ff79b092.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-rp/vEia2DFxBCIY8m9WJvaUc6iMlaRmaH85p0q5weKawg1OGHREILbzZC/2uvU6PVTAVJD+WAUPnpZSYEXLNGA==","shasum":"30009eb7785ff2bf71c64743b86f92b22db16dea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.ff79b092.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeI1LCRA9TVsSAnZWagAAHUYQAJ0wsL9CE4LLu7tKmNiF\n1bDF7fBvRvLjgKhvZaXOojzKkO5vzVH1z9gveZbiIlqkW3qgfHbdXSFiBUSC\nS7lbkJAvAMLy/ASHU1RA3aWZVfNQYmz6kb80YXPY+uO0XtqfbMmK1Yk4WUBQ\nfu95BbpCBej+dT29/Kagc1CIM0MRC/aDa7d9zI4f7mAQt23CAL2pZ0B8jfVb\ndDA0JbIdptbjm87ybHUnxWqFIiIWpEZMtTWPRDCu4ZbjzwSMZsNaBESd20vx\n7VCslXBXmVA+MDh5XgtpjGvRP2W8UPEANB4qJuU5vQk3IgbLb2L2PVfqo36r\nyGs9kbyCTdFSQLDo7mWQP8OuYGBIcpzf2q+hZcju1LOittryZWC6A0Ydb8So\nBcMjKuUg6xiTR7YMSDJj2jZ/WsKnioGrT5N4yvoQql6c7lDFIvOkbhDirkDW\nFoYWvgJp4pROHOiEfZrkiChvfDv7Z9xs4nT7dPiW658aKaSSEXkVzqPGee3N\nsQ6twB59x3VavqmMTdfKZJ4mDG+cZ/pBnkbtzDdPOZO6RxQaBLnV/DEE4ANh\nR9F0EH/K2jIoXGyaIJnWc8bO76Yfhaz/SvhxtfUnHYkqPkdZvLtk46zYQ45E\njQwkMlIPm/OKSF0vvthbhU85wIMQGjnYy8jfDT1RlcmLBHDancqM45GauNyl\ndZrk\r\n=cjHK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8pxTIPqddjd89k7R3rzEs4FncwR899HIqi0wfolah4QIhAOpPtsb39tQ042k7dFyhTeY849w0VK2D8hDtVf9NNeuJ"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.ff79b092.0_1618513226812_0.965598482156192"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.f35b2fd7.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.f35b2fd7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.f35b2fd7.0","@material/mwc-textfield":"0.21.0-canary.f35b2fd7.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2b12bd76b8558ed1f827fb23b46af6854b404f91","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b12bd76b8558ed1f827fb23b46af6854b404f91/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b12bd76b8558ed1f827fb23b46af6854b404f91/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b12bd76b8558ed1f827fb23b46af6854b404f91/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b12bd76b8558ed1f827fb23b46af6854b404f91/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b12bd76b8558ed1f827fb23b46af6854b404f91/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2b12bd76b8558ed1f827fb23b46af6854b404f91/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.f35b2fd7.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-CBUt5HBGZ5t51gfa+VgVqse4X0Fmp2XqWxZeGkp+BdzOeRhDksTonUX6SAVA28JNqSZ9nkV1K9gc2WC6S6e5zQ==","shasum":"29e587cecc5dc5c4a001e7b525970b5c594af6e0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.f35b2fd7.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeI+zCRA9TVsSAnZWagAADi4P/izurhaJSN8TA0aP5gqg\nlXsT1psIrqWpOtHh4zOpnn71T1kLclxnvUbYi/Mzzmasn7NLkSwYy+2TGg0O\nzC4n7IanrTkKqNj5NRR4a1xXoIjMPZyHgDQbNWSMQjGKRx6DghHewkrJadiV\nwgUm8aOmYl0tvYKRxIu+oy7Fs4QOi6JrWwt6mdf2UNeP1k52sciUgrqWOdhW\nGac0/ZqleQnTJL+pAhUFqXky6jbK8it7OWOOXpuCL3pJ/UL7TtRPvGgalWIf\nlnkRhTCQB67aVXgAtBKq4HZnKyM8x0BONS6uo0GJcKMOaQ49RtXsk5ugFvvc\neZ3YGMP1didzaC7dmDTx4Of8+sg5xZTYvxizIlBfD5ojAWIsgA0tjgm1tEWK\nHeSd1qvh8zKRMeZKqLzxuUVyVWKeChBuy5yU5HCVI5OTp8sbCc73AwbqMqzk\ntg+5jjXmS7HNMGqtCiUlEpXftAFhhe7WZrQ+3+4a1PW9f4eq82c9lkwfwumY\nc/Xox+iEnJhxiOftcrZ+y1oMd3ZNz0/6uGV15qFfAn0wryCVTWSV7WgrCStI\nEf7AxJaODMzCEr+wtyoHhuhHpRh04GLcofk48pb8EFwzfgRJyxpmjN+/OPmu\ntiTBuEswz89BrWB0HIXvf0tleQlyGA9hs9cW5DD1iLZAYNgRKTqrQCPVGDQA\nb9qo\r\n=2AVw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHxt0apOYvGxZdRwIlBQAtcSFmXeqGkkNA7+vUovVwQgIhALnQnJGup82nQ1kIPqIRNDARAd4xoAzQK+I61EQKkopk"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.f35b2fd7.0_1618513843513_0.7818620270298646"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.11977cac.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.11977cac.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.11977cac.0","@material/mwc-textfield":"0.21.0-canary.11977cac.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"30cf21833b011fd8946bd6853a20341579b79c96","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30cf21833b011fd8946bd6853a20341579b79c96/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30cf21833b011fd8946bd6853a20341579b79c96/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30cf21833b011fd8946bd6853a20341579b79c96/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30cf21833b011fd8946bd6853a20341579b79c96/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30cf21833b011fd8946bd6853a20341579b79c96/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30cf21833b011fd8946bd6853a20341579b79c96/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.11977cac.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-WcAIVYtuMYmdJx9Xqk7FO9RVdiM2PN9Ry0OiysfQWiXJbRypFpN4QWG7qeOzcBy4ATYcXo0aCxvjfm1gkghXjg==","shasum":"5a0ec90eea36cd7726f156a93c40f09af7d7ecd9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.11977cac.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeOEvCRA9TVsSAnZWagAAzYsQAKLcI6DL93/dLtE1yK+x\n/K0BsTuejOkhrYwyb/5oduxPWqBEDtOxnx3m5tUJOSOnbTS0Wjg6HmYJ83Fn\nTox98m5d0AXazSG5O180s8rUSGuH8bWyLbfA+11GrUm+R9/IOvJBirq+CUc2\nKjJx/LO+fzFfi5IsONGldC05GyseNUtSoJ02IJMmB1HjmbJ03bpwwQDBbKD9\nu3du0xjBPR3hpvJx6SVbPCuMs18SYziFwVJu8l9YGcARox1lPUpkvFqj9MEe\nLNxOZL06x/h1n3H9ZoZRAqgGTtvjfT+igzMA0YIPj8fPJd2kIhDEguEDMC4s\nRIyaA9ykFEduAMRfnTz7J0Oq6e1ZbMmCTZ01SWl0fdgizh4K7Mw3C/cvBE00\naw5ut9VjFhNHJpxVBC/gqJMqUYv0h5HhdqBNlVntFIYH4Ev23H42QnCLsxIA\nNGMCetvUcr4joekBNuQdfFToqX3JiTmFbPBcU2g6HDVKFhKcnUFuI0s9U9/9\nlj4jRTkkP5DEwjG/t3aUAXpl+MRrPSsj6BXyKkaHTTz2YYI57pjTJBuPbB4a\nBaOjdRDgmpcVl7N3G3YVCQ6PdqAonv2qbHHj7/091E3SWUrQHq4niWaj5CRE\nYj3yNd/x45dQrVko9osb7WwonWP/egblbMIwbD0I8ZvVRVlCkaikef+gKk2x\n0ivT\r\n=KbWj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEeHSj1yVhKYd/KCQb2rlJcdckeb0JxDg8zooKNodbNFAiAjRh+Gy5STHRJOdxMeRnGndJqBkbhaPDVacFlf+H1K/Q=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.11977cac.0_1618534703460_0.5963981384393366"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.018ff45e.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.018ff45e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.018ff45e.0","@material/mwc-textfield":"0.21.0-canary.018ff45e.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"4ac1a4ee2a06e36457a8412629422eeaa91183b6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac1a4ee2a06e36457a8412629422eeaa91183b6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac1a4ee2a06e36457a8412629422eeaa91183b6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac1a4ee2a06e36457a8412629422eeaa91183b6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac1a4ee2a06e36457a8412629422eeaa91183b6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac1a4ee2a06e36457a8412629422eeaa91183b6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac1a4ee2a06e36457a8412629422eeaa91183b6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.018ff45e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-JUf/U7YvZ+nXcrIPgvz1UO2hgEA0F86oWZJZONfemEE+4ktsTVdpVP612uUlwYwa9pvZefFz/hUXzbeMJaWuGw==","shasum":"be0273c5b39bb244c2f8cc146eba75035d84b7fb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.018ff45e.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggf3tCRA9TVsSAnZWagAAe1cP/RzfQwqdU0sE7p88q5/0\niKdN1eFHOi7tNh6H9j6338USKEt0kUL6oaZ6NeZed+UPcMDaMEHkrdjW3mtz\ntw+5WmjAgVcYhAwGuOXM8XW33JQIgcFdiwWjBImWJzMjsrtVEs0O1y7UnfS3\niF8Dx2YWNa40MP12g0hEi0D0nQUHHBb2qFp/vY8zZA5rPLRGq4LqaC6M/sdq\nhmJbbwK/ou8OpcrcT+RI4uomTtS3g+czpZVtip92v3muCqk/83AA1aXGhRb3\nqW0s7HCyKEqhr3K+hsX2NG4aaD06zGiZ2UVBLvycCMoYmWnE3dBqXHecb2uK\ns5n+GEuvB36KOhrxEeh65xDlVMfgQtXSGZX9z9bw7lqujUebmzRYxfOX+t9t\nzs+mcAZ5WUDWD4ZRmGYZXOO6Kjv7/3AwGg6Kt8Q0hR+kTIctWKWPxZ+EqOaI\nCJCTyRJ/qEjOQjx2RP3HmlfYZJwrS2QMacpqiKl43fA6KkU+RKmBSbzWrmw3\nFLqsLe8uoOadfxSj+vzZ4I/SIN7WdbQtGkpUt9TsqyLnSLL6xdVSICdCPgj+\nPRnXt8jwWilnOVGQn310ivlXMcuWMjtVrzQhOvveuyNYmS9tUqyePe9yrMWg\nL9iU0XWFZ6qp3D3okZBE57G4VWvGJRK2lobi7DI8snjr0R74ekWDtIkYzR1J\niJWW\r\n=/kl3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXIznyZkiBNLbiLVyUv1cdwAxSYJh3qgJnK0J/93YKygIga0Sd1jjzqGGM/41WOM/8BwVcGPYYnDR/RqBR+oPtkps="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.018ff45e.0_1619131884623_0.27110838453574293"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.c99d1fa5.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.c99d1fa5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.c99d1fa5.0","@material/mwc-textfield":"0.21.0-canary.c99d1fa5.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/890b4e4cc8e4f275054b5ddf4b3554d0a36ad82c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.c99d1fa5.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-zJgYIXZmpAP6tvPg2wnUITUSg18Kgd7odNMvQFXefUFqhWixLx3jSBt8yG8ijmgurzzA9JB3tWOgxLB9si7aPQ==","shasum":"7db94db2abae24bf7bf0991005967bdb768c759a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.c99d1fa5.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghxi1CRA9TVsSAnZWagAAUcMQAJmAd1bNXdav4TIovXIK\nRJRo9muxfyWUytbaKYIZ4VkGh/TxXQi5voQ5uuU2MwLTpqmaoBye4A5+aX8w\n8BWoJCLBvAm2VROKBysm05fatHklCPaNx7vaR5suxHnE32nNPt+IlQWPLcS6\nv5UOiW+NE1RGiG+YjZs+LjzC1xCI6LjDfpv0EcQoP/+giO1VcX1ouYvqdoIE\n5hRdcndESxsq255U59zWZ4hODUq4Yzuz+WcbKVCwOfd9k+s9nXsSbtmUzlaT\nBPIIz/yul4mVq1bn59REZ4gMGns7Ml8CVrt3nTLVVtiVbBoUy/ryqkm1Ewzz\nxHkOyfUUjC0HXqR2qOZZTeNRF1Mer6t2uoD63LFrMYRUHja/BIsdpjw7qN4h\n/aakpvqd6YyalAfjk2Znr2pNy5Yw5r/DB/LmqOqVr/R+Tw1553jLeSIsf8Fc\nn9a5dGdYC6mEm8Aa+LSI3geDnXhHIhdt2y5wNVfuTw9K4kPpao1MfutI6Jvb\nLFI/SeFliKmeR0UTVRNH/FTn6EegXeHMqIH1i9qfbzmAE5xIBNcUxmhX9pUq\naWQ7NFWj25RKR6/DaI3fV/zWGzQdomsSNv8SsMEF4nU+givSCmhBhVjazODC\n8IgAO9xgT0Utq4Z2Nrlv3TiVCsvqbAIlNgJJ6fyXlwJ/ENjnt2NIWiSMacGO\nkv+/\r\n=pZt0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGF4A+zb2AgekQfgvLwE+26MlDzr5amWS5gU+SEPqlbqAiBVaX8TA/Pr2nOTRcGnsXMFUpqYjl0m0tWrK02FTEtQcw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.c99d1fa5.0_1619466420600_0.02570693685294767"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.eea9b304.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.eea9b304.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.eea9b304.0","@material/mwc-textfield":"0.21.0-canary.eea9b304.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5446efe110704f4464931aec816f98b15640db03","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5446efe110704f4464931aec816f98b15640db03/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5446efe110704f4464931aec816f98b15640db03/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5446efe110704f4464931aec816f98b15640db03/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5446efe110704f4464931aec816f98b15640db03/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5446efe110704f4464931aec816f98b15640db03/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5446efe110704f4464931aec816f98b15640db03/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.eea9b304.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-dv1Stq+jyWCrffvNW+I1thGcJFCN6Vcdh8gjgJEo89ecrmv5DslAgnebJ/t42DrkG0MEwJXBbVat7stnQnColQ==","shasum":"1a25bac5f4591aa609c194dca41d3a86cff84edd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.eea9b304.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiJXrCRA9TVsSAnZWagAAw6oP/iHpJ7ONfgnskn51y/R7\nXPbIkAcX2HD9Mz75luaK/Hb2RqzQ9Woceh1wnT1wF/f5MNTUVx3fQIwi98+y\nBmJXp2lO3/pTryjlLLq+/Rwro7qL/onregx7uBEB/j4doPyZkvEmZgD4dTdK\n3bN0JDzlQCTnff7L6euu8niod40g1TkwpecjV5vy+/kREcvWIsdtJXk10z0+\nR0owDWPWHCTR2c+ad26yZoYAQZFFonnrFHC//N4Ox5MfLFVSH7lMk6nafo7n\nZ8vPJzGpRlKo/ynuVbBzbauGtAUsBywjo6xpQQgGwqGYvmI9/jUXL17Q/jV2\n6dEEcviaGhw8/9BRG4CEA8DP0TGJb1oYj9CGjCgsHec15pSC5KZAv01wb9JO\nnUU9mkSmSSzcDypBeBkBEsd/2jQOXopqJKgq8VTvyhRrdTUYTGuGKFZaPvLG\nOQLyAnNY1fHn6HX3GTBlvlWs0KxTi36hc7eZMMkAXZ/yKHqZhM/BhlXgsZ89\nyZ1/k56C0YqwYvNnGjQ84MUV4hc+BkAK+1ni0Ytiht9t4/58OAWoJs2Ukwwd\ng3EqD+4O2VPcoE0aTuJfbRqeLN8hBz9CaWQ+dEVQolNaIYMpox/nYRixbcsp\nU5byb3UT5k9k4DtR3aCoO7Z833HbGk/J5yrBmRktFUCrW6oooifC1EoWiVeA\nvagJ\r\n=/Kbg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICxXEspPA5KOkpVGB7l1HLv4kCpILeGGFw2GM4Q7ky0lAiA9GuhBDNEQEyWz+OkYJ4ODJlLqh2YeCACVPSH7A+F9fQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.eea9b304.0_1619564010878_0.9390283600852483"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.5dd85d0c.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.5dd85d0c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.5dd85d0c.0","@material/mwc-textfield":"0.21.0-canary.5dd85d0c.0","lit-element":"^2.3.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"87fa4ee3a285fecb598e3c37e03178de68d79f7d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87fa4ee3a285fecb598e3c37e03178de68d79f7d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87fa4ee3a285fecb598e3c37e03178de68d79f7d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87fa4ee3a285fecb598e3c37e03178de68d79f7d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87fa4ee3a285fecb598e3c37e03178de68d79f7d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87fa4ee3a285fecb598e3c37e03178de68d79f7d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/87fa4ee3a285fecb598e3c37e03178de68d79f7d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.5dd85d0c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-56uTsKk8Pk9qi495cJdf8uXLHrNqGL3JmpLh2KegHhAbm2c2FjSmsaX6Pa9WJngKGeM79jveFbFzO3hd7R5XWA==","shasum":"e7f2f3ca10acdcc4fa2f6e87ba853a2c2d2aa87e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.5dd85d0c.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiKfOCRA9TVsSAnZWagAAa9kP/2JIunPGGHyPWcdMWkLb\nWZ0R3lq+HhCS38hACnxiJM7ZNjXWEk6Xvp/KNRRc9NhgjlAbc8HaYGtqY4Xt\nEHKR7BKI526tCE6ozFwMk0iiqiicVbn4wkt0X1TXZOmiy1aXmWMPi+EPYt7x\nHob+Q3pT4aEg3du4VfgpQNcPWRKnItzoIbyWfXBw35IiOhJ5V3T6b0W92/rM\nZEYfw04YsLzgYL97hSRYtIFf7OSnqC3hGAfyPmbaEdCW7AMbJ1ZKfpIQvNCO\n9PgfVbCjHVIflSEJrgOzF140pJNbZ6FfFlmarh5boowVQaIyn5Hiw/JagWpN\nzP6XTf7DP78UY1r0hoPuXjXN+crexeZpkpJp96bY9POMN2irajIZ6qK3ZTBA\njtgwSVw6V7e6wOzCEmQ5hT1SBhM1/vQQhD9JTGAMOYFPGIMXqltHl/wVTA4F\nHuhabJYKZFlWtJ4GLoLnOYdR8Q0IapPIKyfBfWtOp8p7l2sktXvHd9OcHGZJ\nWz7WaNOJWg1/71ccMEMYNFUafEMRIGg9WXJGlzHq1+MnmMGdcKg93JQMLU2P\ntR0QdVE9QbKjZZXzd9Taq9ywMRhsGNdaaJmO7O5TNMJZEGUZOWAED7m8PbHM\nHWJGJGOcsOvehs2ux2BAIinICtgR5Mb55qxSSBYjljXlYpE6+5Dk1d0ukxxf\nmuC4\r\n=bC9l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHeTYwYcdX4rgKc+TI3pPoj4dSLgLUOni2a5+ssClnG5AiEAnAlR/GYqU+XLCRJOUpZEioNQS5LSQ3+OUzrj0S5W89w="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.5dd85d0c.0_1619568589897_0.8067517500507311"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.cc813cff.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.cc813cff.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.cc813cff.0","@material/mwc-textfield":"0.21.0-canary.cc813cff.0","lit-element":"~2.4.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2505c49d16e9b978469aef456cb53e6d6b265758","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2505c49d16e9b978469aef456cb53e6d6b265758/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2505c49d16e9b978469aef456cb53e6d6b265758/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2505c49d16e9b978469aef456cb53e6d6b265758/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2505c49d16e9b978469aef456cb53e6d6b265758/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2505c49d16e9b978469aef456cb53e6d6b265758/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2505c49d16e9b978469aef456cb53e6d6b265758/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.cc813cff.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-AGsRLWl68HVlrcXiHsxijQ/Xxfn5upHDXRcWzjoeQ2TdHLTbPCM+dvCiPAXHqyCw3gG3G+96RkaLUcaH/zKkoA==","shasum":"f8d8b4f54c0f62400a514d57414d435e71d753b2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.cc813cff.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjHRsCRA9TVsSAnZWagAAXPgP/0yMvnRRh2BK2m3Y50Jl\nCNCD8l/vNHkXHSm+bH8uwhA/wfkH5Z4aFwajFbUqb4tAqHU4JWbcrhcklCsa\nBFWpfklSnkDOBPFtOmU0FzuwlsxrSEXXuXIWrVuEvIRHTCN7OZOxpLY8Og6Z\naR6P9g45aPIlOBPQyeN5M3rIkWsuZyZN+V8Lf8l6Yuqp60J7ZBUFOCMDxBTM\nLwtRukcpR8GGiF7uGW7a7W6DJdu2P88BifrO1u6ezOxzjuqc/TPBMR3Asprs\ng3G9VWpTn71/YDo0D+fxQvcDcCtrGg5BWlDGIF4A7fj2TC+1G6HY8M9sUkTi\nNMj0kU4S/EEY2wl3/ntv/1ApIeLuNtg9XmL/mJieh2VEKk0HtYtqzU5ANhOn\nXkKSl3Dn70riEN0aWxuNkO832mlxq6xudRbMGz7SGbJKIGsnJqFsLQIRa7D9\ndPUYCuR3rYh8uojLu/OttFpCK972HMkPz0v2uMuWJeD8txC5oX0Z1Cy8d3Rj\n3s907Xriy0t4X3eRU3UHTau2vgcr0IrIAzfj3xOC8SSq3U8Glk9SSW7LyevX\n0NoaCbPRsYqVFmlr8sfBzh77PcBXzj+yA2Q/SIAKKm/nd1dm4BHdKsdEFDG4\nlBVxS3NgPsYfdghAKBfIKl9nPQY79Xx7ymY50J2DbcaJVaC4RpIwgG8rHFKm\nNSbp\r\n=uuPO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmgBVdsylL+z/CANW9hBSW/WZMGtwwGPohmFE+QZuJmAiAE00bSbcRhHgiREVesswOi6IIccM+iVBlT39/WHSydkA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.cc813cff.0_1619817579499_0.4392581040057868"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0-canary.0875e898.0":{"name":"@material/mwc-textarea","version":"0.21.0-canary.0875e898.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.21.0-canary.0875e898.0","@material/mwc-textfield":"0.21.0-canary.0875e898.0","lit-element":"~2.4.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d5ea3c745b8a267546c8a9f9ff3e491bd41a8f2e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0-canary.0875e898.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-lCWG5JgIfSTSdQRksm9R8c18plPtfVNAlCkoh6PbChpe/VhLpNsCkSwlKYOi3J5nv3FozesPfpHpMzzcPqPOeA==","shasum":"7b973cba0ebba8627e1a392fe3f8e75312717eb3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0-canary.0875e898.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjHZUCRA9TVsSAnZWagAAxXQP/AqWHFmtu3N66ufIJAvr\nE9Rdfen9AzlG8kf3QhAN5X5qhuDidbkOdCKv8PRvvqxRBA0w7v0mfXWbFrp7\nU7YZNMxwQk149KH4hVcD+a3I1w97hxkImXCVDDqDf2KJO8Hpjyv47HYBygMV\nxy9c212lFaWnBRLOjQ6JJj+NOUfu/9WM5jBwnEf4cx/BhjCL+vrAT1YbgKoS\nqfsFj7eZ5bwz5JMOMECqYFNxrbGjaqssfsoSvjtlSDXDcawMSSBSkwl3ED5w\nd5j5voUjOQoI6Mt5rM196ImNCcbxjyh/Klp8zbBBKtBookzF5Rnrk4w18yxV\nnkLkAkm6YVxMZ2JwZuxErLsCuNBdhh+VRiK/mMWdPLAzyxuo4Vx4DJsSdtiw\n1xBxMU8HjK0HFtDpnVqYPhA1ZqfgzXdm/BvkKKu9HuMCECaJGpjkPZ0Nema7\nlP89XUVGbt/E4ZcOt8cJrxptMUKcYKo1vkWmnacN1Ve69AdsQbE81E/7xdVs\nAC+EfzfkHXhlaGDCffAYJSY7OyHaxZ9/03GaOocaJ5ua9bhylsITp5/EFARX\nxmAn6M5yBM1j7+s4TkvzbY/H/YsDv5irrj8rkwYewEioVIS2VrI3DEJb2PHW\ndgft1+ly3qlphFsJcRfch8c4bSzQ1YDwuPST8uS4cgVhqUsNScVpaYx3TjkG\n722R\r\n=LJWU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHv41FWcAJZjFllZSWp8uP698jG+lkqdCnWU/1768vUGAiB/wUMfwj2umoa5GzJywU880aQxjkS/fjrPL0uWU41dXA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0-canary.0875e898.0_1619818067998_0.10273517267267107"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.21.0":{"name":"@material/mwc-textarea","version":"0.21.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.21.0","@material/mwc-textfield":"^0.21.0","lit-element":"~2.4.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8f1e7e1b886b6c6820c18c8cc26cce7b15fd2c98","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.21.0","_nodeVersion":"12.21.0","_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (linux)","dist":{"integrity":"sha512-9hni2PkmMdGYtgXJTooEIgm2485bQOVVj75wAEtyaMlWUkInznFnZ7lS4ENUf4OtP3S5EQQF7DUqbHTTWLwHSg==","shasum":"db7cd18f738cf0a6e0b6e42c13d0b13cd902e87a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.21.0.tgz","fileCount":13,"unpackedSize":43132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJmaCRA9TVsSAnZWagAAvNoQAIRVtR7twfxyVXLXqkpj\nMmEm8jGAyp1z7vWrlVx3/bFRDRl2WCuY3QcR1/dpMjaVrk6v0X6nN6t0k6z6\ngn4Qe+nY9XaKXdV01fBqqT4bIrwi06OHRl1SEBGUCM90l/NjbT6JaVMTgNGO\nWHQIX/T+GkATKcqf5EQyr/lWrAOBssOntxM/ri3LIKdoDgi/cI4v8KEZJHl7\n59/Ag+v0lroO332YiQ1X/WuqGbBOKZpiI3yP1EorFiNkQ35yHM9V40Jjt4Mz\nIkgh5QiPRvo0JHtWvTcQlaBhL1m3yBceUHhOQ3aQP5NC5+dSVgHGeFIO8544\nfJ5GdK8jWH0FxvF+78Gt3rAqz1P3F3YApNj5VEiTOvMeSHYOLO3TOtJ3Wi9O\nFADkacBdS6Man5mmNfGdm9ijQmb+rK0ABLguo714YGY3Ybx9dgg1EW1bMi1b\nCHdPq1mb+xIW2QIj2deWNs4qgrFtqNctcCYbW0DPSZR5Sfl8OriWT+RhoWgS\nofj8mJ1heMSimXVl7QV+4MBF80iCb+/VOKIWqGQSHWjMj7gT3ZiHLI8gsC2J\nVq1nNaLlIjz5948zU3WYl/oBHH73IEGGtRz2Qd2KL12+MbeZzwdAo6XT81Ed\nmuN1ezJbZEVkD2GgOOwlmmD1eBCrXGTfwbEzM3NirJlMMPJOE6dy/fLlLON8\nWyoB\r\n=rRWz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7S8EFmiWjO50FhP47YYc/7/b/OqKQ6ceYXF19KDvW8AIhAN8KlBb4ljYT9eTPW1Mubzd8u8ehINWDugUrhEQUlChb"}]},"_npmUser":{"name":"taylorv","email":"brian.t.vann@gmail.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.21.0_1619827098471_0.8654009386439891"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.8f1e7e1b.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.8f1e7e1b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.8f1e7e1b.0","@material/mwc-textfield":"0.22.0-canary.8f1e7e1b.0","lit-element":"~2.4.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"346f8ec243ae13b28796324e6408721377829b39","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/346f8ec243ae13b28796324e6408721377829b39/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/346f8ec243ae13b28796324e6408721377829b39/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/346f8ec243ae13b28796324e6408721377829b39/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/346f8ec243ae13b28796324e6408721377829b39/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/346f8ec243ae13b28796324e6408721377829b39/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/346f8ec243ae13b28796324e6408721377829b39/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.8f1e7e1b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-kJ5IPCXPIkNfMpyt5ZTtSlRrhAJzEVUmvi6y+gRUjXt1Db3THJIfIEcS7nBC+htty6GbU0gKYATjiGHM4vVX9Q==","shasum":"f59a000c658707b44a8be4b19fd80e502d134ed2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.8f1e7e1b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJtRCRA9TVsSAnZWagAA8kkP/1N9ip2TxJIKmGBkFeDn\nUyT+GzGzmfR4jPSp7hVeKFkcwqG+aIucCxoKzOnpKaKw1UZgDrQoma5JjXYW\ny3JXz/9f4TqBcT5dInLuPEyYyrtgsi3NTfn2nGOFQ7NFe/eYFDGc3DzLpEPL\n1c145Qx+x2LGtNHVTlWX9NSuFvqN7ebf1GJUB5XUM23KpGD89gpB76t/3qz2\nuyZ93L1EORZlkZzVQiHzPJyfyifsUeoflT4sVxv7lzRxUW9lu89hle6qf/kG\nAlqi5F0wLrK0xokfpIXlGHowzW0J1ScXRxtEXSgslf/Z0bzEFCsY9VyUgYMh\nkUEqSasWi8C7rfVVxajiCOKWVIW+TdrkILOgZfcvcFDWMICuBh+759M2CaI4\nakXw4D2HA8aJD9gd24YHGOOtrbwUmx9K0YMCbpvPJ+RMKXpEG54rWyVPaBg9\nwBr+RsECNeuN2JYrPp5o8YQacRG6Cc/1RM1TkUFOvNTU8i4oIje7RrmMnSCf\n8YDQVh7aMoXg7Ml9mvoJWVMblbchJCavhPzM92iqRMhXGscbeywwFzjxCdcD\nKF+vALB+owSCugJAaCrJYH95f4Ygbw3+ehjFOucKIM62Ek3+hWzkZ4mTonQm\njBpDCvBvOF4fYj4gerWSM/CkN2zl8+ydOxRRKeclSym5fsa9eKD/R1divyKI\nqouf\r\n=yPYZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzzBiQ4EId/nCiD4UNiHi7+rPQkwglddEgHaN97QrhpAIgTDn7eS+s0XMoF3xl5XvxsmrfFGyRhAUQhwoj0Z+tVFI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.8f1e7e1b.0_1619827536905_0.31762625156432134"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.deb0e792.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.deb0e792.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.deb0e792.0","@material/mwc-textfield":"0.22.0-canary.deb0e792.0","lit-element":"~2.4.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"7b8ce494b86ceb69e799a5ec1a9f0148075d04be","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b8ce494b86ceb69e799a5ec1a9f0148075d04be/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b8ce494b86ceb69e799a5ec1a9f0148075d04be/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b8ce494b86ceb69e799a5ec1a9f0148075d04be/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b8ce494b86ceb69e799a5ec1a9f0148075d04be/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b8ce494b86ceb69e799a5ec1a9f0148075d04be/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7b8ce494b86ceb69e799a5ec1a9f0148075d04be/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.deb0e792.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-7qdiH4jq6r0ZuYm+8I3qwZHk+paBUuYDUnrtGOQgCPRb+sqnkfP4+9yF9qOT0p9HCvoNiFpedxdGWAPFrsOn0g==","shasum":"9d47cf63b2df63de8878e4669cc66519d9a369b2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.deb0e792.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkGxtCRA9TVsSAnZWagAAwvcQAJfU7zqC+Lk6WeKrnFVG\nRj0Q5UqiO90vwqq72aDZWh/Qx1FGvhYZ2Oc+DF5FbAAiBMgEclVFu+Th2Enq\nsFzX+cIIFhr4j5yvp6VsFXf09Bf4Txgi4PMacCUiqVvf+3x1zuF1lFmt/Y69\nVoFbbfs1kPfWmxBn2x+P+Q9rswwavsKJ7Tcp1Po4l5pmz+Ieyu3EnOPbDeiz\n+S5RoqalCc/N4Y3VvmdnZCTtSDK/KVQVzZnNgXqZfdgwAptNNPowunJkaj1q\nAv/TWbEtfNe+I1ry710XimsITgfAORlt929vEzACxmrsqI/4a4gzE4tMFdJ9\nFofaJ2EyFJnbeRUGYhyxuH0gjIMmuyDLULqnnmN3Vs/j3OY/lyJvnHNUrdnF\nFXspyFp/kh6/BaK0xK1g9JzOoPhmqK+NIlG14tdfEntyPtUAA0ZTMcLIVOgi\n9r5RhbZAEG/1sq2M+gfz/SE8F3xYJvkbVarK3vIeMVjn4sm6BvAw0KGwnMQa\n3C7VgChWs7IituqPRRoH8io+9YVvhevgtKRAocH7ChJlHNNy+2TNZNe1PpMS\n0klWzbeyPkMaaFfojkfWEu1L7H9HxWJhtW+7MVV8FoK/Pk9lSc2A4UjUNn6R\nCI7WYk3v/eTlwfcH68KJEHNV2TvzEujzrH3jqfHH9jnbuHdrhCi6qvBXT7do\nHnYw\r\n=t/tL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvrqRbp5ZzYkufDQRcGMMduLlX/C0NuAKHYnQh91j5PgIgORZfg+Sw9Qfpi7v0BnSVUh9U3U7Butrmj7JqS4CdTqY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.deb0e792.0_1620077677543_0.8559030059736703"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.a3ff615f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.a3ff615f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.a3ff615f.0","@material/mwc-textfield":"0.22.0-canary.a3ff615f.0","lit-element":"~2.4.0","lit-html":"^1.1.2","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"1e819eb3a7930649e9ccc58d69e42d7d17e022ea","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e819eb3a7930649e9ccc58d69e42d7d17e022ea/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e819eb3a7930649e9ccc58d69e42d7d17e022ea/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e819eb3a7930649e9ccc58d69e42d7d17e022ea/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e819eb3a7930649e9ccc58d69e42d7d17e022ea/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e819eb3a7930649e9ccc58d69e42d7d17e022ea/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1e819eb3a7930649e9ccc58d69e42d7d17e022ea/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.a3ff615f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-bBZMcxtIawCHE05Ac+K4I/cb8zWB0EaKrt8VFi/BQRm90Hkd7htl+3waDWiZk6GmezKJjV/Kubfj/eIIvp86Lg==","shasum":"b1cae6e817aeaa7e01756cb3b434dc1677e42654","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.a3ff615f.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkHpbCRA9TVsSAnZWagAArhUP/jkIqG34o1wkOZV6px2C\nWokuMVvsHI1AF6oOs6/I450t0x0KOLD5tDd5Hwd4MO2sMhUSMn2DHtOt9fKf\nSlgwHAhQT3Co6kO4MGMRESmxgx65tWSrbDmfyv7JC/K6pYEp3Slbm3LlkRUX\nV5TMhHXF2crH5iiaeAgsK3v45AgtVTslAKsBCkZNcY27ckUOcIZJJ53QxNzr\ngAJzi4jUrPGI/PnGAccphBH+15Shjrt5N/IDVgbXhWBq8KeXTmxgUzDNypCM\n+3z1o6BDVN2JLuEy48vArD9UmmQzKeAveDPtTsxwaUeJdFrJ1zOCUrp4kORL\nuXw5luU6H2wvcexyfaTdnGs+U61C7RoPdA2zK+MSKSLYtUz5fpQmdEtSIihX\n0/iVnPc4gwcPSyvCARRPhlUKamHkgUmWAK4luz3N2naUVFGb+WI/9fDpKe7V\nrD988zWJh6HBGXl248xB8iAxKG6Xmg49rBpGmJkEgcWkmpcPSZeP21mFAmga\ndSeunsHf+fi6LgZU1tOiiJNPUhsO0eCE/3wkZpmqiIe++KTt6J+lkQay+WPi\nzzDsvpPJHQBpLQBeuApH4ZKHqt9q8GD7aGZ0N4MWWvlifaYgGxDaIHcYa1go\nyuCrI8+opaKuwIUDr6yq8c82IVnZoO6nZoWWCawaS99vNhgFYnYvie53za2H\n0yJq\r\n=YNLU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwoMlRoZ14qAS0l8owc60er7tBeBN2+0+zKRe2tRur5AiEAv1a2+cRPgonTDUU2igP8wtyLnORD9F+prcSsw8rr9F0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.a3ff615f.0_1620081242651_0.43911125807983686"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.948ccfb5.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.948ccfb5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.948ccfb5.0","@material/mwc-textfield":"0.22.0-canary.948ccfb5.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"1dd7576742ede6b9f763d391eaebd31ce501ea16","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dd7576742ede6b9f763d391eaebd31ce501ea16/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dd7576742ede6b9f763d391eaebd31ce501ea16/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dd7576742ede6b9f763d391eaebd31ce501ea16/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dd7576742ede6b9f763d391eaebd31ce501ea16/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dd7576742ede6b9f763d391eaebd31ce501ea16/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1dd7576742ede6b9f763d391eaebd31ce501ea16/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.948ccfb5.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-uGSitl4TPbZVW+ZAk5jyEg9YuMNMdZSrQEhK76l672AA//U5L3EaiYAtV4iOYp9a/l0Pvs+r+89GBc9OE7Myhw==","shasum":"7c368ffb6b23a56ae29ff3055e1b94b5a6b6e418","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.948ccfb5.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkJEUCRA9TVsSAnZWagAAUXQP/idp0hdTS73ppY/TlFKi\nVjD0NFNEVSskbxBJQDplZTw+jtO8tKYpBWlnLMRaUmIO7e5Qpq5imPiWzs3B\n25y8mNrW8nZjZIl11li7IX9F6U8zarIkg3Ta+s7K+fYHx0MW0ODHJ7Bm+Dyl\nuuXF9UOj/AHHX4AXETz2AU38FzmNCs4+7gy55+d/gz2uXvXc696RlpMYcq4+\nBfrfQDaEvPl7FqBDQX5RPMgWqM6J6aTj5AQFvXvhuqVSWOlTB3vDRE8g1mAl\nd4lPiyvNGmdqX1mDgj/VG58ariRqI9EZ2WtC93WoUF4Hlv+UbLuXEAEI5dNs\naAuyBZve4XOMYW0ov7wTDH7Rz0PXg8JnPFGt/cOuZPho5ay8TZ367mc6I08e\nQmUjeym0vhXoOx2IeEX7etUDSy+jw8GV5w2IlLlMVa6lN2rW+M2nPFNVZkMJ\nuPYYqKVLGlVLijtiXGBE4yc7Deo7gKzCwJ1bJuK39+f3eT3764jY/iS/wm0K\nIQLyfspBcmE8bCN5tJVABU2UltUbPr1MzDfkdMyFbSGbweOzHf8It2HgD4CK\n8yqK5jRGMGMvveKcY2/vhS0KLRh1e2D1mA/FQPgXiUrgCZmFr6fygaCq9Bj4\nkFLlI1Q/uAUtNEcHNqwp/PQQKuiqj4QzsYeXL2hG/Ig5auAtnjT6jiWoUfXS\n8K7S\r\n=yYih\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCesf8jFjtmcMpG0eTaf6fTETSrcc20n20AcWV2b29upwIgKQitMi0uEpEzzvkmy8a5XMCTERomBEYgf+GScn5ujro="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.948ccfb5.0_1620087059602_0.1072155766760563"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.9f8337d7.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.9f8337d7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.9f8337d7.0","@material/mwc-textfield":"0.22.0-canary.9f8337d7.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"c25dd9ae2c04ae380f41705f23786ddbcbe29456","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c25dd9ae2c04ae380f41705f23786ddbcbe29456/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c25dd9ae2c04ae380f41705f23786ddbcbe29456/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c25dd9ae2c04ae380f41705f23786ddbcbe29456/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c25dd9ae2c04ae380f41705f23786ddbcbe29456/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c25dd9ae2c04ae380f41705f23786ddbcbe29456/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c25dd9ae2c04ae380f41705f23786ddbcbe29456/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.9f8337d7.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-dhtxLolCXgg0mpOGb8T9dfVbGflFypkxBDCknPoBTaTz5Ntq3jA7tVZZto6eUiHqYrVmZXG/8/mYNewX5ERYDQ==","shasum":"61f570be26549c0f4a6df6f2c671822a1a13a3b5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.9f8337d7.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkZRgCRA9TVsSAnZWagAAg+gP/0FRzHglADGfSpcTvYXP\nenFWC4it8jckBvTybA5pppYeCXHgQdyhxk8i0fZmRzapMo9y/p+HgvStqjeu\nP57EhonmfmIQNGpS406v/GLTxfa8DDod3cvqeURGsLnr5nmDtthgbpq2PsO3\n/9mXJJthUzBerUGFlcCcRkGV2CKB4lNc4AMqqCv+N8vXc5TyjyOAygz69vwg\n2yPeVkY0ov0lg41SBj1b+sWgD5ZPnz4+ZndmxSJXOfoDV9BOoyEIvD5vIc9p\nfsXisDvBLZxcg5WZIzJb3khBbpIypOGHgPshvJUmc2aeWkm0La+sP/pF7p9B\nUjzYjiBxKwByqluu4sgFoL5LPrnoeT3HMQkhnAB+bpXWlDQ6CRZe4/PUeLNi\nuCcVMy6V972d8p+hDGobzj/zUBk7TccsZ63ARXRc/swtD1rabVIKmQ7YLb6I\n8wKCrObzsMHGz04/CxeeDDZFS6aKcfDAW1F7qX9YgJUnTBJJvLkCDjjEODha\nYkVxzf9oOQs84CbJ5sbQ5p8Etj7m6obV5YDXA9ZLwivl2h0n28w8VQ42KHYB\nWQlDtGwpTuazz+6IqvXa4cT0prreTbGdjr8RzaXknTIf5mByYH6SPlJP9ZZp\nM1d+tD3XC/hrAjm1SmLEr5EdcIMfLWGhL/tlRmVcXLzdJF0H5Rhzx8kl7JVv\n1d0b\r\n=m/s0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYiEM2s+rKhvZNc5dixNA+W0bC7loksm/Xg1e5iJwHLQIhAMoAdzEkhxqdi4IuiQhql1sPsoppuTW6IqALC4N1MFoy"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.9f8337d7.0_1620153439670_0.11851653528448969"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.5813480a.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.5813480a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.5813480a.0","@material/mwc-textfield":"0.22.0-canary.5813480a.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"293298dc0704d114f85fd245f98ee8f21a3ea348","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/293298dc0704d114f85fd245f98ee8f21a3ea348/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/293298dc0704d114f85fd245f98ee8f21a3ea348/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/293298dc0704d114f85fd245f98ee8f21a3ea348/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/293298dc0704d114f85fd245f98ee8f21a3ea348/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/293298dc0704d114f85fd245f98ee8f21a3ea348/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/293298dc0704d114f85fd245f98ee8f21a3ea348/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.5813480a.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-USlF2wnip68Mx6TaA+73B2GZx4J06Vs9Xfb0eavfWC0WtjMxTIAd0sWyFU0Czp3tDQnLwayZ7X6/ab2Q57cUgw==","shasum":"9696487eb6f034f88af65a7ea469cacf1525a645","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.5813480a.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkuMtCRA9TVsSAnZWagAASsMP/RJY63n8Xvb3TZBzNez6\niLbdqhMsjnpBh0/k9fqQ/bSq9mqZL7YnTxi9QwBRXyG5ZHm4aNkhxLmY/wsg\nUHPFwOVZQRcayahcuTW0iBJ9DFazIefe+XmHd/q5E3wmNhO0BkkJtdWpjp7t\nF2LRPr0ljLwxHfqBbgL29w+fTn1YJQXTh6OuxC00EalDqjJ9UYDeFlNXaQh8\nWUMxupgkP2HR5kCdAC+xNWk5RPRLm/fYFBORFARq9Jx3ebiWR2hxRqGabKKZ\n8jDvH32I/eysNQOHuIBoRwXXA60eipyQbVC5MA5/TKpwB/km7+IMMOI37WVi\nmzIYyoSQY2q0u6BHv2/DLI1xKnS8EMg8AD02aX0ruD0bkvwBdglhGVBBNlJh\nLlpA43gbhnhjjm/obzCQLVzksieAY/ku9wmlX9TTA4cFO99G8F+t5IZz5bXz\n7qq8n908C8QClxFHe60ppDxOsmteazWT7QuK+rSKrQtn0/bsoRtQAYnmZYyo\n4cqY3otr1Eh/0CrdfXsNyL5HwW1GRBwUsRJMN0v8nukzYiasHzm5KrVtEazm\nkiBoXzyCWCqNzKRooBAqG74bzqF1FStn6XQnv8vKUDjz1MWYwQFr2gsl/JGg\nLZAqjshFnbbRBceMeVujmJlgdVLZPcAK25se99FU453ENtVLlT0fHrSbZe6l\nVjCo\r\n=LeHd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC69JS5S6lrSaUHq371g7w706jAT11wIVba6iCbK7ogGQIhAPo7FVgm0x/PBapr2pTV2Zogai6vL6DY1StJEOAX3lB+"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.5813480a.0_1620239149263_0.9610308931697988"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.ab7fc1bf.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.ab7fc1bf.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.ab7fc1bf.0","@material/mwc-textfield":"0.22.0-canary.ab7fc1bf.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"9aaddda989be6b623f728abc86d48adf169d6f69","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9aaddda989be6b623f728abc86d48adf169d6f69/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9aaddda989be6b623f728abc86d48adf169d6f69/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9aaddda989be6b623f728abc86d48adf169d6f69/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9aaddda989be6b623f728abc86d48adf169d6f69/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9aaddda989be6b623f728abc86d48adf169d6f69/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9aaddda989be6b623f728abc86d48adf169d6f69/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.ab7fc1bf.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-FP95PXI2VJWVyhtjbIliS9/9EAWF9qf7vlsQwwqUlZHzrsixwHj6wb6HHAomNPaZX99IPBL6bq5lApOvEZAycQ==","shasum":"9ca14c540c2a56276b3df16873f2a5ce5dbdfbd1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.ab7fc1bf.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglC6SCRA9TVsSAnZWagAAmnQP/i2Iahr3cxvl9yb8Cm+u\nQjsANMu+gYtsT0omcGWyj2tj3SYTHudGWMyZb/MzlJCSDYRWUeS1iVFwaibm\n1nnc7VJDaAI15W0rHaBBH/6HxlgIZrGfI6/p+5nJAzCLfOPrYpUqfeiSd59w\nuT9xGUTxs4sZFok0cR7jOv7fe1GvVP5ZFp4a0xw4zqHgmbLZFuHFee04H835\nWJElQnKNyke18vZN4zzafBf7bFt3ZthNzlS3i2PagyM5oPSECWpfblrxKCAM\nvjvUzzCwsjsaZ0xHtW4NvrJJaUIX0ESM6pqkUMqQa+CZMrwwznNLoc5WivED\nc89wGmEf23ocABuc4YlLmw2+9qRiC/KymxkfLdLfTvkdUWQkecS78nU0sgBv\nHLD2yC4nj3nzLVsPIeeXDSqOhFXxcoqOmzXMkrwfEbaEdAR6yCCIbKAjbpxX\nYJB+CZik9hUr8jZO+HyVCJRCzxCEaOqZOXBa7AZX4JVAyxJIaKiUAq1g8Iq5\nH451czEeCKiNzdoczzicqDjmhPLZW6adCLPEtNcw2LrA/9dIm26NTPB5vS2t\njKYHtQPeuisC9EEO8o/RWdnHpIM5WwPkBvHxbEe0gnE5IJ44d+9xFZ6EfBxJ\n+W2sbPVctY4aRAQmjq6BBXOy4w344rX8fhzOKXw1LDFm/ctgNNk9EQusaiZq\n7xwe\r\n=E+wH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAs/5IJ7PcP8vkWABik/AIHyrf7RB/u84O3BPlP1plK7AiBDqPHW77/9N6A0fisxjgFQvpcDoXB5tsX2T/ZNoxcVeQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.ab7fc1bf.0_1620323986225_0.48442342907110447"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.25693d60.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.25693d60.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.25693d60.0","@material/mwc-textfield":"0.22.0-canary.25693d60.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"89015755bc4d93aab59cd46274331e3a6c467896","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89015755bc4d93aab59cd46274331e3a6c467896/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89015755bc4d93aab59cd46274331e3a6c467896/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89015755bc4d93aab59cd46274331e3a6c467896/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89015755bc4d93aab59cd46274331e3a6c467896/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89015755bc4d93aab59cd46274331e3a6c467896/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/89015755bc4d93aab59cd46274331e3a6c467896/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.25693d60.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-vZvo3A7aDuwmluIUcDsN6eeeL3U7d0eal+Dap2sggl1Ak1IMG7bCA3u85JVZlBIHbpV+uQK/nulAR7BspKK6SQ==","shasum":"9a85b06bb8a614d2f01c6bb24f592a3be752503b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.25693d60.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglbeHCRA9TVsSAnZWagAA3CUQAJdxBpQK/bjNNa029+cT\n/MJY4B6p0dvQmWt9G0n4Ck2T5flph8d3x4+dB0Cd5OBFRQgYJZhkEWRhFU25\niUr5D2E7NHdXBk1prvA6rI1CbYCPIe32xQtZ+CUEWeo1o731fyvOVOB9/cUF\n56Q1bvN3bZl+OohydzrYVmwGbIX/OIslPICw6jBShTq6CTStRy5HXR47PnWw\n+sTmGcKsnFEOHHM7pfKlujB6mtf/TEOJSw3nDjM+js0MD1FGBqziAn/oazl7\nAfQbGJ+MwqP8M3SmckgMNubM4XdqlgGQ5WBCrPBbhDfkFm7MwsfK3vQ3WHzz\nULWJ3jxO07lzuQWeUF8iLrm2Plozapll3hjwUAHy/XvNYiLF6NRpyQXhvmi2\nMEXoW2WMRzTz0kCa4+EyLV8Q/nNJAPgoVkCjDjn4r3qsGcqqlA9SF+wGcksO\ndqMTMcJ58a9zh8zNgw2cK2dhJA/Qhw79HdUE2Na/e3V9/y0EuiM3h5bAr4Oo\noDbBkKR8sEby/OkfVeZIq+/e3MtNcZ7v5RwGMoyIwb9fNkMSN3ODQ4zjkCQl\nh1bWjXpO5kaAPaOIFOrpHrHRKMoEujnzCE2DjnTVrr6K8RCDQzxht35Of9zj\n938XPaVHBKsqqfSRm7xwRbfEytGP81rrmqG2xKrqqo1aPbqeBK9SvaPEdEFl\nsnjR\r\n=+wfC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMa4V5j6qKq1FWb+07JIH2ZQA9hdTk2bbsm8d5BcIUGwIgB3NX/MrSv16slYQzaebG17oIBbpcS38FM7JHzsZHYNM="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.25693d60.0_1620424582507_0.2346471551233935"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.c497962b.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.c497962b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.c497962b.0","@material/mwc-textfield":"0.22.0-canary.c497962b.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"be15d892a32bdf28e42617b44e38b301b0ea590c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be15d892a32bdf28e42617b44e38b301b0ea590c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be15d892a32bdf28e42617b44e38b301b0ea590c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be15d892a32bdf28e42617b44e38b301b0ea590c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be15d892a32bdf28e42617b44e38b301b0ea590c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be15d892a32bdf28e42617b44e38b301b0ea590c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be15d892a32bdf28e42617b44e38b301b0ea590c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.c497962b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-NA3oC8Jg9sn4QUjyZ4tDyGQamUXShMiT8sD2ZBPi+lLu8/npkwFI/ARy8doW3wWCXPXRTf5R+NU+C2/rxzTV5g==","shasum":"09e4f695a9c7dfa9a4289c678703b4ff95353aa8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.c497962b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglb0eCRA9TVsSAnZWagAAbRQP/At31JU/dIhFBu4E++Wn\naSycZdcFN6o5a+UteRsjDIzQbnnU/OUNVGTOWl9SbWaGyHPLa3LCDtmFPf0t\nYkaREaPa+OtS9DopMW27kvQTBP+Dxq0/l7AjAJfpqtSrez3yQ67bUDrlcYIe\noZD0wpZNTNk2ilvw/J1KAPAOFi3023oxoAeqV09EX2P8IMmC4t954obWXS9r\nvuqMJeyKbZnjV5VL/n7miXUG560hf3vyc6ILSBX/gViY0CM7BIFzqS1/oZGO\nDxxhIeS11qflox4mzSIoWeLZRdMQHVKXoFvLzN8/JPuU9Uw5LV/uza/vJJX2\nAd85yHFVhMVLiQ/s9YMvKVQp26CGyL8dTWK0+dTzKYWBZi8RCNejY+UH4ahj\nJR6zcrnOSg4W364N7a+dFG8V8b+pp2VmT80DkjxxZqTExIt//+UgYXBHZZMm\nu+7Kc5ADv7zFg/wRxs20cFYCfgIVvhjQhC2toO0YOnObS9d2ilEw4JC4+1wY\nbAsqqavweGDfHcJUdyUBeCN6mFbQ4J5odspVrCYtPcTxwciYUhDisBllguBz\nYfBhQBEVr/ROCiSXMX3DybUhvUdkVvy5+ANHPtbrsQrr1TNhfrkzwTNub4rj\nGIhB3Ul0BwcICse9h0Ce0Wb2E3LJVtUMhZADjYq+hj9V71b1GvPbjjoy1tnu\njgZQ\r\n=B/VL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEl1BIPnhqxbH1wcdJN4dw39+3SGkr9pGc4USxMRtVwRAiAbThonx6f/9+EOb1qK/peeCMtorNkuAL59w7Tu/n5I8Q=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.c497962b.0_1620426013941_0.5012411360133238"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.e300688e.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.e300688e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.e300688e.0","@material/mwc-textfield":"0.22.0-canary.e300688e.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"94ee5e4aa5987e14fc749785fef3b65b73185c74","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/94ee5e4aa5987e14fc749785fef3b65b73185c74/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/94ee5e4aa5987e14fc749785fef3b65b73185c74/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/94ee5e4aa5987e14fc749785fef3b65b73185c74/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/94ee5e4aa5987e14fc749785fef3b65b73185c74/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/94ee5e4aa5987e14fc749785fef3b65b73185c74/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/94ee5e4aa5987e14fc749785fef3b65b73185c74/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.e300688e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-sCpUvHeNZfwrRZEfoQmU73TzQcEfpVTJsOte6zYcjxXi+YZajcGcn2Lj5wd/dqMzHkrTxfD5esjlC/E+MEvsCw==","shasum":"e1e5c98cd722d73207e44c2cc2e262cb3187ec88","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.e300688e.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglb4sCRA9TVsSAnZWagAAK0UP/AymoEok/DdLtb4Zl4bF\nr1ActeO2B+hAxa98vLN/Vyr38sK+l6yhsio589O0loYaYo87wJPrNuFWfm5r\nU57oWbu1IzQuHjbaNDIT1Y+s/b8seEF4RpVqCI931xtHUpqS8nPghBbcbGyj\nnIA5GO+ttyasAJWJ47+V4ipcefaE3rw5/6DsAdsyW2g2J+9STGJnMZUZEVKx\nLBG1JzeTDYvYK7FVVAfut1zU8Vh4GoMd8Zf7ZsC/bj/eWbTIJA30f6sEBrf4\nYiG3Y62JxaTYF3t5pv2YSG8qkhaygn3dVP/9Ppbe80gSvi+yK/z/ZVg1nV0T\ntaYPyXNzJC8LK7vcA0+te8eb3iGFNRAsxBzMQlvJ/q5Wtp2tDKx5/BmRv0/Q\n+7587bh81d6ah1rPOeVb7/XIluXNUbmEiFdJN6ZmWG6aR5o1UVvjbRGeCANI\n+tJtGyAQVI+by2AOOW/RhOiszC3gXtM8U3uRXKzFA5i8TL/L/bvdF+vqrcDM\nwDj9klXWGdI7vL4VifoX1Ng12OrghP+fn1qWyTLOOxKiHaVFQZFLvxBJpAef\nnwnrWS5u8R5A8HGL/6uASCX07kdFnVw8VfsGGRdi5luaoybmuGmIxTsC98CR\ndIMr1jCIoKy78v23YyEDbpxjzAG1W3musg6cAAfmKwZALX5bs8KXMBJOwK62\n7zpR\r\n=4r5R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyY7fxZlGOHwzIFuWJPKTgp4Nj4M2RkaKwexXcgpMzJwIgKgzFFOmZSwhc/IOBA9DCHCFvHN7Kb/4+mk1i1WzDMnY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.e300688e.0_1620426283946_0.02111312501207574"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.d70287f2.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.d70287f2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.d70287f2.0","@material/mwc-textfield":"0.22.0-canary.d70287f2.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"17a229885fc92f311534b89a9df6549e9b78c204","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/17a229885fc92f311534b89a9df6549e9b78c204/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/17a229885fc92f311534b89a9df6549e9b78c204/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/17a229885fc92f311534b89a9df6549e9b78c204/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/17a229885fc92f311534b89a9df6549e9b78c204/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/17a229885fc92f311534b89a9df6549e9b78c204/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/17a229885fc92f311534b89a9df6549e9b78c204/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.d70287f2.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Ch8ZSO2skrRZee0d/dbgq7unkIOLXf9LKbR34p/Vc3DaaGp1jbLVceujoFP+sYWc2wDM7StckcKht+TcgWWkpA==","shasum":"6d111d4b7abcd17c703f7a2d3952b919ae346fab","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.d70287f2.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmYmnCRA9TVsSAnZWagAAC18P/2gtVAAMTqNnSm5uJDCz\nTISVV7445yqWR0gL2PywDygKNPVATkPjL6dbLiRT6Dk/oPL05q0pC5xVe4Y2\nyEHH+bLCn3jJqn/6+KejcErWoQGJCRyil0cHLDRnE9drbkE+tfkZt3QT4Ukd\ndNB1eT7PCELA98Kf2xehhjXCzw1KDDzOKXmmUizQId6uDlPoUOQHEb8QS1Mj\nQSo4ZfsD/Fc0T1eMZen92uYsz9cDBHYUmyr4Y4SHF1b5AIQg/hFAgyP8p//b\nah8oVydNahJGaz//G/uLC2gNlubyz71OxyhUSHH1Vfeq8JGxXM232M2NRi/y\nb4alL1XCjBNdF8an/U120h/+eAhN5hLGXoeSK5TAWQC4iJ77tDqclDECRbbI\n9fAQjRNWE4LCDKkrFYvnBu11VsFbahsSCfevGgefXZIteMgBk652Xm/cwV6u\ndXS6+4k+u7k5i99mR7jKHc1n2BacN5jCGXeYrH9UKKF2Ax3lP6OXscvFlh/w\nU92mrBdddYFZJon0pmKLZwO+vIZdp494O57F4yfCoqnHLJtHp1EhvMVoOKnt\nj3IRH7shhS0ALTmYaKfqkfRXxnKzC12MoTCwH9hA8y8ROT5/Lzq55XkI14u2\n7qC5cqyA9zrpZIM4CmZIbkJLfWV0VfgC1copAQ1gRmFCNqti0Ls3VILPONEt\nIK2H\r\n=CvDR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdJQe4U5s5kU17wsa5JfAX7UGwc7jOeARzk2uUrtkMYgIhANuuLYZ+IBEKGp4Cf8VMFy9ddJsrDdJMmfMbbPow8Cgi"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.d70287f2.0_1620674983549_0.8248134912976108"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.02e841b2.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.02e841b2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.02e841b2.0","@material/mwc-textfield":"0.22.0-canary.02e841b2.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"10f49288fa74318f178daebc0299b7da22137eae","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/10f49288fa74318f178daebc0299b7da22137eae/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/10f49288fa74318f178daebc0299b7da22137eae/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/10f49288fa74318f178daebc0299b7da22137eae/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/10f49288fa74318f178daebc0299b7da22137eae/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/10f49288fa74318f178daebc0299b7da22137eae/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/10f49288fa74318f178daebc0299b7da22137eae/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.02e841b2.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-YNh3XJrZYVBzKzMuNsoWTE55MxA1m9McmoTqtyct2aIxHY/UZMNVYU+e1NlWKMlr0gz8YHMltzPnSQHEzjTvMQ==","shasum":"0d0e3480c09d094073c047e4cbcd9a8349851a71","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.02e841b2.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmZjuCRA9TVsSAnZWagAAcX0P+wdjrtBLM1cbFrsJt3uS\njklH36iYVjKf2DEAuGJ/6e4Wq66KGeLnmZsaQodUfA7ImdBiaMJAZ6igNTog\nFREIOb7vQNyr+p70PR74e3egfqCul4888Gq1SeFc5jFOAcqTGS2ohSzu+A4h\nKlbr6IaMqxd6fEmAzAe4QW2jzDXpYhtOs2uZ92fgwRRRRf5vmWbVCduD0Z3N\nZhuvc0nzjSroMOHqr1TbdqQDnA2cdm9gqd8iIZRIy95YMUo47T1R1/Yz3mCW\ngT8cqV/BboLXwlprM5BRs8RnQnwdtoWTDgk3D/GgmZkJET1OskEHob/K0HK8\njsyuHuqHRAWefA5eHsM7+rqJGQontbQ+SRuI+KiwlSuOKEeiubRwnUgXkG9s\nAh2J4737pffURSzq19toBltXp00QRLywSX2VOUWe1nC6NZ/8nievtT6RRz6q\nDynP1lHSkLv282w47H3yLQkhneG6wVKDuVpsRm6B40I9NXqT2XrLFSN34EEx\nSBPHi8IPxQlGUy3g/5GnNLBkiKBFbMBE2rogTex+r9dVEgtOGMb/ttw3p/Bf\nZgZsNHap1ND/ceyXfi/79OTdOr72ztnrpwhXPSk4PdmQCvw3Z3snzQYkWGA9\nLRQoVNN6ZIRtS6crpA7/zcqUeJ8gIIxJtMc0RkW0EDztTbzToT0xA7grQZdl\nwcGK\r\n=Xlip\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAg1I2SFxRwe8OVlwFc+qeOSGj92lwuVpqPDs33EAVibAiEAxTg6xtCHc8uBjg8wUgPOcrvBHXmz/i0/0H68cDa2Mck="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.02e841b2.0_1620678894156_0.6375393817971347"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.badda2f0.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.badda2f0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.badda2f0.0","@material/mwc-textfield":"0.22.0-canary.badda2f0.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"961b6b76093a7229e8b8672e9dba3c2f9af0e61b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/961b6b76093a7229e8b8672e9dba3c2f9af0e61b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/961b6b76093a7229e8b8672e9dba3c2f9af0e61b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/961b6b76093a7229e8b8672e9dba3c2f9af0e61b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/961b6b76093a7229e8b8672e9dba3c2f9af0e61b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/961b6b76093a7229e8b8672e9dba3c2f9af0e61b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/961b6b76093a7229e8b8672e9dba3c2f9af0e61b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.badda2f0.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-uQUHOEZMtWReTh5mOtnKZTH9l1qxV1tELUrUe6QHFtB3NlF4gIhcwHZevjcaZPT60N7nlb3sgv2BCQzsjDPe7Q==","shasum":"4f0b60eddaaf296642786333377fc04be20b3134","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.badda2f0.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmdE0CRA9TVsSAnZWagAA7y4P/2OUMAwXe5JvDPhA9GeR\n2KSBTp1ohfpAFT56gIedCdwvJtaK0CO4oxJVs+tDge28Qiqa2CY+scnCwwA7\n4/1JZcJNKaCRFNW6We9boEXdWzu47q3jnCIpgAiElKKbiz1AVR0xNNv1ryn2\nB5hbwtGgH9cySSrhlIju9ASAfM+AhYcOayaWrLdh+8nAbtHC+hu1CtMxz/lU\nbA5Dcl3+3DYvb5Bk5YIpmyErlnbYfIgKNzQdtt987/HFJZT+eVYpM0Oca0oI\nI7WEG0kis0BvQ4ADQ9IVDrsNHPDJARLUZ2qAlDaiV65I9YsWd3cu06Qk1H95\nGNBifPrjBMalw9JLE+2zOXDJSmBsClNUPCtR/g9cGFYCfJyRrLVXz2sODkJ1\nqDmbUIKRWEDjpfeqVFgkbl5xXErKTfVXeEeqjh6453HH4ZVexw5IA/OO6hB3\nbQdULu8ybA9L3+hdJZBnxAuKcOQTv4WoF5UT42+/kOtRP8KxPNucLm/Y5TKg\n1SWmgAsOGEGGLvyirwEeTaZnjp1RE41raMi0s7toAT8TLXFST24QaBC36DMj\n6RSjN7FNOzvipVMpkCf2qdNenAehUUZsNmR5K/1xI7dtNKMTsQirS3RZRdji\nN92peAQdLpppdS7N37OR5aw66MBWFD9zON+3CbvAk/ZqtufOFgy/cXIlQpAK\nqutm\r\n=QYU0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2elTCGIzFR4r+zYxpa8q6NNEVEap+N9J6t+HXmmZnUwIgK7uChVkEO3iXtgN16gWN9ryJnE6H/megmlqy47cgYJ8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.badda2f0.0_1620693300363_0.1870432883913411"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.004aca62.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.004aca62.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.004aca62.0","@material/mwc-textfield":"0.22.0-canary.004aca62.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"3c20c30c670567ff3483811cc2d47a795de96151","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c20c30c670567ff3483811cc2d47a795de96151/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c20c30c670567ff3483811cc2d47a795de96151/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c20c30c670567ff3483811cc2d47a795de96151/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c20c30c670567ff3483811cc2d47a795de96151/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c20c30c670567ff3483811cc2d47a795de96151/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3c20c30c670567ff3483811cc2d47a795de96151/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.004aca62.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-eTKk5HKLdnFG+Pe5jKuta52NX3nk8HsHXpsi4iGE8fiA4+CyvtuO1IhKw93gpPtdyXINGiqL+8mRGFSR7tUBpw==","shasum":"f0ed190d62097c7757082ecd6d4f1fd38060e8fa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.004aca62.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmsexCRA9TVsSAnZWagAApgEQAJRYVq68Ukvbzey2M4KM\ns0TT7q7rPDGbxgJt6cRtvclc0RhLvH8uXtGdDu+q57zvVkU/WNpMDHQ+n9aT\nwsByNI8aSLdTs+AUJb6+x6+7MxkgscxYtd+Gb0ZRbcmsXR9qZOZWm7fy9wjj\nGhScwJMOQ+p2piz/5o0Va3HhXTRpE2vFFToqFPd4SegiQHsDVZF2xK6L7kbA\nJY0coNNmS384TvlIID5vzJSLEIboSnz8+6HY78CMgJdrwGnnEB/toV0I1vaw\n9ncBQhFUQ9ITJSz55fGo0VMim2Lg6DIaDiK+bFAN96rsDRy8P7kJOFzaVAGJ\nxqHDG870CWg4v0uRnQvLYVg1LkjomH2Q9SBAyROcDx2w4usvBdlB3G/ighbF\nufWtW/LqSYNbaaA9cdwIEKakSR4mvOwfJcGbDugKHwZZiVBH9kt4yCEVGEVD\nDOt2G9eUjwTbXso8ZtAKFiWm5NIIFtI5yaefFiCVj4c3ROtVvoN1qwsqGNft\n39V+gmqcPQ8GVRELxjGNzKIBl3by8QXJMNd8ysqzwpxFcDDwwC4Eb1xdJxtH\n7+i0GWd+hYqnOBTRm9o8JKQeaFoqG4mP45uNI7tUtKwoKWMYVpNh8OWr0MyA\nnWkzdu4EymTqoafZYcrrEPBZxW+qevOaAUDAgV1pRFRfSpNs1rGlnEsWqsMA\nbToc\r\n=jo0X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7DcJ9MdXXmIEz1PYVn74ez+NV4pHYz5e2cZTXxyM0iAiBOFc+SsThzUt/R4bH2nB1KAtQ2mAKu415phZpcjtf3Sg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.004aca62.0_1620756400822_0.7473963331042903"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.4af17446.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.4af17446.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.4af17446.0","@material/mwc-textfield":"0.22.0-canary.4af17446.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8065f1d05fae5a2ca4f95b50302cd5d56d43ea4b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.4af17446.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-zDpkt21GcKBq9TzLdkelSp/izehCgeDD8MvGf+M48LNKXQkuNM/Fj1ZnOJJEFSbbMTuR7cyiWnDFqW3ly7/mkg==","shasum":"0c214e478134d09d77c4893e6d13d6f532453fbb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.4af17446.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmtEICRA9TVsSAnZWagAA3rUP/RUa+HJF3gRhjaU5H9Q6\nVQJvEZsZZhWg4TK1HFayxjMw01RjIwapNTOY9oaihMlUopyxTTqNdQAHGU6B\n/vqlrKF21foCkYcX9Sd6NaZhtsupS4htMtp5hgyxoo7xXgr0Kn362FJSo6rV\nN3HgSFACvCbS1BtMKhAPxGO6gKuq0A6EiKaN9zhUzyne3hESpaTi8nptSxZH\n9I5HJiFaW7U18/Tct1dYsKB7VroZ6EnzqnW2JofFTuq3452c61mxi9rx4qVa\nJaORd9SnYkq8cAU3KWUuZLE4PcsMfycrfVvkaJ2z3fezNzTmubgRAX3rSJx5\nBunT3A1QJ2y21xNIEmAasVFNNu80gxcFqSpRt6WUHmW5qOM/5Q1TOJJHyYlI\nhnFDqGBuBRgJz549cCN5DQcBP9OlqQBUH4MbzI6+NW00drKESaz9LA+sAxJU\nafQu0l/iH9u4Dlp0T8jpZT92GWFXWw0iboz4IxcCSGqZ8ImhB6W2BR1QdG/T\nutfHckqiF8lKtGpXbEsAO+t888F5p/iDVhDfCn5SfqRtB8UCkij+/7tM9Ati\njU5MBtXaqX1rNFg1k1QwwiUl3+cd+lUnHfXk7ILyjSFlUUlT328IdaXoF95W\n7yV/c/DvOiko/oh+Ho7r1C+t4ibjeWyuySCTqfpv43doPrtJChrcicCV+rcZ\ngrHr\r\n=H3Za\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+nuryV+N6xxZ2JL1M7FBBD3fFRJfwOBz3TWt2PI7HDAiEAxauQkWtOkcbCu1sn+38JCi8sfTI8UAugXZBXqi+jkEY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.4af17446.0_1620758791592_0.8922270370352214"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b94d7187.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b94d7187.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b94d7187.0","@material/mwc-textfield":"0.22.0-canary.b94d7187.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"0b32af6d751df8cf58980e7badd64494f9396b00","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b32af6d751df8cf58980e7badd64494f9396b00/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b32af6d751df8cf58980e7badd64494f9396b00/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b32af6d751df8cf58980e7badd64494f9396b00/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b32af6d751df8cf58980e7badd64494f9396b00/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b32af6d751df8cf58980e7badd64494f9396b00/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b32af6d751df8cf58980e7badd64494f9396b00/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b94d7187.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Yz6fgWcMQo3o4iiq6fzlYIMRSYanSTp1NWw3CgqzB1nFRkNOeYbEnjnFUSIbvMwmL6RZw4po/vrN2clKO2JZhQ==","shasum":"1b2e0acc74af6ca1ce3e4db564e6479080ef3d74","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b94d7187.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmtJQCRA9TVsSAnZWagAAOjUP/jSMsoRjarylRj/TiiZc\nRul5RkbAwMSAYf4MsdRKv1zg9DObNgkgET2GYl358L5BCy08/JtATZer3M2D\nkt/Swo+cKrsi8fy9g6eJObD0V7duoJ73L9a03ygo+y7aut4bCJHv/Kr5mcl2\npaNx5uZ+2wlaW6pYjPXgxbG/vph+xq4Z1cZ+RCcEis7PL2PQHUjbNVYMArEC\nsItR0oPLSqBMgyJAV5SK6vZQdoPtM3/vEgkGsJLWbpwO31VprPui3bwLus3L\nywjliTVl5VQdyTbbKrUk7LF4DUaf382rVWg9DhUO5PXV3asdf8m4Og8DozE2\nWESWZqQHuohlM/4NkXeaZzrY/5QhYRzPeN4TzQr1aF5vS9TFT62Csb1voDw5\nNLqP4+wyz8pWjR745Yy85Qvhbe9QTSkWxKfJ5v9n3Hfd/qdzDR7r3tCNNmwz\n306wwjRn3RH3J8E0uVU3EdVpugYcDqddJ9x0Kohv67lhVZiNb4TMm5LyHx1Y\nmjvaMNLI+b07rOm2raLZ2AuwNBHCY1tQvPxHU/Svc9Ieid65KZfrjdn0qXVa\n5yQn1QLeaHdLOrm0XcW2RifneZNoudwwDUFJTVEo3GFVHmC0QjpDMg+G2/Z0\nA6VS3xmALxabDgXeUPl3cKTFcSXBFy4cy0c3pwXXFC6/CB8DdfYiZ8PhG/tr\n5PUP\r\n=aeHM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnoSyaRT0e+SZBtkm4eKFMr/oukqMhr741GInFmwXvBAiEAjdFl0LmJpYEhK/aPxqYeUkKRvEprxbn3BX9q1rmkhz0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b94d7187.0_1620759120526_0.005143865344797494"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.4021b2f9.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.4021b2f9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.4021b2f9.0","@material/mwc-textfield":"0.22.0-canary.4021b2f9.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"535a4442352f807e1f7e655d0a135c6d12906ed7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/535a4442352f807e1f7e655d0a135c6d12906ed7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/535a4442352f807e1f7e655d0a135c6d12906ed7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/535a4442352f807e1f7e655d0a135c6d12906ed7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/535a4442352f807e1f7e655d0a135c6d12906ed7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/535a4442352f807e1f7e655d0a135c6d12906ed7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/535a4442352f807e1f7e655d0a135c6d12906ed7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.4021b2f9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-z/YGjH2WodJXyMAV7/4F/GACNBwCSN6H1FaTPsVl0yWnrSZo7dr0QyUKbHfgY2gXC2u5FDrYQpxPtBaR+EYGjQ==","shasum":"2d4bc0676aa8ed4a7fdb9891607cea70aea0ff5b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.4021b2f9.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnFAZCRA9TVsSAnZWagAAIsgP/33gQfjyx4qMmDAujJIE\nB2XUjwEwva+WcVIk6uKrWpbFgs7/0daJsCDf6fuQYgVzTwGZids9gjrbJ5/n\nvrG+oogUJh5BSx1ha8DMEo0OnwmhC/I5CclZtWUdjHl3M/oDZiyvPsGEyN3o\n+9q41Kt5xUKvAdHX+YVuL/kBXopW5nBBl2HN6xyOhblmNv30/3hdDMceXbhp\n9GK2H/V6sRjfTSZpW0VF7QA2bkzJTJz2w61FZcK/AcneRb6y/fVuM2x5SQ8N\nkSeqvj426m9fTC0PecbOCB73uxx+B+7AYzh7FSnKteK0Qoen8U0CRjF+4Tit\ndUVnQUqF68d89v+GJKHKmry4S1MKf526oMjRsYzqR5eiQo0/m3c7XHd5aV3D\nSCWWmOcaKshZCWxeJ3q6Uc7dxxseOU+FitRY/vhavltla52jnzFndgSHR3MM\nTXRE4mYcaIzqTy1fhZuyWHXOUBlphGp4qDsycE32NzT0zwHX/x3bvXZFtWoc\n1LXyPkk0DsCkRyv7m0NBvMZowXpBFrOKnk7nMrEv2U+52NfpOhfoavfgg2Q2\n4uIIFv/+FJk4jOV9YnBW06WRetz2PNiT7j2e/k1a1y+UCadOv/LbICbXI/+t\nlJ7YzMhn75tNdDQU8OtCRDt2cyD6NOxgCH9ZTLMFhZPWgPi0QCyZTi4Yo3mm\nA85r\r\n=x+42\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFdtv2OYjK2/ArRf+5VIMb4u3AdmjLCfLe+KEVVloeDZAiEArsyxB8xC91aJmL4A8aAUz6GOBKSnKBaxiydhjrL+8qo="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.4021b2f9.0_1620856857572_0.11472377158696534"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.6a5956a3.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.6a5956a3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.6a5956a3.0","@material/mwc-textfield":"0.22.0-canary.6a5956a3.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"1164d783391049aa2ff9412e519af87df40b5406","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1164d783391049aa2ff9412e519af87df40b5406/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1164d783391049aa2ff9412e519af87df40b5406/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1164d783391049aa2ff9412e519af87df40b5406/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1164d783391049aa2ff9412e519af87df40b5406/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1164d783391049aa2ff9412e519af87df40b5406/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1164d783391049aa2ff9412e519af87df40b5406/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.6a5956a3.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-kPIZjAIUHEhFIVZ4up/dX+HVJxzJn71VgkkWDOJa3MUQXoupxO8g+JmvDuukDOVDcqH0ysTdaBHp6KUw24q/hw==","shasum":"98453c655a4ce03bc849315cc0ae40f4ad89d67a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.6a5956a3.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnFQLCRA9TVsSAnZWagAAlIIP+QAZVjkzyWaBpZUR8d24\n/GRet5wWlDcjkcv03YoGk6JBDOQ0ZLfN353YP2z1xUhcAycgBXVAadSQVofH\nbz8KjK1NMZNh/yD27yhYsOvnmFy2MU0PHsgedkyJbJPiOLkgAnq62D09GPB4\nYG4FssneU86R1mDYxmQNTdhuaySBrNUadyipsLow6Hy8+Q85mDcdVyGrms1i\nhRbLUL9qhqbIjJJknRBRCJMEXB6eSJH4ato5rNVgtx7oNWqQmCYL8n5xY43C\nwfsDL1g2e4+GTB1UfXlJ/ao6D8vXJ/xkpqz0cyHV0/XjLJ3sbQb1IvFyGIlW\njVggLrYA2tZoVyS2RkPht17ZEbNHDv6kf1183oV0Os3JSPUgcDGPiYP0Z1gb\nJxhZlY3nkunKi4LNW7ThUDPChCUkH47+WyClhgGF2NmT9cTdgi4ywIfcLlM2\nGSX54/S5Z4PBNUPD4Nabz+e1qZIbrx640UP9qWgYqPGHDl4bISN08Vkyl2Sk\nzZe3Ec6xwyTCNvbqg4xr18hv6CoZ3sWSLB4h1vnaaY/VbLy9UJCtDh7noPTX\nwrTfyo/bwWm7u0851m45FmOnrP5HC5/y+HP7l+LYygOypsW8+U3GF7wBUDUZ\nS5j2HbSqmKqfV/rPltpRd+AVmFd88MwsLz/VQcQUexRrgrPeJQX/huVoiWLO\nQQ6e\r\n=VCJT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG1E1qouvDp3QfGZ7nNbgr3SwxxTetWNYqs+QmgjlN2kAiEAtU3RDAlEbzJfWwoEWZftONMo3F78HaFRFh7xA5uvsiI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.6a5956a3.0_1620857866449_0.12201294795542328"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b6e8a74b.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b6e8a74b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b6e8a74b.0","@material/mwc-textfield":"0.22.0-canary.b6e8a74b.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"09c41b7e9637c49faa75e5ac84cc73c8bb5f80df","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/09c41b7e9637c49faa75e5ac84cc73c8bb5f80df/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/09c41b7e9637c49faa75e5ac84cc73c8bb5f80df/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/09c41b7e9637c49faa75e5ac84cc73c8bb5f80df/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/09c41b7e9637c49faa75e5ac84cc73c8bb5f80df/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/09c41b7e9637c49faa75e5ac84cc73c8bb5f80df/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/09c41b7e9637c49faa75e5ac84cc73c8bb5f80df/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b6e8a74b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-jGY8I/U7nJ4lkeA7tLygcmzqV2eNlxfUgnly4VbUfjahHbS9qmLUMJhdAzmRN+ctetVgSdR4WfItEuTkLZ+Pxg==","shasum":"80ee4d5802367da6d4fc40b9c02087b48a9c4424","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b6e8a74b.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnF7QCRA9TVsSAnZWagAAe1UQAIFtG+BwYeoSApYhzfwG\nf5LVOvzkIP/TEOUPtxAetLSX2GuQrx/fNlqw03a0ut7gW1/eIHL6yUMg/oG7\nNeDkL3WT30pOiveXwIA1ROFTN/9HA40xHneWHBrskruzxk0maScDXRsAIKik\n0O0BshiIIg22BOp+F2UPlpN5MI1zx8CseMpSnz1ccP1WCzzkLCHVKKCgHY0y\nz15j3Ch/zViWA8tIHJjW+21uR/mMDr7fEkWi7HifntNaF8a1ddtq2iSzZ/mg\nAhc9/3Vgsih6PtKHMa+kHaBYI4igDXBTmieWBlB73pU8tS+S5BxVnxgMpXjK\nlWqihg2SmDwqwjomgBtR86iM5CCXtNZKBcoNN6Xg2Z671GY1yo83BrYBPN2m\nx8TefQv3WH9Q8NJvcjRtVumREi9MjSjLRSlrLkRzv7frKNmnaXhB2FIvupH8\nB3cEN9N8+VroI3PiXbigyuCGNhM6YwbaECy/2DJl1tClriWh762P8kSTtLtL\nm21QYB9JTi5GZ8dxnt3VrhhmISYFn+VgwV51h9QQmxubuV/ZCMkUrp9TXzZB\nJuHyZpEI+w1Y+2BixDBa4Ebt0JTj+3rl+Pkctaa06IsDmrbKkgEpiXt9tvn7\n2PVk0nwujR3gMYBZfKPHErX6RvH2ODR3TTLTK2PPtWmwP7FHz9EQIJCaOePx\nVVfp\r\n=jPhS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD24bw+N6dSVj7G7/odDCu1/srBgIOGnaR8lBr4A3hFTQIgbPDgM24r+NyMgYtJy0ZE8CTQQnh0sCam62NDir1fOws="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b6e8a74b.0_1620860623750_0.9818272198317393"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.c94e1030.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.c94e1030.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.c94e1030.0","@material/mwc-textfield":"0.22.0-canary.c94e1030.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"01e4fa09129b5963d59405355762cbd1962f1198","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/01e4fa09129b5963d59405355762cbd1962f1198/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/01e4fa09129b5963d59405355762cbd1962f1198/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/01e4fa09129b5963d59405355762cbd1962f1198/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/01e4fa09129b5963d59405355762cbd1962f1198/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/01e4fa09129b5963d59405355762cbd1962f1198/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/01e4fa09129b5963d59405355762cbd1962f1198/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.c94e1030.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Ot4/TRB67EGOaoeUM3sYNK9aHlS9P8T7nz92kkoMmIRQxD/J+8NELqPPyVS269mmAQD05laLpC5c/mM8x5z3sg==","shasum":"ea355aa85a576b021f5ee922af49375f5a33b03d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.c94e1030.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnGAxCRA9TVsSAnZWagAASlcQAIiAlVDGT1X715pj0o/R\nKBoZrkwRiF0YxZlJnCCirmi4jFDvKqU1bHhvSySHWDejv+ceo4nTisUh+UTJ\nUDpMKz+BWkrterhv+jI9SZfmEN16JYsAo8QF1JqzMZWxiOMMy5+rvWUSQ0eP\nTOwj2LNqF80ua3XXuYU8/4c9RdimmdgCVViKaK59uQeHxok9Ut5MwQp+b7W1\nnNtN3cCDMbu32L7thvLsI0chZxsyvqI1f0fX0v4LPD4Koyru8gq9Xq2VQcVd\n8iPgzy/XY/ES7czc+BTL23CuFCVOCMntE/pcX/QMbugSDwWkx7IOQcyYstYv\ncFF1vSkL31eREbYXs/5madgEqbOR4OTXNZkD3eJsU1GHbLinE/XsbGYeU78h\nlumV38JkLPVSqsbc28xJVspVlCLnhFmM+b13rva5BiUqEf6sBNDstanYhgso\n3eTUQ9voy5/oDM6a1LT8lUUkbOb9qjCbLLhjOqu2xSolzNM1xZ/ZDyYs2yBZ\nW8Vy+JuroQeYiRiXwxtMzqmW01td0bAwdNNz9b55k56fdLLbdM3CAFY1O1Go\nz4xJzroTKHeQbUstUDpHUdSXRaIJK5SwpWMKVw1xE66ed6s+/YHyOyjcorfS\nZ4YuI6jnz7NvfBkLpVLrcOIwD6YICYAzXWvbQGNA5E+GQXhPUlWSYpglAeYN\nmm1p\r\n=Lh/M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRKBhCMacJgGcPE7yuunuOXsGMY9Zhf6OMklSSCx+q7wIgfDsyk0lfY6j3OApltGsdNu5uWhW+bMznVDH6gnRmkp4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.c94e1030.0_1620860977137_0.9001957341882507"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.40a34e35.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.40a34e35.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.40a34e35.0","@material/mwc-textfield":"0.22.0-canary.40a34e35.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"6cf3913b43a92723ad4d1144b964df3a8667ed7e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cf3913b43a92723ad4d1144b964df3a8667ed7e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cf3913b43a92723ad4d1144b964df3a8667ed7e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cf3913b43a92723ad4d1144b964df3a8667ed7e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cf3913b43a92723ad4d1144b964df3a8667ed7e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cf3913b43a92723ad4d1144b964df3a8667ed7e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cf3913b43a92723ad4d1144b964df3a8667ed7e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.40a34e35.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-0tEd1eB739Jg9uSNQp3TdYUiA2Qbqf7C0L1zSx50o7uCZWE3KWuvrDg6jRIpA6mWknhFBAFDclNyg4s6/v5nXg==","shasum":"0b642c8d558c60baf64d0e6663626dd602524fa2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.40a34e35.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnGu2CRA9TVsSAnZWagAAGDEP/itrHoSgJuuPXaMW9KMY\nDQ/t5MMmvSd6WmHZBpXzkVNEYC9aaQvbDmb8FE9wqKto2N6EjXeTQbPr2VF3\nbsfvYtAheC14VjpOr9eyGakj/YS+Dw/P6Z5NOS0bkBd9ndB8fpvhEQs1sbII\ngxi+lmHODOasCxC8zpRNXCiZuXymN/54wyct4d8n64Ayd8m2uc5FazfKJO8Q\nc4XepI50Uacn658C4GSQTB2WCSqM6Ndz8ilEzTc6ilYjJbsqBjtjn2iiQ83x\nONTPJyhH2dgcyCYMx2oM1NLSlmfzam1BhCuKF0GDqA1rO/KeBh6i3i56gGeh\nzsj4HS85QUZhqdkr0Ppk4eOkNQt9K3pdRUzUM8h0Wj063maNfv1lvg7SuFzR\nZR1I7Y1AHRk6QYMxPUcLZ654BMi/xobwt1A1Sjf0xllECAx7EJqX92SXB9Pz\nj1XXo61ehd+6KI4TmDDX6FDX/KDpMoWmK2jj47xe/08Fp2lSj/CECE9Mrkw2\n/Sc8FKh2S9FW6MGZ9h3668vuq7HTv7AN6MIwO5KiTmSR5QfQqESHZKQbjESq\nqylBZJDjmhXD5Qn5atAtaA/LDCj2460oKP7HN71f+MaP2CfEM6EPG2fv6xPC\nq788tJqXKcimpG3XEM5dfIVgTt8P2Id7pZHfsBasaH4F5qbfuk4NOGeRxNPP\nuqkA\r\n=iSJM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYN0Y2KcERJq8Tv3alsyI/6RrKNNx67EIFbbDQ9h/T5AiEA8UP080kJzl5OzIXpE5QFAowh4sMkiqkDrZNhIj6SNMQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.40a34e35.0_1620863925520_0.14908631666030958"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.1be14d2c.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.1be14d2c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.1be14d2c.0","@material/mwc-textfield":"0.22.0-canary.1be14d2c.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"2fcf49467ff2fdbb2ab4a987563f556e6ff316d6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fcf49467ff2fdbb2ab4a987563f556e6ff316d6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fcf49467ff2fdbb2ab4a987563f556e6ff316d6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fcf49467ff2fdbb2ab4a987563f556e6ff316d6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fcf49467ff2fdbb2ab4a987563f556e6ff316d6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fcf49467ff2fdbb2ab4a987563f556e6ff316d6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2fcf49467ff2fdbb2ab4a987563f556e6ff316d6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.1be14d2c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-tBQs1OeMSplZ0pNxScbdNzq93S0E46UNaNPAbKLPQft3l71aXLypAEJDiJMB6WUoAQDXUHC1ZwxJiwVDNXMuDw==","shasum":"4a48009dfea303c1911485f1bbcc6874ceb25f8e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.1be14d2c.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnWbmCRA9TVsSAnZWagAAF7kP/1MQ6+P6kHCkfSlSeC0C\nGaeQ6QXVrvwT/NLU0ClQyO6onUEP6YgfqF9L2Q8DVTXB2sT73eq7DsIOeOaJ\n5ibbMBpW8ZS7RylJJXTmdXde0crS5FU86s9RF3tPyizeNPTZBN91tprBtXWM\nrbJ61KY7/QMfJCvvBSm2UNfSN3mKcUfPzD7bo7Mzc2M0pZOTTcLfkYIkYAH0\nLDsm2OF/z4Q/eDoeWKILei01WkirGFIvctO10Vmi6Yutmg7ASz1v6PqX/hrX\nm5Q42x0ZRqq4QwSoA+FpOf5UIqB5pcCtGXyXXS5E+tEREJaeznZ1lr/3/KLQ\nqlzwLoKAdynZC+TznSikJaSQdEF4T60AO/mY6NDfZSVjnpnjsabOKgJV2nha\nyQ3+4K+3c3io3tSOgu8fhNWQkTcQk69GPLMpW8QvwIOeLVhN8GiJq+yVv9vA\nw2g3tzM/QDFxCzxgopIu2dhkHIeqEhHkqyzZ09lMi3uaQdCuAV3ouP1oHuss\nuQbvU7naNNnIukdnhXh0n/wPaFMrBuJAnbSefLGSbAWyhCaHRnZqzXa26jDa\nWPMFlrtraL8GAy8rOddvnhfQB8spSQdpVEu2T/Lfem8+5wOfrelv/MrHLT8r\nkMLU6VlSOnpyhkuZ4fFBcluiqXmlIr/haWCs21LcKO4hS8Tnal944L8buO2C\n/aDY\r\n=4t58\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvr2ff0S7+Gp1AyTavlcPLL/o8QB4MB1GujkXOxYDIMwIgLljtxvu6JvChyA+O+2j3+WLtlr/tVCC8Pels9Sy32SA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.1be14d2c.0_1620928229803_0.12062441414121006"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.87dbd64f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.87dbd64f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.87dbd64f.0","@material/mwc-textfield":"0.22.0-canary.87dbd64f.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"publishConfig":{"access":"public"},"gitHead":"5b6b91a042dd241b949278a5e56cf671221e6a5a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b6b91a042dd241b949278a5e56cf671221e6a5a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b6b91a042dd241b949278a5e56cf671221e6a5a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b6b91a042dd241b949278a5e56cf671221e6a5a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b6b91a042dd241b949278a5e56cf671221e6a5a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b6b91a042dd241b949278a5e56cf671221e6a5a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b6b91a042dd241b949278a5e56cf671221e6a5a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.87dbd64f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-9dannBN4Etx268mVGEbnJBNDh2HmjT8VckQ/YViuspJnJS7Ts+YO1KwwEstDxzfbvT5vnyCEhiiDQe8gKrKCwA==","shasum":"4861dd0b9861b783bfdf35f459fa1c42c8d5ba1e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.87dbd64f.0.tgz","fileCount":13,"unpackedSize":43184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnuSICRA9TVsSAnZWagAAj3cP/22a6R2U4zaPktjgsnb7\nbIxipxoyAWqopFDHqscBVvK/miw6o2AvGm2T2BLmzupweOvo0cCFEttbQ4xa\nbxYIyDYN5Z+9WCiCm3IVY4AY2ShJlQ1RlaXnCv+D7DjIp7LOPgPD0EzBqTYi\nfV4uktlo721QKRYzZ0jtNWz1PoXVCnXkW/fFk/hg4zKOmHrlG7wpH4Ph0Dx1\nn2oka8RpHW6t+IWwjLfMot+FtqYRblMhqX1Gx3oCcayjXKyFWnu34FQYzN3N\n5L8c9TSDg9ITKuHYLaRDcqXH/0NokwZb0VJdX5YeWB1V1au6SCoV7srcGeWf\nh9XnSPLy5oQPQmXrHlbD0VEdw8z3KLCpF7eiBi6/2/21ixHa7rMtIF7uvq5q\nCiE50OlVZmPMOgL2L9a7PORaBDXRI2OyLRAVhHB6QaIQWzfmsrwlqfCf8UMD\nGMUTHLJGrqIx9rk6aoR0rd49WS/owmhC110GRYoambD0Eqc3hWAFew3SRQFH\nVkXaz8Q6uHOVPRa9djPjYtzp8657zApENxuBCmcQDljKyJWYhRiMrr9s6rhb\nbKj3pZv22nIZF7Nmg19Pkhj/EnMPk2VpcyVyecNWFXG+smuaYvAQmsmZ7akv\nF03OggiKO0Cw4KmXKu6d6WfuhXSqZBuWlr2WsjHwX4ipzj6JSQL3qLlLBFyG\n2SrR\r\n=IIMk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJ7u1+eCjc0OOza360AF6UA3PjQjQAhytE3Idb1pIv5QIhAJZyFx1Fz0k1F+rRtoE7SxqSoCy3MsEMaSiTrUHjixNd"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.87dbd64f.0_1621025927821_0.24661638739673153"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.c452e4da.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.c452e4da.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.c452e4da.0","@material/mwc-textfield":"0.22.0-canary.c452e4da.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"30c4701f29e4afdbe58f6529e947eda655b1b1ea","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30c4701f29e4afdbe58f6529e947eda655b1b1ea/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30c4701f29e4afdbe58f6529e947eda655b1b1ea/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30c4701f29e4afdbe58f6529e947eda655b1b1ea/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30c4701f29e4afdbe58f6529e947eda655b1b1ea/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30c4701f29e4afdbe58f6529e947eda655b1b1ea/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/30c4701f29e4afdbe58f6529e947eda655b1b1ea/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.c452e4da.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-qXzBVhKJCU8CqJh6EdNF6NWcuBPugLTgSGFUwGGFRsbxezlOjzuD67Ev5VjuAOn3VVIGYz58GCS6dl8uqpoGxw==","shasum":"59b0da7d46b8dac4b8d525ab4c46fc266e9a84ab","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.c452e4da.0.tgz","fileCount":16,"unpackedSize":44073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgov0HCRA9TVsSAnZWagAAVMkP/1WhyPbo5Jud6yqTqmWu\n1mAs+Ig2OZiEyxj020hlRmM1C+y+n7O9KVHvxGcXm8MenMQ/sUr2sRSE9ALm\nhmxAYENTfyin3MkLc4wBUKXrRnWQDCSGbD+19fv7/4T1qAEBt12XVU7d2CrH\nvuxRWEcLD74dEPFcCYfZ2rPiglCL2+kR2WBBG2N1lk9I/4M7UzBn6lNZiz92\nhogc5iPCBHalFqid2rMxn/md0mDa4hKkCUqV7mBJZUvRzT2PiaMdkvEiILSV\nkzDMyaKtoj+NTxva1J51dXI6iIOJp7y6PJX26PpDWZ1YUSuTfvWJ3KzSyETZ\n8Zhl2tiAOGTtoenazmDlYuyv7bOwSKLTisTtq0okmjAHExHItUosBvqzcEDU\nI3Df8pF3SmwUveSdHTFnyQHokooAQUpWBDlyFA58YNzWWedsoB2qoZCnN45I\nb9Ep4fdi1uSfIfPp+Gy0jXmE/+nJOwAGHNdDt+QQt7r8S6truDn1jFc4Q4Tm\nbrirBx8SzJ0jJ1RHqMZD79UIwfG5tKHD0n55K2VxPQWVWI59eO52zi/h6e7k\nSyKm5iO1pY1JOtqhIM1QOvzm+EqKu/w0lR3gbheaydafTry35fv3/S9uYKC0\nynfV4Se6ukUpVnGHMyIlkO10IQowkhl5awDBfn2f12v6I3drRn1a5JtTaBQA\nWdO/\r\n=Won1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDds9rJxIEoom/aXBjCr0IUc90btGRXMVgtExLFIGyscAIhAI0d9VvY1KKp0WQkIoBLcadxcc7kKuV659BI0GnxnPY0"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.c452e4da.0_1621294342826_0.013265827291685461"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.2212691a.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.2212691a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.2212691a.0","@material/mwc-textfield":"0.22.0-canary.2212691a.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"8fba3dfbfa73868ebfc76e8070cb5d33921df0f8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fba3dfbfa73868ebfc76e8070cb5d33921df0f8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fba3dfbfa73868ebfc76e8070cb5d33921df0f8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fba3dfbfa73868ebfc76e8070cb5d33921df0f8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fba3dfbfa73868ebfc76e8070cb5d33921df0f8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fba3dfbfa73868ebfc76e8070cb5d33921df0f8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8fba3dfbfa73868ebfc76e8070cb5d33921df0f8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.2212691a.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-n1BxW1Aldp1vC2FiujF9hMbtOBJvffjnw9O6/tMF/ynJBLWywO5fupzaiNmjaOVQVztfQlzjWcs9+wYhxocCxQ==","shasum":"2bf5fa8fab10c50d82feba301bf627a1ddd38e22","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.2212691a.0.tgz","fileCount":16,"unpackedSize":40514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgowHgCRA9TVsSAnZWagAAhI4QAIdV5TGNTz2BgP8eM9I2\nmj2X5Xj8/QxvtbPEPVAFFymb0DgW8eQN6Ie0tnvckHjpCyr3U+jRIQetphAW\nve9tn/1VKxqi2IHXF+sTLidMSGByuhJyLeTl4lkNETDAiWafsPcB87RJ1Y4O\noGqq3+n/f1IlIUtbUB/BIPB6zkyls/hPr4h4TiXLtc9Q4tuQJy+33XBc2PO9\n+XC+nvYhglHMxyHF2Ks4wo4MO45aChd9ojIRjmpRnLaKJ7Q4sCKvWnX/icU5\nEvDdM+KxaPFnnaAw+TDGUGdvaJ8uO/sxeo8BuFUvWPicAfpE4c2xGfZSHdXN\n7lNuDdac1DY4Ltxig+yhflHA3Ny0BiEKya0FsVo7UcHp0+3UggTbF3660vdT\nwVn/wa3VS9eSIzLJP5Bil5zVRvqvfR8tA3H7YTOWnJeszip9gtOm/Rx29wtH\nU10J34ukKLR4b4XStZZWTWM8zOsru/wqfB4wNh7KqVD8dkRqQ6f/s1UsqvKR\nd73im0YLih6D6ZBFlR316MUhl8x9Bv5NaJxegAfGguOA69VUJiYV+QGjqpgF\nKtojLlQ8MwZJT0g8fVWztzNNYv/UQfYefbRH0cekzySYQoftc/jZTSZRxOPv\nzgy8chfCK/ynb4Uggvkxk7R7rHjlzAo/GsLTwE0vq0wx+D0N/9m5YyPjV3qk\n0xo+\r\n=506j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZaCUNTnmp7+aREHvcGK5WqBhNKkrWIDNerX4GzZK/BAiEAzBlzAD+WDB46q5pTOiVDQ4bTi5MU5woSml/irnefZlI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.2212691a.0_1621295583261_0.0074126331884096786"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.f748ff2f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.f748ff2f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.f748ff2f.0","@material/mwc-textfield":"0.22.0-canary.f748ff2f.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"a83c1c5ee60e398896831041769b5c22e19b4621","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a83c1c5ee60e398896831041769b5c22e19b4621/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a83c1c5ee60e398896831041769b5c22e19b4621/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a83c1c5ee60e398896831041769b5c22e19b4621/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a83c1c5ee60e398896831041769b5c22e19b4621/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a83c1c5ee60e398896831041769b5c22e19b4621/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a83c1c5ee60e398896831041769b5c22e19b4621/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.f748ff2f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-S29GnrDplO5dfn2/QGcJTNHqjeC/zKHh0+sspAu2fgZuHX1xZfHyjP5iIDQXguRC4h1xHMO2xJjzJidtygaxfw==","shasum":"9cc287bd0154590559d88b40d2890d2fe891df2d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.f748ff2f.0.tgz","fileCount":16,"unpackedSize":40518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgowjhCRA9TVsSAnZWagAA3csP/35pChLOo9iQYTaqj92y\nJKu+fpqHHiAmRyvBfgXIQHo3jD9vDtFUZBn4F2XQhtgq4opIjTO3ZT+nORFQ\nKP3Ox5u03IRUTeDQWfpuGx1wkAj8fk4r6+9NTl/rkuNkpK22ODyguirkWPAK\nVXp8kNb3jg9avloHv4cUfmnAr/BrR+PMPjcuKZe10kLyTAXSsP5xfPelAd9c\nppCwg1lGxCU1Z6JdKljZkG0/9JjF9HmiQ8D3EIF1y0FIjFFGPIcdn3U0TTid\nnPjljnev1++Vsb0PLk7lKB/Uh4Oz+fvTICrFwgz8RAkGnX1nkKNsOTEKfPjr\nNuvhIH2Ilpl2gzx/v5ejG9gxYt9bFqRaRy5jzXrY+haoPm14uDJ1VdnrD+/z\nTUXp+RH6LsowD6v6++IZzul+ugQyzjGy5mhtaLGEcCq+jZDDpAWG1jDehjEh\n5kew7N+BCqYkPOwHRjjKYLUPdvUgxBs57WM5oYlocmGHu4AHL+SPVuAZHPjS\nVQmyZAX9UybdROuzu/hlazATaWmfvXee029UZAynT+UqJBGQxBvY5qS5GtUP\nu6Ti2xoapuOaWe4+uw2UxK5t9snYG5lbE+kWdJ8r3pZZhi+Tm6bXQyML4XBo\nf+/B22e0ULF7xgznsAoq0cBqNAfaLn+fHM5W8owUXpNhiQijUwT3W1wMHjff\nQ8vU\r\n=8mgq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeX7WUWPljZ2WDKhSbZFF9CmT8wDiFN2KptHIelQjAogIhAK72eHWeseqnjRppVcugb/j7okkkubSyBGbUlZGJSqMQ"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.f748ff2f.0_1621297377201_0.7941926709496971"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.cc04657a.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.cc04657a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.cc04657a.0","@material/mwc-textfield":"0.22.0-canary.cc04657a.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b1fa7339fbd44ff5149f7f38e481e6b0b6fd048a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.cc04657a.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-jK6aLtWZBG1s1dLzGmz5Z+NLWp6uoF2nZ4OdbupUpdle1lB0yiolvqUCOuG0GjzL6M1GyRhpRgBr5+h2bs4rxA==","shasum":"7a08472b6e057b994a248cd97842fb6afb75a62f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.cc04657a.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoxafCRA9TVsSAnZWagAA2csP/2WbeuErAJwtrcAI6SSE\nUpfzZowqLD09u19ay2z6YB0Mq3FaPT2GUxloDLr7nMce88SoYYnKEJzzoH08\nK35xaYs7SHgG8iY59MXpn6+FvAvuAioU36jPXAC6QaNooDE/UPOpBsXxZpbb\na2TyzDasViVxZYiGnSnB9ASHhzxel8mFUVdVI9MK9gxX+DuJlsoGUYCUjaZZ\nYNsBbbB52fsw+/YL5P5+oKTx4NHOaSYdPuye7cA96y2hu7wR13tTZhYUbp1N\nHtyzPtnks9+zTgrHgYV8WK9k75+jjtvg45WUzdcE0MJa13iYuyOg/CWqIn+n\np7SEqEndIcv+AzGTt1UBI/4CeO/KOjXSZnxxsz5LH4MPMQyiK7DmUIDE7KeO\nVdXywmPoFT+mi0YLXCUT/MIIzSLhBpIWaJUm/a1PhKhkEN8SB1uVTD36Dlic\nRZ9QHTQjiZVA8BfXqtkE1F2pIT/mtFVpifJVcpeOBQaOt6u1nGL4ZWHYsRg5\nHMg4HQezZEbQleWG5cRO8BV0UGWxc/LjUK6VCNSmbaucr0jscIITFkFU84sC\nAXhECkgshjaTT8zyL13y3FHBAlc7h1BuFU2AVYSfWcNYfMAk/NlB1uDY9mw2\ndfgxqX9w8AMLRG3GArNu8mMbKPjKFIOGf3my4GUuamEm/KNNg07+eA/9yk16\n8aD8\r\n=Mm9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvtPNnQTjzClwmk3oQ4GnhB3OOV5ojLIrACwU7lbKdjgIgCCH6tssIuBu8b4HAsZ/eZ/Bb/yrDl5h+QZ14xVZ8ztU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.cc04657a.0_1621300895059_0.26561340440687675"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.3a3114fa.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.3a3114fa.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.3a3114fa.0","@material/mwc-textfield":"0.22.0-canary.3a3114fa.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"217bbc3c5105a7f3ed67d47f0169dc3b8269adc7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/217bbc3c5105a7f3ed67d47f0169dc3b8269adc7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/217bbc3c5105a7f3ed67d47f0169dc3b8269adc7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/217bbc3c5105a7f3ed67d47f0169dc3b8269adc7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/217bbc3c5105a7f3ed67d47f0169dc3b8269adc7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/217bbc3c5105a7f3ed67d47f0169dc3b8269adc7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/217bbc3c5105a7f3ed67d47f0169dc3b8269adc7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.3a3114fa.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-GcSVoAg7ok7acpp9jdswqDFAvGOSOQlqat8Ex5LqZk4VOdxRXzdaWMB+rydKtG9pHCYd7liqek99ginpnuh3oQ==","shasum":"d2a93552f6a64b1df5b11605130b83b9c6e42986","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.3a3114fa.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpaH0CRA9TVsSAnZWagAAqaMP/3PfUmfflwJ2oS3SXZoZ\ni2euDNVIVN+9sCPCMALTH9kBXIj4Fy7Fyf/dhaSYL47Yy4y36PndbjbGUFQh\nuuSRcM+dfFGZX6xJygK1uVtvbNcwl0UnTHD6vtcy83LxyFmSUd85ldme61fB\nR/4Dh1zBgn76Me3i0JJ5W7bdslJMiljn5pjzqq4gNfbPv+15PbA9vW9Wyedf\n73czx6JH6W9g0s037PbHianJGW8RsiFerHjbMLtYgJCHsX8+9nK5Osgo0dFn\n0AhGVitztfcpG6C0uo/wL8Ya4NMSMri4gQUVP4/ujsKQqRl0nyxSgQAX/auu\nTGlwxSFlYMYrGzauKgN1js0Do19GHwIR9ZIq6kSLS8XxTwqez7lmb6fMs1Zo\nUmhmKjugyT+ozNHq3yZ1CaM8aXcRaorOu6QayEfzL1yyYLqkEI9SVwx+1vAz\ndQl/uP7pEaU0AZMeta2VwtLWJ0btXh7tyY/0VGJ6WdnomO3PngOXIcceDw68\n6q0uIURTsAoDZi8Oqxb93s37zuMmyYSEb7x+276pSffQ0zp4RtqX8HL5sQcz\n8431VbLGiQ5SEavv2NX0d3Id+h6LimC7zWRoN5vip/lxMtikRmPDocdbAyQ/\nXujxI4R7M6KDlYcJt3B9Mi/LsnuNODaZQ8h2vELKM4DDnTRPn4r80CLb2TwD\nZ5qt\r\n=efJw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCpR5mFXE9s87hgLoE92FZo6WTBgw7zzj2hG6LqZjjwgIgNS+QlU5YgprriHyCFvp6AllupczhQZAr8+CbHL6KMCQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.3a3114fa.0_1621467636009_0.29625808118161046"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b46bdf83.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b46bdf83.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b46bdf83.0","@material/mwc-textfield":"0.22.0-canary.b46bdf83.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9095fd5cb7570c346d2093f1eb444f3035718920","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9095fd5cb7570c346d2093f1eb444f3035718920/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9095fd5cb7570c346d2093f1eb444f3035718920/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9095fd5cb7570c346d2093f1eb444f3035718920/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9095fd5cb7570c346d2093f1eb444f3035718920/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9095fd5cb7570c346d2093f1eb444f3035718920/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9095fd5cb7570c346d2093f1eb444f3035718920/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b46bdf83.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-1HAXYOS11drlj6og39qk9c5z1k8gz6xIZRJoR8qbs6tdRKcaYykLwSX4mLDLY3WC8XtRUtOfWRv1Khun48K3kg==","shasum":"66aa6788e7fd6ff39e3b7556b3a269a108bc70de","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b46bdf83.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpcCeCRA9TVsSAnZWagAAtFgP/0Hj0qySQ/6dMBmN3J8T\nfVa5gu5aqC3gYZgWiPblNz3DvLAiiBO3xYi++CVp1FfVwIq13Uhn2AbqYrr6\neoJCK3DTjceBPUE+7x9+lBV1UYk7lUCPgfx6u1NeNbYB6zztAmQDGOSntoBJ\nfrsls5i0Mn9whaa7ekZ+mzUEU+5AmYS0ZBmlzzSS4WuKDNT0yb89yEpPxTkl\nLQqwIVz/j7q/wBzN0R/VfMxV/kKB62r7kBhpgKI/UwPb/5d6kJKs08Pxk7iW\nps3jQg+yvw87kaImYXarLVSkZxx2D35zRbQ+YEiNXn17lSFuOD9lXltOANcV\nU7ch0Q7h5oA9Gf1MPb3vmVmbVJzusurbPlBjdNVaEyqVMeZdfKnVielX5+qO\ntFReOaz7nw8YZLcwGYKq7TmkZTu8vRWKf8YebSrDkG4jhxGVvsCGlClFzeUe\nxCa5+ppgbKk1RotTdEKonhPI400jTvYJJkOIFGjNMZnvdVDOtvIVlOQGVMVd\nQbAoOjcejXIvZa8DBjpjD7fYv3mb7+P/CMQOjcPvRwrHsWnSz3SlUIXOMphP\ngk4x56m+shXja2Q5mWUcpWT0/6qOkK8MbmxGLKLVT/xBF2UsS1MuRDOosg51\ng1u1yNCslwpxbxeXsay1DDKCBJmegPmN0Av6Ez0oFwLEAK3EPq68jHpiMvYg\nrdrs\r\n=8L9E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/VQehB2NrfFlk6+DdoEK5W2y1UMAPiMOeON4MMrQMKAIgDyWP7EUDZLWbaLN4J9Abc659NrimR+Liy9ccFqf8y60="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b46bdf83.0_1621475486115_0.07408249023335167"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b401a081.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b401a081.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b401a081.0","@material/mwc-textfield":"0.22.0-canary.b401a081.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"3f253eb320a1f9b9e236e2c6c0503900e63e2c6b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f253eb320a1f9b9e236e2c6c0503900e63e2c6b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f253eb320a1f9b9e236e2c6c0503900e63e2c6b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f253eb320a1f9b9e236e2c6c0503900e63e2c6b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f253eb320a1f9b9e236e2c6c0503900e63e2c6b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f253eb320a1f9b9e236e2c6c0503900e63e2c6b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f253eb320a1f9b9e236e2c6c0503900e63e2c6b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b401a081.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-15UUDRsSzc1YH5jA0qtcqhj4+RuPH/bkxsoaf4G2mSKKKlDfi+CTvryBHVNKpEPtVksvzSUz4/yUaHSshN2RXg==","shasum":"365c6544c79d846fe0dda53bfcd43bd15a3f0a6b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b401a081.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqEDwCRA9TVsSAnZWagAAEIEP/0scvnJ2CkJNJnpWwoqd\n3ysvOGJfEBngWqCYCK7pFXCkwzqhr3trVJdgtMx1vHmJS60b8QJufIw01w6w\ns1R0ehg3ZOsrMPhlmDPSJHGndnIzuc+HcndvW/hUwgGI2oAzNMPlhnzygT8c\np+ijxuteRchuq59/TFxnzW3ToIx/dQ1JR3NOXMZZV5KfIx0tRRiyzHN0Gapw\nwF27zstrN1Rxhm7mwZ4haB76hboPFH4C2eA34qQliiZIJKGXKBgliCDf8o/t\nvYMwhKvFyZhcvneiAmgiwYnIaSp9qlhj4C/Y5U02o0BfTRIIljJXjGEOQPzy\nJpi1wXsT7lAeUMnUA1sOReJ7tjZliCmk/+0jSguvPI6w1i5LYAq7bSAzD8Uz\n7wF0r16JhMb5+2KgDNVJCv+/irr1uRDvJmxwytEEd2Jx3y4vPUSExZ5wbG/f\nFToZ4jZmJzJushCGo2KNJ+xzANc60yVu4lY/yE4v7Q5Eo8lS1RR5mECTSnjN\ngvNqpnZGhLjPIf7Osh6IAeGerKkYcJiZYMFsaMWRMW0WQgiGh04oqh3FKqrk\nENjPHLneLscTo/Hc9p/W28WjLVV6zPvcBTEuOVVpxgL+rWxsgsiYpojpGaiD\nws+M+OzIWg+DHHt+1VtarKnBpMyatmC52uiKGNZs3PA9n3r6QrEwbBe53mhS\nmryR\r\n=YGLy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKib+CW5jor48HP54/RzoISUxbofrmb1695bK0CtcTHwIhAKWzSp4sCpZFNZ+lvSpKdSWjoInWHuM43IPxcGia9FFs"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b401a081.0_1621639408403_0.6122865557726609"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.012c8dc0.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.012c8dc0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.012c8dc0.0","@material/mwc-textfield":"0.22.0-canary.012c8dc0.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7a0952c38da1624fb6d0653e07cc5ebf284120f3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a0952c38da1624fb6d0653e07cc5ebf284120f3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a0952c38da1624fb6d0653e07cc5ebf284120f3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a0952c38da1624fb6d0653e07cc5ebf284120f3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a0952c38da1624fb6d0653e07cc5ebf284120f3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a0952c38da1624fb6d0653e07cc5ebf284120f3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7a0952c38da1624fb6d0653e07cc5ebf284120f3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.012c8dc0.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Ry+lwRUhb6ovRbLcO0jR/fjIWeNC4OWyIR707F1mDPjFErGkd7IrV22ks2IGkC2ESj0crmsTsNDhftRpELbV+g==","shasum":"3ff7b768ae9d1dc62b55481170e1c75ead8e2a4c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.012c8dc0.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqE1vCRA9TVsSAnZWagAAd6cP/iPdc1zCH2PMz+Y/K7YI\nOv2Mcs33vmo8LOSdaF46VhuwoopTnrdXAJz3NUkHOub7+5wewkdOABBxxl+V\nZ6ZQPeC0jIlj1N/NHRzfV1xtpl931+wFEtOac2OfjDRivNgTd73tGjk1cSED\nNLiyvPYlf4bWt60xM8qv+rTolR5756h3GkQ7eBKo2XEaEga34UQE06Z9zl88\n3GosVeEAJJqMnJWa3BN+Jn/JMscA2aDfMEFViG+vTMbWQK+AD6J3Bme59QqM\nsN5KsmGIdfmYX/027/0ZK+9L+v/t13P0w5kUB/6CfBMTtvAVcdREpCOz/JPi\nfa5ZYOHqhr/D19+DFhlmIG8Lk/VHV+K/AUtCcWJ93novxxqzjbcWIZ1EJikA\ncuaVCsVgg3i2akz0C9nQyDTL0cuxQ5ksFf7jVtjdmoXgVp5RjXMtRVyreDg6\nq8uVenRrniyeqOEPq7XGfSWBIErdmRc9+MbbpcRBXpx6CVeuOZBsSgZvG7yS\nRlaeFy4sKru23eSwvdHHh0iZIi4QQxls/NbO0J4uIDt7hxBFbGRwQj4v4PIj\nZwdRCBZsZzCAkI0sUp4a33WLo1IPoKS2HPJEsEO96Q6qkLKS4sZq5atzR/lF\nad1hbDh/hPm9+PaF33iu3FVJea+4Z/1yT5w2aQklHsLpQET1LZkqHx3NEBP5\n5NsD\r\n=MDRZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmahkYZ7EwDdSKuiMVC/Zcgr0S3iutIuI1Jvm1DF9nhAiBFKAVAHk1z0vmsml4SKmgdHDp5YoORJU2QNDXHTXzvwg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.012c8dc0.0_1621642606686_0.7406548983448018"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.e01a1731.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.e01a1731.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.e01a1731.0","@material/mwc-textfield":"0.22.0-canary.e01a1731.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"8afd20b0913094a1c3c1b084d0bec7d38724fa00","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8afd20b0913094a1c3c1b084d0bec7d38724fa00/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8afd20b0913094a1c3c1b084d0bec7d38724fa00/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8afd20b0913094a1c3c1b084d0bec7d38724fa00/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8afd20b0913094a1c3c1b084d0bec7d38724fa00/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8afd20b0913094a1c3c1b084d0bec7d38724fa00/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8afd20b0913094a1c3c1b084d0bec7d38724fa00/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.e01a1731.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-yeCKEioRD3lGs/4xkhhMc2danwEomtya0yWdHtF45jNFjQwsx8MbNLwRiUeTTURWiCNRZC0Mwf4YAGEKEB/Drg==","shasum":"606a14fc22ffac46dce3a3669894f6775270e081","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.e01a1731.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq85BCRA9TVsSAnZWagAAXfQP/ilz1+kNTaxVnCcQAqQJ\nseGzgclw2jsDP9sOzHLgaIqIdPmL1q7+ZgvJ/7l2LhARd5bIfcugLzBnnFH+\ntjB1qZe+rJ1qXSyNb2hj87JqTP0yr99t0/VxDsINdyb+ceZNACNteQF4LQNB\ntThDYwT+qu6QurCpVMlGvMb84ohSziT4dKNragI6gOhwX414kD+Die6LzU/t\ny00Fx0mQ0qlyzRhWXdRA0/3fNLzFGXeGlIfh3TUp7SFBh/StZCPLYMkEFdhS\n+SYR54RvpZLWqvvZ2LmoyjKusLn/Z9iid3SqbKNM6vfRw7nBizE/SYp8iWu9\nrAgzkr+NnWlgBfN7hLgqXNzcAfwIJUI4ctW/AmmxQ0K5SMmnk5iUudzliWcZ\n2lP3eMZw+NTcOaE0M6ND2sSXSAtxdwYqRsLzTtM/Ogy2b3oveQl6cQttFGp0\nRZ0eYQzK/ExQwKsSihWqG0g3DTQzLPIhrVqRk0bPvNrSpG2BzQRUuJ8338s/\noGWds2QklcB2v1JcJZUTpd1c6X7AhGlq71Fb5sgEmPBw3reQS0kbI17pkuDh\nGC6g9IqLolTGw+dPEKCBgPYSZ2QLOKAHpiiB86WxJNEBteGjr8Eky47/oyz2\nZDHf/GwS6yV8txTOo25esYRpA94PyocOSuBaaLtuyDjy6071gEnWf9LMYCOu\nZlL3\r\n=Xali\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFPIihixhHpkWDt7UicRSyJMGpz4VvAtm+7LLhQRtdagIgf7FdQLNZlHiN/tbVESbNFEFdWM6kk+8yNHDCDwZLeVs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.e01a1731.0_1621872192597_0.5689246932559153"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.59174b9f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.59174b9f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.59174b9f.0","@material/mwc-textfield":"0.22.0-canary.59174b9f.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7fb9171e05c85b1bf933cbbf66a44ff2e05e9e25/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.59174b9f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-bQyA8I2Hk1AS8hwRPE1wt+u9gWW51IwAbiCXrmBrkP1FomO1MRTfKixHz1FU+ZhmfcAsOjrFcsvo1BPjGKAFqg==","shasum":"16f31fc795a2c8b79f191e71587de58ec1f447a7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.59174b9f.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrTvECRA9TVsSAnZWagAAqq0P/3RF7InABQX8ctZwJVuA\n0JIvyywXL/2XvE6Lp7FNYB2j5DloO073AzNbfZrM4EUCrDZtrkqg16BCgAuk\nbXbg9HlbpVHF8TH1JF/6ydBdHwohIWzDlp1ZfDasmK4Gw5G+afVERaoWqAVs\nvBqVAtw8wCw74QK1khyNtYOdjiX1zXDstxO5Qr5G2LXf74BZFHLYWKog60oR\nedN47ggh7eDrMeY5Bo2LnHqTBSZ2+xdW+FAQGq24rPam2HXcpueimciQUibw\nZGopgdoMBhpSgK+VUkB3zDx5t8wG/e6KbuHyHdkWhPwJ1QqWFGnkz21UldKX\n9jfumMc8r8RxR/pujHZD/s/K7xlWA4jOnnUwIyEUZ229i9t0/naQt8XaEL2F\n8uGjIS5oRIUWDax5Be0VQybedC0KwY9v/fweHvzt2iYer853z5UIaZ/4dqpY\n+vJWROr5/nFEu2m24JG3Cy7dMEw4T8EC1nJosQeaLz6cAH7CbwCyG/kQl1VO\nUq6xGySZnqB3zqmmlSi0RCLzUEDSWD1lHgCj7FLuEMar0Hi3yAX558C/584C\ncaf6192CWTda68ktOYf88ZPb1t+4ReLVpeQSQMsDo1RdUf+PjGfmX3mj2y5G\ntlP6PmRKlRvaZdr+mZ2CfEUAAdlvOM6oMdX2/1CAP4K57RlHvBG1yXoMTHGa\nrBm3\r\n=1xgw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMYj1Jx0S8H+NTEA33e6EXvK2VFp31cpPO5GX8SB83iwIhAI1pCYkHJdsVYOEXzLWLulULqzsai/94MOIuOGwHzcFn"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.59174b9f.0_1621965763704_0.25866718202180894"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.c96cb2e0.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.c96cb2e0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.c96cb2e0.0","@material/mwc-textfield":"0.22.0-canary.c96cb2e0.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"516910ae9bfae62513b95080369ed2be100b1c27","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516910ae9bfae62513b95080369ed2be100b1c27/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516910ae9bfae62513b95080369ed2be100b1c27/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516910ae9bfae62513b95080369ed2be100b1c27/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516910ae9bfae62513b95080369ed2be100b1c27/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516910ae9bfae62513b95080369ed2be100b1c27/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/516910ae9bfae62513b95080369ed2be100b1c27/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.c96cb2e0.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-7lYLVJxcxLn/VsQXD9ZCakihwbSM+0jmQJ43gbKIZG7qalZEJzBOPlIPFt5VVzu6tQCdA30X9vAkquTyxcbydA==","shasum":"a4fb98cc4ca16abcaa35e83186fd718c3b1a2587","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.c96cb2e0.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrUwtCRA9TVsSAnZWagAAzNcP/RKPTbEjCNuaTZv3vMzD\ng3OcdrMOY+dpoKjXFBlbQI2rMuHaZZrDEjYGH7b5hKucfReqclhRvhs8Xedi\nTsw73VhTNKS0pVzZKDEygkRW2ZLy//ZfOul1T6Mv8BXRRtjE5ysHGSp5H4Gk\njJwH6gVreEehBQZlSUMtJZrmHzsSADPs5YFAQ7NnDDVZaK4IVPrObnATCi39\nC6uD+zneB+XXXb12EhAZ9cra5wjPwlcCHqjT83Ck4qZ6V5xsB7QS4jwWarT+\nexsn83mBpJg0COy2PaJtEKm53xm9ppOaE8JTgmTxEHGygIkhCMDmkv0DbFCK\njAXJmB5Rez6L+WQj5W+ZygSe2uG91uxzdDty/C0JnhqYY3nMDiELX79q0ZX3\ndxEf+j9/vmYQJVx19oRF4oTAZTtSy/1WAxqnsPlVP1cqN+Ra+6qJm2HM8rLf\nghftb63Y9TMqtwL3g3escE68AF7seAInYooKOh9/rg8Bjfwq93Ua0bLwlUYo\nMv3sacZu3zOM+n/vHbOm8rnCHmBcnzVbucKRHtE1IZwYDqRpmUQnH8XcLOGa\nkMr6WNjfnpRrn0TMNsaEs5cBaVAj+Uc8y/tfb54+DdbOXx+MwyAZBS+gF0ui\n3nLspRJd2ALjSglexxgVWjRtUcMZ6xw2Zi6VU5tHiewB56aLwEBgfyWrrVgM\nclkl\r\n=NDGT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClmcVL4/qkOjGuOugUW3NQ5PgNzatAzj/KA8Ip3P5dxAIhAPa00muop+ZSPwiu4g+OkAcDwesmnJjOMCQZv7HcKDCg"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.c96cb2e0.0_1621969964912_0.14925431016569113"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b9b0e330.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b9b0e330.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b9b0e330.0","@material/mwc-textfield":"0.22.0-canary.b9b0e330.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"18c2325baf4aba3a786f872ae497d8ee283800e0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18c2325baf4aba3a786f872ae497d8ee283800e0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18c2325baf4aba3a786f872ae497d8ee283800e0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18c2325baf4aba3a786f872ae497d8ee283800e0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18c2325baf4aba3a786f872ae497d8ee283800e0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18c2325baf4aba3a786f872ae497d8ee283800e0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/18c2325baf4aba3a786f872ae497d8ee283800e0/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b9b0e330.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-HNSlwRImBvFzJyi1nI7R3upz+LuTF4kDqB0ytVToDSY0vp/bMk9I8VDaBOToeG27D5Tl0nvJKIDE3J8U4BJopQ==","shasum":"69a988fd05be36772f50fda67c313bc6fd834265","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b9b0e330.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrWV/CRA9TVsSAnZWagAABS0P/RscyYdiwtj9UYhl5/eA\nIJLPfaFCwNyt3jbPiOvFSTrOaurDpLG4+3p4m5lyRFJqiBPPhPXz7kmspui4\niviEwB3mPyxyOfhDZgOhOnoaS4f1p2DPr7rN92WZTgAvJNlOarGS3d4wdSQ9\nJkmB6qrB/n7iWZzTJkG1sMUr+NtohX+Jtum+kyINE5CM0kbzYNb7NerVlLcN\ns6k/aKIBE5ZEzZa+qxE+HfaCJ2hjNaCtIhLYFYwxMfGRj/Wej0e48hCriWBK\nYGB2++kWZeJu/ugQPur2Q92GexVW3wGFHZ4hefxXAQmn4ddrVLiwSg/Pq9+1\nO5/NgJOcOgektzCdm1PMA++e6mJG0+/s89U6z1DCAQ+ZQ5UznIljuwQpnGbF\nPWquubfVcIm3XO/nktHaEO5+oYDlmvvWZr8X7iwJxItDInMKPuMQEk6fP+4Z\n+NkRLZgRnQIhflR9JEUogdYVc7ybnp5sWXoPbWLyuv8kfwiOgovPTReIxBw+\n3CUTm1gI3MvOndILuS8R+F/0u7RBDLWRgmhrIb6viUTyFLA0qLCFpLOgUTXT\nv/NoFRiZ9sJRCqxSq4jOTLmYY33X5NJC6PVyHXQKtKHrBfksPhpO/Qe3DVT+\nR6AAz00x4PqNqgK9vAyZB14IcPJ/XT5NIZMlMWP9diO/k+vp4rvSIVnppNn3\n7ez/\r\n=x0tq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkl3UvdnyiF6rzgbzrM3YYNer1SWO+F6HNEVT+rvI8BAiEAxbJtZ40F1dPRsUwsucCx+qB9NT9L5t9ITySlb5p8Kd4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b9b0e330.0_1621976446656_0.9500243175436545"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.ea2a8063.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.ea2a8063.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.ea2a8063.0","@material/mwc-textfield":"0.22.0-canary.ea2a8063.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0b10a1191b28a4155d8f169ab9a5a3003efd3fe5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b10a1191b28a4155d8f169ab9a5a3003efd3fe5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b10a1191b28a4155d8f169ab9a5a3003efd3fe5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b10a1191b28a4155d8f169ab9a5a3003efd3fe5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b10a1191b28a4155d8f169ab9a5a3003efd3fe5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b10a1191b28a4155d8f169ab9a5a3003efd3fe5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0b10a1191b28a4155d8f169ab9a5a3003efd3fe5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.ea2a8063.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-0u9l9/QtF4QXJCD1wPurXCQsICkIzAcmO7Zo//7DkoE/Cep0jJ9+8+WXj4K7ICyhlqRLRwOdHepwwL87i0PKpw==","shasum":"4614b1207bae6d319f8f4335ead486a6393aeba3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.ea2a8063.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrWa0CRA9TVsSAnZWagAAZj0QAJKmYC4Pun8AznwJAdrq\n+tmGPR4sM6x3gY6b9zQjfc4zTGmS4cDm6V/sS+uRfocRXwgMrrPSExzaLXnI\nGPawOoiWazlcz9zG8fqiAKLVmFTItLT4B5zfJEjTotOnHyNsPcZ4pWg7Y95V\nmV/UkIutzDRWrRAaGgLbXLc7pvZkznrx7jPC5XQPBjNd9EXqsT3ivPc5Uajg\nIzCr7IWQM9HfVzDmml84DRMgssEtVou7P0dRF1TM4RAt6Oz3FKcgBrTPn7Ju\nlIxEZbJshf8icHobo+0MfeLsH/xzOsE358U63DzMsZl/mk+Cu7OxJHNImy0e\nIEJ1AYHXeMnZOynlYWVCOMvrpXNvBgw3WlwT6jZJMsmbQI9ZktbAL8DgFKYH\n8yzoR6sWMhRYU0d2lFvUAKP+EaX9Wu5AJX82nF/DKdcJbPZAOxzw7NuVpI1P\n2XfMUFxaaXYCJaOd+3plzgvcpea8kVCrxOGUtR5JL/XPjzLbUfx8T1uD97bc\nJeiS6zXftH6i/5PgzmfEw376MFLfvIpNPi7/eod21dPD77GU8cJeK/tb0ZZt\nCOSwXvfPLtMg1kAT0Ms90NtrmXLgMZ/fltfbv7rsYK5frs2Iq7lTh+mi/mKS\nkNr7PCSqj9MjG68KRQjw4odHLHbfMb+a6GOMBjkwqSCqkEN/EA5xQjCdxJ8I\nNfOp\r\n=IDWK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0H+fyCMSU64doLZDpd54oDMCSWoyU+UPx+zq5i56HTgIhAJcmZtnsRaGDStr7epM3AzrUOcS25VVhEp12wcJ/ZdBE"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.ea2a8063.0_1621976755728_0.8599741754438812"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.60cd9178.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.60cd9178.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.60cd9178.0","@material/mwc-textfield":"0.22.0-canary.60cd9178.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b194465fb86d4af03f65ac72d9b8427df2a2e189","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b194465fb86d4af03f65ac72d9b8427df2a2e189/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b194465fb86d4af03f65ac72d9b8427df2a2e189/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b194465fb86d4af03f65ac72d9b8427df2a2e189/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b194465fb86d4af03f65ac72d9b8427df2a2e189/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b194465fb86d4af03f65ac72d9b8427df2a2e189/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b194465fb86d4af03f65ac72d9b8427df2a2e189/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.60cd9178.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-f2T++dRdZGJdc2hIe55XIrkXF7QBd8cRz2q7UjrZMt3XI0mqxOG0mgfYawTv/WlOUtu5IH3wmmn+PvOPmgreKg==","shasum":"41e31aaf86b3b79474efd9fced7a091674466022","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.60cd9178.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrYTRCRA9TVsSAnZWagAAXXEP/RJrx+qdl+G0fH8JbCCt\n8T1vROMTVK1skUfiy+NOCKYN6Ar1efU6oN4waE1ULdtHmgss55GCKMIegMQc\n5zA2vIDsSlZQVejUDt+dVGXKmDmDty2/mb0h4nGZIwjEMDJtBwMYlYpJxPPV\nbOQ0Qb4xT2ldy8ppDMRQSRVpAQFu/ZyAZv+r8GdZ8mC80OzDSmFOIPXIxkV/\ngL7fe50u5qZQH8wvPmVWyWsiDovt3gnkexsnZ0Tw67MZmW/UIqrakXQjnT/s\npGdN82bdcStgV38M7R4YX1B9FL57cLXvd1neKGIIqRg6YeVNzYk7oK0TusN5\nPHJ98wo6Sw5Y8l+BO6GLkcS7chkq0Jh8rpQOppPI5SLbK5v0//9kzUI4ztrw\nmLjR+RDbAHyLwehc9Sk7nuospg71ukRgXkqThAKoO6y7rWI8pCmilCPBmygV\nNKHP5LUDzxDIKHpPedx8BzPrvSddw+A6SnMZyQi2HKt5QZ4PLUW1Ei6ohDTv\nSoqIsl77NCq7Tm0yVXIbLL1XA1UU7CNbGNRoEjwJS3OL6RUeHLXo4Icyd7RV\nV5GIxXQJYf4VvqNQdg6y8FmCgqd+2GQ0j6v7msSo9FpZljDLviaBfCRcBSCb\nfeUp2M0HlfmDcN0/quNOVn0eVo6al+UdZv18awHO+2pwyL4AeCGDbdwCUWOl\nG4jp\r\n=FMaF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFtlZGTGs+qNhn3qtKBubY5jvizli+ZkZNZyoNOxTlGQIgWbZDoZ7hBH1Bl44M62RDOqWuw+SubgvFXGYxTPWGLzY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.60cd9178.0_1621984464802_0.17020180380930072"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.2e2c75f2.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.2e2c75f2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.2e2c75f2.0","@material/mwc-textfield":"0.22.0-canary.2e2c75f2.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7da0cb4191a309db2509b3bcff390b7ae8e4619a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7da0cb4191a309db2509b3bcff390b7ae8e4619a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7da0cb4191a309db2509b3bcff390b7ae8e4619a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7da0cb4191a309db2509b3bcff390b7ae8e4619a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7da0cb4191a309db2509b3bcff390b7ae8e4619a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7da0cb4191a309db2509b3bcff390b7ae8e4619a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7da0cb4191a309db2509b3bcff390b7ae8e4619a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.2e2c75f2.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-VpeE9ZlRvnwJp/bRSFxlDQKkPJyMkFkng//x5A+/ro4TM7lbuYsMUN+k97Ny/TivTsXeKmEymAXbZY94ff54rQ==","shasum":"b796309bec51d681d63922873b0821a5949eade3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.2e2c75f2.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrZJBCRA9TVsSAnZWagAAqUUP/R2ePZKvBmQWyILdeKds\nvqxcMYH+D8bzvyyoGnMZry4XbYX3uZDgkDsUZDw+hlbWhekCRGHD5YbeEBdS\npILaWkf3I3XEa8lwEQQ6SvqUPK7rQ2xviHt7q7UnwA5Egcp1Bc/4gipJ5ZV9\nH9WPGhw8FIfJJHCDEdhWM+mPJgdkPx+aHlhPA2BLLtFAf9MwVkiuIf1VxSu+\n0WomWPdNK0kmXWTJxuKrx1kUFOOdQ0/EvQfOdYBYQi/Vl+G5QQ7/LvvjzuSM\n9Xot8foy867igy9c+cQgDB6yPOOFU8zlxE+E4A2F95+ca/yQ54NwWQYrx5wW\nu5TvOzR/8ID0JwZSckMLQPo1ey1/pFZKRc+cnFNqiHSEsyIu8YBTJoIpYYWI\n2Cr5GDNRerlsuGsjSmwsbukcIuXYBWvWi1LfWeaofcSfEu8ivG2U+4qi2Jem\nlXZ6OCeU16/ln6saTKnRTBtgHXURt9bRzNLkHdDSt1CFQqutcexyULFQtD6E\nyZBN7dc8el1IQoDqwKoFX/DzBZneQ73hTiI1ieA7WXey+hWKj25xfH5nXswc\nS/St9r5CUtxBk5rgtaLP80WumximeqflmDyCrWdMpfsM9BdVWjrZA7BkHUs8\ntQNrq65XQ6zzHiHQ4RwiQka7ZKEniUkCuP0IRVG0EHRI1A5ooFkyxNxUWqbT\nawGq\r\n=TdVW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/fSDfIWtwou8qoyIxj+UK39eGJwt27OuMKfI/ALSsMAiEA16HiUt/VcCq+vBgDcPXttAFlHh7fai+FlbOqbMWkv1A="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.2e2c75f2.0_1621987904972_0.7477698426360293"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b99c77d5.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b99c77d5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b99c77d5.0","@material/mwc-textfield":"0.22.0-canary.b99c77d5.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5fda182a00532c3dce9d3841b88c80c56a8dc757","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fda182a00532c3dce9d3841b88c80c56a8dc757/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fda182a00532c3dce9d3841b88c80c56a8dc757/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fda182a00532c3dce9d3841b88c80c56a8dc757/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fda182a00532c3dce9d3841b88c80c56a8dc757/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fda182a00532c3dce9d3841b88c80c56a8dc757/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fda182a00532c3dce9d3841b88c80c56a8dc757/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b99c77d5.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-sk+Uliygg2gsserNFfjEzI/XDdGW6DGskbr2zCoqN3glJ+fwemWJN6cWxjwPglNbvrfENYw8bd5tC/LQtKEpeg==","shasum":"5f54a313bfbd35ad3d35f3b8f3d5007049b71179","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b99c77d5.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrp32CRA9TVsSAnZWagAA9/gQAKGntX/ZR88MriuYQf+Z\nRT2SXJfhs2ENth2ttuy51cbeRU/6naGuj5oI531F55ka1kAZrwlgSCFIebwB\nYAbTdckSip1a5dAFUUYV8L1NQkZn6bNHfEL8MLcQGDYBbQS6+R5xcIBVADXZ\n3p1dVchPjWkskdD0/meBAikB8zgdIJIK3QjLbej4gbU1zU229sWih3aRurZz\nzTCF7uF27SVZ6wEmWzzgUkC1tBzkWLpRmztBybE1n8mnMC5oz1riSlG7Ek3r\nmGvmDywJGRtxHyXbVhm9Fz+xFOkRg0rffKKCXkw+a9/Kb5rr9azQBDltDGA3\nzw4ZOZqnFoN1U1Sm/kQwQj7Je24vX3n6Bq1ZBh8hG1jIcVTL+kNdmwUyO3R3\nxzARWumgrJsFrF7C8TuQAFZi2jzEpou5dcyJi3D18yfXz430zY0fGeo2Ych1\nQ+QaNnE0Ahu93e+Gf7l0lD01W55Kp98kzaMZ919Et1bjvVSx0462ooK6KFGh\nm6Ej+8GBus3s/TeTU0KtA192vmMqVL7j1k6mN7J8v44G88k4RJ4Mzbci5uvg\n5SEzbureG5zn/8156qYRQxykcmvP+a2BVh1pKkcBlGxjKlpekMo14VE9Vcz4\nNbUyFIV65nSOpB0QrVmzYkROkmv/0Kjtlt4ufTgEeR098xf5TUViLmbQ43b1\nUeqZ\r\n=71cO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoYLO8hfYk0/z7Ez9+iTLvX51fV0U18WzMHrjU8DCJ8AiEA6gl4ZZcla4b2rG2nWy0iPlgYWG9BL66yDJgIvCjRVYI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b99c77d5.0_1622056437725_0.9392194530273184"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.0de82c12.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.0de82c12.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.0de82c12.0","@material/mwc-textfield":"0.22.0-canary.0de82c12.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"02037fe47532247fb8d3f160ce76eecc87a64963","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02037fe47532247fb8d3f160ce76eecc87a64963/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02037fe47532247fb8d3f160ce76eecc87a64963/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02037fe47532247fb8d3f160ce76eecc87a64963/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02037fe47532247fb8d3f160ce76eecc87a64963/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02037fe47532247fb8d3f160ce76eecc87a64963/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/02037fe47532247fb8d3f160ce76eecc87a64963/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.0de82c12.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-oz7TU9PNiX4bGSIVWELBYS5ObJwxE2TdyGC3rd10Wx0pcoAUrKKjoZCCz4Yba4ZGaLNW2oJG9avYhSy07sAUCw==","shasum":"aa31fd491840f5af900a4aeee0f65e73e993bc63","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.0de82c12.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrr4xCRA9TVsSAnZWagAAtLcP/1COi9rTHmapo5+t+Kt+\nswLhiqBU4BAAfSY6uBqkzkuNLL/82PJywSVJYZY1L7wJjK4OH/4eFHEnE5zC\nGWgziwaWDHK/Tz+abaegC83ZjBAYgmnPKz6eHgPxnhXWZoHowFXPCfW8EaAk\n9hiQVLN5nGCfsaj7GAKP6pgiUVE0RftjaF+vw3yHO+UiyoqpajZ65+VtSQy2\nOmZybyTnNHnqzpyooYRH+HU2xhOMz95mG3M0TMI3gid/tCTYdBabcRmka7SP\ndxQnq4qbl1Mn1sZlJ6sLyTbKXs9JbVRC4glwDWf4HCWRTGZpx/TrxmTtphTE\nSbwI0O7YsZ55AzITl5lH+iQPwe6ogVDooNSrDb/FAro2XZazTd1gB/SRT9/Z\no9+9/Cbhb1oWAB/jUF+6AsqPylDHTenCV/fxmrKA7a3BSfnfW8y2eb6UXUR9\nEweE7je1shi/71VpuyQKqPPeX0JUx8avSiXK6S0E5mAc/k0ezNy8mOlArt9T\n70VKv4vOx6+1Mx1l2HPBerfIsu29pCJ2Al49FqzS+E7MI+RoXcDBMlA+mw9d\nGmq7sso9+F+xB59zokwJgoHT+7LBqoAgylnIQHk4XQZ5mCM1pX2pf+mpPhU5\nixm+elAjfML7pI8xrmyYEDlgxo+XhmehAqZoqGxmnVtX85Wn1WCgYb7LnQmL\nTwUe\r\n=Td2z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTsMg7UPUTZp2I/BdsjAYyLsdG2K+TLjVNcp3Z12NNAAIgFP4iZ4t94q30ZvnLvb1E7yXBPt9WpoUkaAnYv1uC+Ss="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.0de82c12.0_1622064689076_0.3278630604206383"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.227a4614.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.227a4614.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.227a4614.0","@material/mwc-textfield":"0.22.0-canary.227a4614.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"882557fee992155765312df09397dd80bd837720","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/882557fee992155765312df09397dd80bd837720/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/882557fee992155765312df09397dd80bd837720/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/882557fee992155765312df09397dd80bd837720/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/882557fee992155765312df09397dd80bd837720/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/882557fee992155765312df09397dd80bd837720/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/882557fee992155765312df09397dd80bd837720/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.227a4614.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-czVDA9mYkXbdCQXbQnhEDgDUadbl/hY0q/uEf4ScRePR91zTJAtr2qojfnHwi+QRS2jtt0jnoSMdJIESir8/pQ==","shasum":"6c80468a5ee9e0cbba1aa6760213b99aa2d5467b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.227a4614.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr8LaCRA9TVsSAnZWagAA4c8P/2Sr9+kMSQxvpdBed6gT\njjY6mysDqziDDjhilbiED5RnHS7Yyx+xK0GgyRwCZEdKQizTV8JZLjFw6jPi\npIRbiF2AHoylVm2RsLl2rcKaPij8V5XWO6xf0xmGDkILPpBmcISZwFv8Bql6\nt+0B86thSc/H/hyuAztheBV8Cecx10MWpMhu/Ol5z+kZDo08bHOAHXdleBi5\nxu4Wy0SNa/HoogEHfAm0cSqqaptZFJ4hwthVqYphjtoHrWeMS/gOqWMqk9cO\n+jQTbbe+Kqg28V/Q3zfD97YuTVoVpfejf8oKFJmnD0uR3LEf0+QcMxRDwAuf\nmw4QKpiv9DXkZyJL7weZYgVAtQ2CR3lc1uQ+f7dV2Drm1+0yi80eevpfhe1e\nWvkG10RCCXyuPVWnqYyKNwCFAjM2rVHLwh5gU4TNlVpOinRa2DLdhBMdV7g0\nF0g7kPiAkx/DeU/8t1Fyb3HQOIwGj58pdHNCuV+A3H02RG6DKcHjxQRJaXUH\nVhNPsQ4AbmRrxnT6yfYatXLKHcfsILIvxBxwY2NfWRIaherGeh+N7HkCeQnh\nyooUo2OM1DN7Kqe0vZfK1F6HuJmsc/i3bxOM1vyskpQVmHfhyGM/OglH/zIQ\njuo3wSmYrf2DtQYyJ4q7SlXt2gjZKuNRHemrTAePQ353tjWe7OuCZDOHPoOn\n/sJL\r\n=oqhH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsMgxl77OTylhkYm9RKHDYhqqrywe0YfzxlOlQVYV4sAiAvxEGwTSt3TMD8A3uBd8RxibDHxJgMin38ebzEDJH4LQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.227a4614.0_1622131417739_0.2814770488041818"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b3d21d31.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b3d21d31.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b3d21d31.0","@material/mwc-textfield":"0.22.0-canary.b3d21d31.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0346549e5547eca4c47152eae0253d802633b850","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0346549e5547eca4c47152eae0253d802633b850/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0346549e5547eca4c47152eae0253d802633b850/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0346549e5547eca4c47152eae0253d802633b850/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0346549e5547eca4c47152eae0253d802633b850/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0346549e5547eca4c47152eae0253d802633b850/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0346549e5547eca4c47152eae0253d802633b850/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b3d21d31.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-OJjmxCDy+mmQ9k4vJ5iLvChNw/FZkjZFCCxIxbfBvqH9VUK0GXKveMJ7GyN8Gfpnf47SgrU0juu3PxLflYHhkw==","shasum":"078c26d27491be7a61007409ae7caae84c6195a7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b3d21d31.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr+jZCRA9TVsSAnZWagAAzZ8QAIEHZtks9lWAhkV0sX3R\nO4c/ByKFkfiIzdFou6ngU2kTpCGJTMgMrQFThlaXbVdbrcm+PZVY3Zr4IQgu\nuvwOwUIk+aYy3WT48LPBPfAcoJT03BiQJbs95o8aBVDc3dAImefp6790F+hT\nAj1dbwtWlukkvhMk+VgtAH9TJTo9sJYfZvLIlCo3e/OGpRq2VrNW/qYx9BTj\nNm1dEqVXMDZ5QTLH5ylUBPa/vOgLQvGR135kVkewGyTMq4Bc9W/dd3koXomz\n4r/8EqqhvZ6wSrx+KOKMnAcygccY0A2V+ia/5PGkhi8AMTXfWla15cIOV5fV\nkELSTesddf2pfb8vMbaKcz9b0e+zY4BM2UcPPIM+TuerCCGutj24+7xmFoqF\noCIK+QXQk6Ru/uLwMaFBQQOQqfIGUss0cK+CDzzrKNDkWrOzUAdkmNUFSGRl\nBs/wdnye13LL96BLPW/t982oupSDY2f/jwdruel9Yel2cFtWd/Y3pgdEAT9M\nia89Qv6tLmWTmVcwgHPJGxEPHgDgLw8a5VzX8YRDfZTtSQbM4eofLKYHiaZ7\nj2QLdkersMkVxmZy/JByzs+MWTJoOfYG6fs3XJrN9Ecd/jCJB2Ts0QDhFOji\nTe+R6k0ndz0sUaJLuj+OjYKknZCKcNNq8rZ4nBxJgjRIKJ/2fi0hYcoKiEay\n7bdo\r\n=2O/E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4S0Nw3LWzY2Hdgnh63t1m1iC9muermsj+uOmsGsBXOAiAR8uQhq/NNuaLW+h5C37rCns5sywxsSVmKbZu1SyVnPQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b3d21d31.0_1622141144609_0.7667693277156389"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.288c33ec.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.288c33ec.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.288c33ec.0","@material/mwc-textfield":"0.22.0-canary.288c33ec.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"69149a859b2cb2efd7d7cb7a55acad20d60fbca2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/69149a859b2cb2efd7d7cb7a55acad20d60fbca2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/69149a859b2cb2efd7d7cb7a55acad20d60fbca2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/69149a859b2cb2efd7d7cb7a55acad20d60fbca2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/69149a859b2cb2efd7d7cb7a55acad20d60fbca2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/69149a859b2cb2efd7d7cb7a55acad20d60fbca2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/69149a859b2cb2efd7d7cb7a55acad20d60fbca2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.288c33ec.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-1lgoCzZ4zOtsFfjaxDQe770AmImL5gteoHD5zsttlaiz64lYmLxbhGre0vxxrGuOOrrvoP6GWBVg6DLuGlDK1w==","shasum":"848fbd165ad0b5579f9f2d6df3ba60028ad49f63","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.288c33ec.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt90ICRA9TVsSAnZWagAAm0YP/jQ9GBaCUAXSyXlhUhAf\n0/wi4YBpgpAvmGw/wmzj6SxAFmaeFQTrWR0JPQsJxUkcCDqQ0/F405KnNnT3\n7lwJnWz/CSkXi8DOwJkwAeUmjbdkBmn84TOMe1uS5pYifLhF8EA/r0F/AWpE\naEmQjH4dLkk4IuYvZewWJQMWVFPg8hyZyuCUNNHdXHdzG2nb9tKc7bVYBsJO\nkW5gOmfkH1Kt+FVaVNi28ge/6iFRZm7cEwzJ7PZYwHNvotXOP41HgJgO+gas\nrBiWUtCwp0UuNurSMvtg76kLEqWvDnjCpenh6sKYsKeDMu6Fgt/Fh6zRWstS\naRgeJ7D98pXCO60DiwAyXnIrePMG+zRwYUiTWJcAhm77xV5P7lHjzBIHfLFg\n87XCMayeDjjdiQZYnW3Saxmv78ZVf1Fh/XfvFTKtytJkLeevsre7vP77xLY7\nlDcjTHNIYa3b/wEyYtgH4OUYG7MUcOqPnwN3qpCfBW9ymUzkSNbtjQTKTzwq\nu6ozHMru7wZW4JW3SSQ3XQ00LW3/dCv7y2Dsgki/S0xO946APMqvXbj52lG3\nz192IR95bb5pvFhgTRnmLUIqOv8AqBK3lm45DK4w/3qYCmQKzAAqEHzVUN/8\nMunkRltzsJpuVLd36eI/V5QT8pFobWCzIekYoRbBXS4L6dcslBskeVWD9Wcb\nCzJ0\r\n=wAYS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH/ZujRxlnkn+kAPylVWpeP8JwsmAKGtdb8+rMRRiq2KAiBo2OIxRruOAwAeT7LVtZwJsbnrorULcdlW2BxpN17wAg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.288c33ec.0_1622662407887_0.46084018202183685"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.7eb7ccb0.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.7eb7ccb0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.7eb7ccb0.0","@material/mwc-textfield":"0.22.0-canary.7eb7ccb0.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"54dcd68c7454a24c791e5bc1bacb53ff095de147","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/54dcd68c7454a24c791e5bc1bacb53ff095de147/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/54dcd68c7454a24c791e5bc1bacb53ff095de147/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/54dcd68c7454a24c791e5bc1bacb53ff095de147/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/54dcd68c7454a24c791e5bc1bacb53ff095de147/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/54dcd68c7454a24c791e5bc1bacb53ff095de147/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/54dcd68c7454a24c791e5bc1bacb53ff095de147/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.7eb7ccb0.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-NaKH6kjHeW4YosUImGiP8PLzYpCF1LHtfMHip4xgM/1zlVcqqeREkA/jtmgzdtkgU2xjw0owb3qV/BR56hOfjw==","shasum":"f233293ba5d10839f645f7bc6baad312b9083fb5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.7eb7ccb0.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguTOxCRA9TVsSAnZWagAAJjwP/iKUsgkqRQk3BslpNFZO\nLdUbTBk3DNcrys9AlRL6QMKOw0SLV4sPjzdEk1fNMGDAdmgY7OGJNaD/A1kJ\nim7ukgLM7idvsTNu18ZDPdlHg3Hxy7N2VxRGaKNZ4DGspMBZzigdpm5U9kF+\nrRKwG5Ux7rzTwBtH1Em89vWJMumz4KCItcYuI273AumbO0XVVmA8k9bz3Ge7\nWdBtW9fT/qtGXZdY+Mg/Y4ZZMkrLNINOUDpHmpq+0txaqTZ5tW0JChI+P+7E\nRpmt13rhi68hDQ3xDct8Km45fQS93Yt561g81mfYXIQUJlfG6kt/tsPsxucz\nF2UrmR9GLqnzI5PQ38m/0f697C1sRxGz5NktBx0WUEwiqamvKJgEPVu3esti\n1qXQrqFTbPcPwxLrRvSdmbCOQ+hprmdJKW3/svERK5ERqViDzYwD/G8GAdSu\niFXhTrrzETNapf2eB7LgXD5sbi1pbAauDWvvjIF7NXIa6a/GvBqohAsqQVXF\nYZ1JOeJeoyGUgoRo6SfiIpUawxWGm0yTwNwUCjTXSIUsBFQSa1Wx7QhU9ERv\nWhXcRdNrul+ivxbZYEc7b1Ev7pjhb/Lx95zbBTET3yr12726/DlTA7iu4xMH\n3Oydr4Yz7pqyjq4ufWRGFo9PxoTJfZJ1haSdPYGLyJqvZrBryz7/n+CjKTth\nEOU5\r\n=Ej75\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEouWOEWcGhNIHmc/gryeUbj2tu+35kyu5yW0II9N1fPAiEAhnwRuVck5lKMaCm8xYmh04pf6yGCUOByJacOtT2vbU8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.7eb7ccb0.0_1622750129029_0.17101706829461438"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.7fcc0726.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.7fcc0726.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.7fcc0726.0","@material/mwc-textfield":"0.22.0-canary.7fcc0726.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"55ab1f053532307fcc5a331fdc4718c7d8e5d8dc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/55ab1f053532307fcc5a331fdc4718c7d8e5d8dc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/55ab1f053532307fcc5a331fdc4718c7d8e5d8dc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/55ab1f053532307fcc5a331fdc4718c7d8e5d8dc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/55ab1f053532307fcc5a331fdc4718c7d8e5d8dc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/55ab1f053532307fcc5a331fdc4718c7d8e5d8dc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/55ab1f053532307fcc5a331fdc4718c7d8e5d8dc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.7fcc0726.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-RW6Biqgk5lPrA9EzcVLzgk8fptv6wUPKv4cAedYh51HAayFb37kZ/UZOWtY+Lr2QmUi/w4goqedYwAGCAJRJ+A==","shasum":"cce3a1d481bb3effc0378a6cb84e602cb71b3418","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.7fcc0726.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvr3FCRA9TVsSAnZWagAAqfMP/1+zoSC8hEOJzaQ6EtkL\nglhvueTQEA7jvMazpTe6nz0HZJmy5pQ/qw2mQWrJ7iCqninjWJBcapBG9cdf\nUJgAljdoxxWRz2FJkEAsjAAILT/qfr7bvqdh6ezzQTVj4EUXSdipBK2aNmr8\nBL5gcpWvOYgOcZvJ9UFPxzZbmiF7cVtt0Kf5n9jADPqsfzXKaBHtcH5ACGhB\nbyX2XgJcAiWaJdgsxcFob0RJ3abdd3eiORWXPdsbeWJEnaF4bu/2cR0s1vI8\nPlkS1wIrqHwsfa15ugGApK0RJEQjpp2RaZkIxVsj0erlN8INx/pd5gEBPp05\n7qH3sd8GBsDjrvfIk/rNHlm5vef1ghHF3Q0Q4V9Gi60LqT7fkIb9bk/CQqUm\nqVeBTdokFiEeJFFtmzGYRC66Z+HgtCKayy+y4l6XfhOXBRzHtqJj0WRY6Vao\nnxwOzqGNjrXhammOSJRvVFmVbVMVJ6sn6T9zSgU8XaiXpD7vYGyJkhiiX5oR\nP6LRhehAMW0IiD8j6GUpDhGen7O+62Fidur31sLGBCIY66JgLnHZfN32KrBu\nbCNW+M5/yKKirx+A+QRaS2D2AO0H9HrMtdVjbnqc+gohzM7Cj/WNZuWhJH2c\nTc3xi+RF6Du2AlCQhUCYH1Gwm8BTGZ4lM37df5Kb54yZvTkkndKgdskpTXlI\nYIL3\r\n=+xrq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjwHS7GdpSJ/kcg3phhW6zJPQC9T8oNKmS01RHax4ubAiApuDCN2c1HnboXHpra9+H/Ws0jaFyP5tAtrlfGqXg4Bg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.7fcc0726.0_1623113156662_0.6772660838375808"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.220a4e5e.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.220a4e5e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.220a4e5e.0","@material/mwc-textfield":"0.22.0-canary.220a4e5e.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"43930a9e907fac042066906c7c9c4a9bc26e3233","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/43930a9e907fac042066906c7c9c4a9bc26e3233/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/43930a9e907fac042066906c7c9c4a9bc26e3233/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/43930a9e907fac042066906c7c9c4a9bc26e3233/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/43930a9e907fac042066906c7c9c4a9bc26e3233/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/43930a9e907fac042066906c7c9c4a9bc26e3233/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/43930a9e907fac042066906c7c9c4a9bc26e3233/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.220a4e5e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-gqscsBXUaIo4vxw4Lvi5uK/NHUZZ+r+7ntHYg06HakqOoYH4Jx8qPlOPuAy8zS+QkUD906gOJ7IlQfSIYj2AfA==","shasum":"da5f49a15b0188835a4ae3060d672c7185afc9fb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.220a4e5e.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv63pCRA9TVsSAnZWagAAwvEQAImKJhkgb0K53m12C+K3\nQ3LKoNp0FzTPau9MXhkyaHt9ASzVCQiRcz3GFksuk2Z7k9inbWmUp8u+MxjU\nvE885WvD7R9p1nBsxLm8XPHTHoO4gNJQxj6Podjs24aWqtrY6T7RygLL7xaZ\nQaFazTkHgVeO69YZvebv+w7PQnbKhDmHg/YMsFZGWuaKBOu3xEh1aGbK1K+G\nyuz1J5Z0hOwUaOTSUtgd2z9f+/fAEKnwfGprU5zXjaMZjyZRxiw1/GoZYoYw\nZYOubb1XmwAeX+GediW7+cW8uBtWFLuqlOKvjL5+U45rSPVLwFklsFzJIMgO\n8e5wcZ5b7h8oRMdZIhXrGNrL8J3gv+YOROb2AQHa1rVeiqnnJiYeuiA15gYH\nYlcS9UPc3ulk0oHwrG44+nSF0IIvZ4jkAFbhYvIqfF200tnWvDaRVC31E1xz\nIp0lXJClAoBD50TJ2bzXOY6vTXq+lFkrz8u5bFOZQslPqtTGwTkCgx5N3FvB\nUhhFJHdCRRb4rRmjf6SMvx506NbWvANWWzK4oTJRgkCjHrt+rhx5BaTHB2Lk\nS+4YbE7cAwoCVrWrw62Iny6mW2y+J2JH4XynjbI6y0PM+RtjxzDgYBq+09qB\nY3XLAyDd4DE7rk73SFRAlG5CkXPguUh4+M6nljXUW8SusAzRkvNuTt0zDDEX\nD0f2\r\n=XYDF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUNH3S6jUW4e41+mDVGTSHMjHDtD0yzobDZsn4K4UrugIhAMxU1MiXC3BDfUMB+Ut8vMo6mz6aFkruFS+RG44LROXS"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.220a4e5e.0_1623174633630_0.3886278310729132"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.6b2d6ab0.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.6b2d6ab0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.6b2d6ab0.0","@material/mwc-textfield":"0.22.0-canary.6b2d6ab0.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b5388003b8ae379bc5c274e40db94c05a19d7ea1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b5388003b8ae379bc5c274e40db94c05a19d7ea1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b5388003b8ae379bc5c274e40db94c05a19d7ea1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b5388003b8ae379bc5c274e40db94c05a19d7ea1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b5388003b8ae379bc5c274e40db94c05a19d7ea1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b5388003b8ae379bc5c274e40db94c05a19d7ea1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b5388003b8ae379bc5c274e40db94c05a19d7ea1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.6b2d6ab0.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-t8aY6FHIZh/jyW0bubtfU5i3DH0g/gfk0RMK5F3WSwool97tZ/w5KUCV9BXo0t3xDGQzfCMwPzFYhCDmt0X/+A==","shasum":"73ed04b9955c6bc9190643942fc632c0d9685325","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.6b2d6ab0.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv7jMCRA9TVsSAnZWagAALhgP/jO3/IuXwW7zXJOMO2Z6\nXMWVqnYzcz9uxQMS8G4rj6vENGZtNN6kSsJKaktU1WsBahpn4BDDn0LLSPN5\naQwujRP+hzjDVp4i47Tpu0wMPGWla4wEVMMnmHSgvYZsE26hzdXjr8EmYNMn\ng/Q9bzXH4skzmIbFK4SbDGsOiJ+hZP+1wgr9HT8uFTVuJqtpBzO1Ji5w3AiC\nYyImgPDDXqN+FgoETMLd+tGM50KRUQB0bT+Skk226jdX0GAFXAoQylR82G2w\nKN0UoGqjNEIUVgj6yL0ArsuWu6Z58NRxjGyaigozXf6wUxch9hxtZyennb85\n6m+S6jofz/jJz/gwbZJGoLvNrZzovLm6eFytfAW1n5jXdqROD+u0tDMzNHE4\n2hNOSz0yYwaLU5KxDX7OUI0Ykni+/A+MBVj/fnLG9ki/tQ6VSmVYY4HRZhcr\nmh1CkbvKLPAAwljhIlkCJuGasIps+ehYCiv5yqwfLCWlUb6hK7xgqCQ1myYB\nBoHMHj2h6y42jWKWAuCZetIZ61SHkEJKQlUg5UeDsHyRi3sq6SN63jwDQ5Zj\neIeSn2cpqMn1ZeTX7WvW7o1qLijYpQrT1fymG6lK2u1NMExsLCYvop9S338R\nZYpb+7f0IfpTpvCzqjsfO/VPQ52ycj1xs9JRLEdquKjxz30JNTrwm5X4vtgM\n3ARO\r\n=pZX1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSqetxkeYVQtUKZKTf8dBhDyFvP9xF1RpJ47jTYrA0twIhAKGLkIHHQQv/dF34TH2hmxQmUpVRMU7N8Eqnz1HWfWn6"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.6b2d6ab0.0_1623177420403_0.9828966337876364"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.2b20825e.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.2b20825e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.2b20825e.0","@material/mwc-textfield":"0.22.0-canary.2b20825e.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"8790f27506406085c946b5033334ea71328fcb6f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8790f27506406085c946b5033334ea71328fcb6f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8790f27506406085c946b5033334ea71328fcb6f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8790f27506406085c946b5033334ea71328fcb6f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8790f27506406085c946b5033334ea71328fcb6f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8790f27506406085c946b5033334ea71328fcb6f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8790f27506406085c946b5033334ea71328fcb6f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.2b20825e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-hPMxFwoO4kUemEb8PWM9aESoTa64Y4U4Aq8rvPjwZRZjYEZ780m+cVpEgPBz0qdeo8PFL8kyAZa84tCpvowXkg==","shasum":"e2f5ebee5d9c467bed504cc0a4a084e71e21ee14","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.2b20825e.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw/aCCRA9TVsSAnZWagAAsCMP/3VXPMfT2H6czBm6IF7d\nSzBHbuhcC7GSIj7wyLJShssTewRlmhDPkDz7V5+jEG86azH+VXTpRpZcLXdX\njF85HVs+ldWNLZZasnpi8un6e9G6JLLCRuab7BjM5ujdo3P9Zqe2hdQKfR57\nnS+S5w4Z3uHwyOhFsenZ0f0PgyXitCdrDmZQG6P+HO1Goj6MHYnpIHJDy1Tf\nPggPQSWVWn3FcqJCTDOFCBqXCRJuLw653iJNsbMjbChZ8EN2XoEJokg9eEuK\nsC6JKYo19ac4WbTuvOz2/VZpL9kezjeeP3pU6+PDQsUi2OdJFgHF+rIay1i+\nyUZpYW3Po1+YUt8hj+RbsUJW8WePmerQN7sy2XgieVfmNCBmyuWh2jqIGAAe\ni0jv5gBjIWh4EgC5PPndF1SoefEK0n2rRewdlSr1gAe44zgNSVyf8sM6A1h3\n1+zVwpLE2UXduzsIOl/00gpFdj0/rH+615y9AOvOlA9VZJ2H7/gulyIDFfZd\nXc5CqJUknKS1zbDpI69pRRF5cd5GMxu8VjNzVDLYECXkPaVfopgXPrgDg11m\n61La+vJmzDNug5xkLmPbFwy2YIFyVJibPONSlI2sj4o3h/TXMaiws5WMl0Nv\nUwQGsRTg2dwGoe8PxkHVhHUCaVVvuq6Mg5EIhpP/TG6IGGfycLxXfN/avTzg\nfWB+\r\n=cvwl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBb/cyDD2BDojWu0u+egpmH7dJvKqYeTqWIlMVa3fYGKAiEA9HmHqgXls7sgyQqLm+1KWfNjM+Mf6D286NyfLToRcnY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.2b20825e.0_1623455362259_0.22895390394407533"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.e1511867.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.e1511867.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.e1511867.0","@material/mwc-textfield":"0.22.0-canary.e1511867.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"37d9e0b693215142b4667122baccbb1b6fc9f835","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37d9e0b693215142b4667122baccbb1b6fc9f835/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37d9e0b693215142b4667122baccbb1b6fc9f835/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37d9e0b693215142b4667122baccbb1b6fc9f835/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37d9e0b693215142b4667122baccbb1b6fc9f835/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37d9e0b693215142b4667122baccbb1b6fc9f835/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/37d9e0b693215142b4667122baccbb1b6fc9f835/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.e1511867.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Xa1euWLNm6YOWfFpNl4dFFcy2e4/sCWmDBnzuHj+m36k7W/WDyi9Fy8YeGdUB/Uiw+W94jj4OX0S5kwyddkvUQ==","shasum":"ba3b8a6f88e1c760d4b9893439768fa170827a3c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.e1511867.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxAaHCRA9TVsSAnZWagAAwIgP+QFQNehVv0rczlPTdHU2\ncG8dofxNwlQZ7bTJq57YoVJxNWmYmP/YSpTf5gFo5BZtO7xvf9Ee54cSkW78\nu2LOptxtJv8glINvfbewqbU4k8oGfi1idsprqhwYvGlwjvJnQuRVlA+LJFgY\nj/TlDtsInefSyamExWH6977iVlc5aKQop8wIaVWZdea8eUByeJjR5YoaxdpW\ngRoLLzL6r69aVpdlnyc2xx9O/UVGxvrMuTTsmrPpkf9JSXVzCkNhaRi4d6Hm\n1caojok1f4jelG5HIHIQj9xd2/+SQyPcuUDc0IMruhCXlBqAsh5iVRFkS+kH\nwBGrIrOkhL19Q9/G5odHgVEVIvzVbKQQg7kn/V2nI8JgwAR0a97wboemfyXy\nFr3/wfORI1ayYe9oNCmMS6QiJF2ZIXQooHdIsPDIO2TokFcjKDUBmAS1d96R\nu1W6rIxzem1LQZttijm8BaSH4yqk2PnIdu2fj99wg5XDgO8EIw3Mn/YWkVvo\ngxWi0cZ+c539q90LVqowf74crrn53/GAjSUDUa9kOaymXPCfnj9ywep4xVvC\nNac//v7w+fYwVipXedDdXuPVrH/ftj42WcOERNtRYxa0GXEaM5tVlHLnUkiO\nPuDhjE7uOGJSkVU/qsGB6XRHwWFTjcSqaY7gZJm2gzX+Y2dXss90l6zEEbVn\nPZGy\r\n=TpAR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC05qHSq/4aMp1gHFk/DnRO4R6aahj1mufc2BUNHApiYAIhAM25twyzhSdcys4efddPQ52NN1Qa0kNZOX3fkJX+5yOp"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.e1511867.0_1623459463644_0.5001593735742436"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.ef4a0c0d.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.ef4a0c0d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.ef4a0c0d.0","@material/mwc-textfield":"0.22.0-canary.ef4a0c0d.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/97de9eb21ffb99cc05f4ad3fe8dc24ffcb569bcb/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.ef4a0c0d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-kDewWVV7vPo+8QNqsDBI5iSKsgbocxd88Ko5sgFYPLlVUrR48DHhuhJBLdQcOaUfJTJTkE/BAgMH1ZNegghGoA==","shasum":"7c757e1a2c8d3570e73e3a0d0f4bcd772aa73aaa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.ef4a0c0d.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyQTwCRA9TVsSAnZWagAAwaUQAJVfm4oKm5o5CPEYOVdu\n5FQMnp4TuraQ9W/TZYpLhVN/sfZXgd+l75O20LMWnRI3pXolt8eM9BSZvClS\nka/3KUNXEjc+bPBktn5DwcB6eB17/MB5rvMx4mCvxxK9fogrNjl0+2NrRuIf\nvMRK3QSm7mQWkrs1lLJHhF/Vkl6VGFjX+bYMLmJ7A1afgstKooNLp+rUqVzt\nSqa/73CzooKjyhMkjEjNVR8w1Mhzz69Rncq1Jo4bhyxgRenoVfLI4/pNY2vO\nilvD7fq9vPy5DGUMHZfU1GY0QKPzWbUTnuHQzdPjUoXDdgC21UImi1hWhEvk\nDFTQ/OnvaXOeKPPkZPabJJJOf/Vky9EsFBDtjKHYyTU6/y5oR9/DAhCFAZrp\n5O1ZuW8D4gWUxM5EdZh0IGZL+7Iu1u1P81PaTEm64YNeW5QTQDGR4sh4pw97\nScmj1qegmyGyjT8xlJOjNEy8ASnUjVh8If71qBVJn8/Ip9laQSbdAyLy8oGM\nbQfeAWFUTS5n5Rml0LJ+UBpFPWF73x5EH8hPRUJm8Mxy9+aaHmDqHz95mEuN\nk4KCELeApuUNQB9Sh8Kz7LUbq8olCi5HmfRmTB/7TWL3fsfHLp04/zAAGUC6\n3VYiLr2DILbnAVLh/DUosGr89aqtiKeweL4nGs2AfcUDOhApjNYQjkPR4cqd\nGV67\r\n=JMDQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcc0UseWQwZqM+yN1BnFJRiDoVr14gvYXZOimNeUF/6AIgV76Kdu9rGhPyFM3uuPwzAjNTAzE/qOgXhv3wxhaUl8E="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.ef4a0c0d.0_1623786736091_0.26688610486570585"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.573d8913.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.573d8913.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.573d8913.0","@material/mwc-textfield":"0.22.0-canary.573d8913.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"13a9b9717491f67b5f5a219b279328890c0c951b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13a9b9717491f67b5f5a219b279328890c0c951b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13a9b9717491f67b5f5a219b279328890c0c951b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13a9b9717491f67b5f5a219b279328890c0c951b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13a9b9717491f67b5f5a219b279328890c0c951b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13a9b9717491f67b5f5a219b279328890c0c951b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13a9b9717491f67b5f5a219b279328890c0c951b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.573d8913.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-+snW0IilGK5Uqkm9ulDF5VGM1bGVuPzlm5ChV78uI5CChH9aHd4QKFuy8tUAxkUmM9wLVR/PJZvDSA7/awWZjA==","shasum":"b0c6a8e3f95d4d672ce685dc0fb2b29ffa529583","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.573d8913.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzSvICRA9TVsSAnZWagAANMAQAIS4/vHteC3EdER4/2ht\nGFoOoTArqf9KBUAfj3usN+o430Z/gtvW2T3oSuYWhd8CXPZSjRW3vR4dGzMD\ndlqGj5HsN8Xg8RwEp3HyHH5zp6poyMYJVvme20zB8zg51Ds+85n/sIRcfvaC\neYwDryUce/WV4oOaujRFNZBvh9+rRa+k9OAnOtzSpdDvLfS/4FqAwZe2CAIC\nEdlcPqUprdRHBRK0+qtN6V9qY9Iv985xXbdiKMlntZyNzq7Ro0ij/XKyCGbM\nPVZErF/HlceslIjA5fjwLZV3wzG9vOw91zjGeBd8elcVyChZ3SiyHHrnc+ZN\ntGY8c4k9BEdqALS2FrFwkrCZ3hmFvbXLOQOD5ICBozlMNDz7aGFWSkXWkpds\nwRXKCGuweKraF7YSuU5Eo6gtRRPCqGSg76XE0HSb3/cjwANRKwQYxLHuR0UU\nR96URingtzAfS3+8PgA9REcFQAL0rD9ZwruiVb3/DLrd0pOErYyLKW0JOt4e\nkwSovOIof1YkELdK2s6LqSBsJnvGn/0r12LSrhDvlKbZwEakxqGWWdUzMdVQ\n4YHMa7NZvb8PuXd92b0Bp/cItT1j12R2THt8e+gWb7cu99PVsV93b9CnFwWR\nS/GSXudErNDWdcn+pOfQonrU0W0YzDKQJwbRKXL8u/UpIeLjvBETODAEejJC\nyKHD\r\n=CnQ+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKb5dTN0/yytRF0fsHeWaMc1mpnJv+ck3UY0KeYbd28gIgRL/Ntq3iTxaxgXwwXdOsG3A+b4qHdAUu8QLcLqqpHDc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.573d8913.0_1624058824289_0.5949880802236218"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.21dba001.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.21dba001.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.21dba001.0","@material/mwc-textfield":"0.22.0-canary.21dba001.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"f26ab3eb589dc34a464186e9b323c9a9bd20fade","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f26ab3eb589dc34a464186e9b323c9a9bd20fade/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f26ab3eb589dc34a464186e9b323c9a9bd20fade/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f26ab3eb589dc34a464186e9b323c9a9bd20fade/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f26ab3eb589dc34a464186e9b323c9a9bd20fade/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f26ab3eb589dc34a464186e9b323c9a9bd20fade/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f26ab3eb589dc34a464186e9b323c9a9bd20fade/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.21dba001.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-JYBsFYlChFdf7Qdj0Dq5jmkHTgoQp61WMi42HPzxnTlnFpAZP7bfbpZvWy001quQLrb2DmdejrvRba2mqtOlgw==","shasum":"89eb97362af7f361939f18ba533865e547c3e048","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.21dba001.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0QdsCRA9TVsSAnZWagAAqg8P/jeNMCDHzEpHwVsJCiDB\nnRr+WFWExzJeyTK6NS1QBRKpPNwLemH3qaDutzR5eal9T3ul16gR9cVPft59\nssFIu9lxReZ+9/fbcorXHC/3HAmhMZGSZJxnMA08xfaw4WTPS0ym7Or8W1zZ\nC5hCJnAVZQ2ir0zQE046mfx9n9jpdIP9RhmxmwpRCAwxHmWJTBzrsHgHLuJC\nIwt+hNymCvP16/7OTrgY83Ca3Esq0zTy7TAgM9cjLYJTizspUTmpbo9r1IDN\nOypA70mBgaT3zjExfyGJYataZpNJ1iDLJ9O7U5MCHnXvJCnbHdRQcgQjsxTJ\ng2nGsZOLL0xMMu0BawDkXKMxPs8oK2mY7ML3tir3+HwE08o1fHEA7vJsDCSO\nmzLeApypldxz/GYAp6PMuHwrQQigExjXmp76vdQb3q1Z//FxfkjzQfzHYXjs\nnZDidTplBkp3Jcv5lclHfsNd/ReQTMN0tPttfFAG8YF3r6RuZeuF8ZhEccsy\n9snTU4E/6V04N7uOWxi3dYEMj9Cq0aAYIzEGU9x4PHsj7EwQhMJl0/CtlGT/\na6FAlWngkSGB9TaGFoFexY4PihiynVxkNGkElsrIMrFBfN25cZltctaGsO9S\nZ9nTDzO4ouDRY8998j9JeVZhCXGu4Z60diDpdFXwJlVHSoPvJ98B/yfet9q0\nEUWz\r\n=cXtB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9INQvkAMA20vsPBjA7yA64OjtVH+NVhuY+bPDxoc3pwIhAOG4jd9dPs5k9gGPWuu13UGnJUmN2QfzWBMvu9DgUEVA"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.21dba001.0_1624311659534_0.5529244922493979"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.6f5bfd0f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.6f5bfd0f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.6f5bfd0f.0","@material/mwc-textfield":"0.22.0-canary.6f5bfd0f.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"38e391cc489598145e8956cdbc0a234563260efe","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38e391cc489598145e8956cdbc0a234563260efe/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38e391cc489598145e8956cdbc0a234563260efe/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38e391cc489598145e8956cdbc0a234563260efe/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38e391cc489598145e8956cdbc0a234563260efe/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38e391cc489598145e8956cdbc0a234563260efe/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/38e391cc489598145e8956cdbc0a234563260efe/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.6f5bfd0f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-k0GIugTA+lGiWP6i4tU8H+lrFOcq5b0FqlT3WUlibNxDuxQCqpsnUooojbUaDAypc7gHRjqQ67ziaEDMZS3qOQ==","shasum":"81848da9e05a2793c7d9f373b92fed67d6148517","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.6f5bfd0f.0.tgz","fileCount":13,"unpackedSize":38705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1Q2aCRA9TVsSAnZWagAAn+IQAJW0nkSG4WXPhH4VcfVj\nIqLi+bMWl5uZGwBDSLrpObFzgB3ep7cthPugpl2lvah0C2zBgKb3tJ3HT0d8\nhp19qUjLF3dn7SoRocz1NeCbLt40weyrPaRbDV/n0SHeNy1ePxwbeKnBkItk\nDZx4KNr0Zrfq91yxS+DNLaJmQrUSfRB8KtjxuPHklhu606r1TcGz4Bidu2ca\n4PqJQqBfIGUs3PYK7KXiids+bSIHpyrojZUNVlF/rx4s8nw2ji2mg4c3poAs\n24TVzPDvqtCZ1pjxrJRsf/TmJ7XV/GTGbdnW7+hyagCGH3UNfiCibKD01MW1\nITpxVol77pGBzZAcsshQr0XnL1d3hcxfvKedV0RlOyeJUE9Ugb7RgnG/NEC7\nAIF7E4PiqbhDS2EJcxrSVLAQ29rZpnI2awZaxHoOGiSeInsBte/X1k3ZXAH6\ndhXF6xIcHJiK3mB8xeF87cfwcXTMhWFYNwaxRykUAlrx/6kcHeedz8FVMjSG\nxxWiQVnjGl1WhvhGHo9+tuXJrO4QNmi0bPNj8VqTj85qYWzo5yLqawAmiYzO\n2vuVe6bZ2mG6ITxjFYZWGeJO/ayLWCmCO1XqRjn23boaIXTWXGiU8gVlboYN\nIo4X9KJJgWWMjx9/mNxULMcWHjnvWdItB96hx6By9oqg2HBELWM7GCQH04Lw\nSc5X\r\n=7TRa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECF/fiFb82UJx12Oq3seQiAVxS3Pe9joA5SfZ514nTWAiEAkAMSbtFAqHCr2OokEQzYflgspVYs6P3R6v8s1R9kC+U="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.6f5bfd0f.0_1624575386159_0.04585864207709944"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.fd8360b4.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.fd8360b4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.fd8360b4.0","@material/mwc-textfield":"0.22.0-canary.fd8360b4.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"652b3840a450a965d0a571d3b055195dddebc8ca","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652b3840a450a965d0a571d3b055195dddebc8ca/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652b3840a450a965d0a571d3b055195dddebc8ca/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652b3840a450a965d0a571d3b055195dddebc8ca/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652b3840a450a965d0a571d3b055195dddebc8ca/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652b3840a450a965d0a571d3b055195dddebc8ca/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/652b3840a450a965d0a571d3b055195dddebc8ca/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.fd8360b4.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-iXPSGy/3BU1nJryxf2cpyrUgJZsnmROJt4PDQI+zpm1miQ0rf1G/UJ4oQviu+2JT7TDGmteI6FPDUd2Aqz//bA==","shasum":"dea5b05104dd97f533ef4d34e302409f0b7abb9a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.fd8360b4.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1insCRA9TVsSAnZWagAARRMP/AoCCcPJR3QTPL/omwls\nXgTrp5pWHFuFOU/a1ugM5hh0qRX0/N5+U0MagQfl0bOFRlPhxNAnOUixXG4y\nX3dagD+faeF5kEK3aTreq+PMu56nwQ+4zsfxzLcEDyVh5AKe7iL/GMbaSEfm\najPa+bFCbyN1knIfyeq6KwSSTwlB5W6auNihFebW1lw/sotrfQJgNJJeQeFc\nNYrVCkFRGs46W66nl9BCrzqJFfQYfk5OuwTV53Zjq4OCoKMLTBks35CAnUKM\nbw0OlYp4IbPTTayNfXX5q4phxjx7kWZ4w4+nSBV1nxR5MKphdO7O3MryR1kq\nt/aDT4yN6Md/1qflesLZRwN1kj9ShL0HhsLk8BcjS+7EJh4/elrc4SrYoeIA\niFTv7h4bfRNgEdoY5eTjP9oJOKvbE6G60KybfxwfYdCWX3CC9mScVCrzE5Fj\nRpYDUsJ2Y1OzY1O5/1FisWmMieFLKBok6AllkV6XC5FGXrgf9CMoM7TMKK8v\nLI9C3B2HBijOWwnuoplUMpVTvlrkx5EbsDfHspK8QdvvT5lMzHt9SIAnzt8R\nPbTAI+XWLVSo9jmCoACxnG6K3b5KxbeLIUbHY4CjjONKqnmYpQkxPjfzthDR\nmKdS0ifdczdgLvSJGHIvKOo0GVvkcPyhwoEGIglAw2rvG1SVUKr++Dfbg2qq\nFuqX\r\n=yIyd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAnp0XMmB/r+IhJe9pGp3xJW/OAP/LL1xDnKQylCv4UjAiEAxCV3Hdb/k8Db8om6BtuNHw91012SThlpLiozWSmasTQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.fd8360b4.0_1624648171984_0.8613838040058501"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.6f74432f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.6f74432f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.6f74432f.0","@material/mwc-textfield":"0.22.0-canary.6f74432f.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c9a217708497c2e16eaef6de3d1cd70873d0173f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a217708497c2e16eaef6de3d1cd70873d0173f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a217708497c2e16eaef6de3d1cd70873d0173f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a217708497c2e16eaef6de3d1cd70873d0173f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a217708497c2e16eaef6de3d1cd70873d0173f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a217708497c2e16eaef6de3d1cd70873d0173f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c9a217708497c2e16eaef6de3d1cd70873d0173f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.6f74432f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-NlktKakZmSO+S2a6l7lUFzI3fyzKWjQiMsLS62Guql2MgaBaDiUA7TkWSZXR8CZfFTBlPpUw57Ry0JF9wqWkxg==","shasum":"e2f3095a6f19519e813df9742e97cac8239d54ca","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.6f74432f.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1kDaCRA9TVsSAnZWagAAbQMP/2Vk3w36CkR1rzcfcLT8\nwNX3h51N684k/DxAHJ4MfhN5aU4010eTyJdQaqLvd46H2602EPYI0UIwnELW\nZUfgzlAuwabjntmIaR8PKaxC+dNNao1UR3h4vTqbK9abRIoJUW8cK2kvvKd7\nO50JqTMC4axp9OHkM+KMch2GNOlRmljfg7Q0Gn2KaIjNwmZ7bjHuAGJPwiRv\nVQHcnetzMSt0RBiM3SwJhv56KInhEex5LJpDgMx0UGm9KiK0ay4RgPddLCKn\ng8Vl/ysFdYb0RZ9twstpEstCz1+4s5rR6xwMuRgx8t3f16SoRmB875yzDWEH\nFThWT1QH4f1recMr7bZ8vxz7Gt9MA0a0QxoANIIPxeUieo1kc+MuX4AZURZS\naPBw30o8hNP4dceg7FDVgulAUtcBM4N2I+vJrjq88ZeVJTS322lhsRAV7Ayq\nq8rKLQM7QSUyP16Ip2kETvYx9u/9LOJMB2SuCka5ZAim1v6rrwOf5mDuIjlf\ne0Lj1arbD3pb+/SNcqP4E6LfXEs+xB7BPTpSo7YReTGUXry8UjiBgiBgduDk\nF8glY5bqk6wwOjJPS7vBLDKNgYiWi3HqAwpT/EVH1UzneWxJV9LNUYdbiIrw\nu/MLPNE/SWAXWqxFIUkiy9cJD6Y8W2mUeUBmB+qsnLfMAHU3B7KGMgJ4iwf7\nYwc4\r\n=dVjG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYd+szy07F3TueMkEdOcz0wkCEpuO+rb3MJoI2WVvijQIhAO7lBxsoNb5kgsyug+SLtake2TOXOnipzZZ83QgbkMCR"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.6f74432f.0_1624654042206_0.08997936401340612"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.b62f901d.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.b62f901d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.b62f901d.0","@material/mwc-textfield":"0.22.0-canary.b62f901d.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"05d3042d6ee960a41512f4385bd22af7dad2331f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05d3042d6ee960a41512f4385bd22af7dad2331f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05d3042d6ee960a41512f4385bd22af7dad2331f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05d3042d6ee960a41512f4385bd22af7dad2331f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05d3042d6ee960a41512f4385bd22af7dad2331f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05d3042d6ee960a41512f4385bd22af7dad2331f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05d3042d6ee960a41512f4385bd22af7dad2331f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.b62f901d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ECjdF3HyG2IRlIDBxxyEDrTdhMFXK/4pfbTuVgGCNMm9h+oCqN0kv+DrgzyLPXLMRgNa+RSnOqGCER/PL7kUUw==","shasum":"24c6767a95eeda0364b40467e7d30635e8ae36ce","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.b62f901d.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1lYCCRA9TVsSAnZWagAAzikQAJoHE1zbevvlCDrJi7nn\nUKtgO6/HrO75k+6fYflBHitzOZqfms7CrGe+JRy1lSCD00s8HUWgHMC2WSSX\nkz0o9BMTENF4ZR2JiDhoT4dinDSprxJcbrGyVzikXkK3oKScFoc8u+PAeehc\nOsCnduniQG96cu3bhOh6fUzqolhaU8rXTOzP3yNzsrBjuVWb8u1QZDWpxucz\nrYa7ml9Xs+AXKQ2a0uqMYqxVz1/KoBoE/gWE68H20CkiIbFfnfMXBYc2eHgA\nlC/eSx44pPs+FD0o+W5gZWQuYZN550kAUyNaLQR4blW8TdF0eZqNZ0jxjaOW\n/YtFbGtPKYeTNdhUdRPl+Fehwx0txmjyxYwMz3xcKPPYfaO1dkBr3poUtl9u\nzJnWi3yg3RQEXWQ5NIcj8kYI2N6600bsbwYliW5xXsqOSp9R9azqWYKparK0\ngHM2GtdSvODwe9R43NklMRaHsgfSOszvqMqI3pKjPY62AwwZORY9dg1ctjiG\nGYA4r4YdjhugsxLGTJDFpHydgwOzHmNYt7fDZfHaKgwXQSXgEDsi/yQclbPY\nHmcUd8Ky3P7wC5XqWQX1rU9YkXvOormMKTnP91mSkV0zF1Ckg+rzCAFHZqMy\nTCF+PjXpDh5E1OFjz8V/9orfvsGWjwnX6ckbuXpeSuKOXthhWG9SHurXhTVl\ntByL\r\n=6iKG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICE7Cq/TUP2XTjEAQUhPb9l0GVzgcElIyoRN3dj0ZDs9AiEA7Eu5DBHbFAt2DJg+99p3JFUrW+5aFoFkGV1hpYsc/zs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.b62f901d.0_1624659457549_0.12108319234263965"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.73122cba.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.73122cba.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.73122cba.0","@material/mwc-textfield":"0.22.0-canary.73122cba.0","lit-element":"^2.5.0","lit-html":"^1.4.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c6a144cd9623c2a8e58dd87af0807c1aa4d1f5e9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.73122cba.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-G7NkT7wfabpbMvVGYi6AoCP8YvBDHnLFkdm9K8bzv1nXoVQmz+mo2hFwlUodu2mqoc8jaO1kqR0JU3kU6iXR0Q==","shasum":"fe9be4fd34fbc16947445c28bc37877f07400ec8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.73122cba.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3MfpCRA9TVsSAnZWagAAKE0QAJrY20P8iBF3mdLkonrU\nPXfhDvNbO5ihmKGBslJcXy+rahjPYfKSf4k05NOHpo+O5hMyx9A0qiKtuvNG\n3laCM5m2ggpAa43+O3TUv+UP/E7zJZDJ1XTnjvKrWXYHxl6FNOjGpPbljyj8\n9ucNQWzzAb3D9xehfaA3Xl14zw5+6YcVUbrw+etI1kR2SzCvApbZ7ieBvGNK\nvXCQaHHoGZT8xBe7fGzFi0hWjbNX22NroY/Sa3Qr1H0AM0w+k1CdHBiTNFaR\noff5cr4VP5EjzP3aD7RI6694XwIC3byRMqwZbjGo+4LmTyNm03ctWtU07B1H\njZmu/75gGM5OeqKfnZK2QZIbPIpTxN0XIKMK+NqrPT7E+Klm2NUx5niT8pN7\n8TJzw9i2ScJUgafr08p9PlZwgj59VnRo33ekGgioENa/LwYQTBRNom7Iuuz+\n5QxfDPW2xiRIz67bZL45uy+yR8rZjdp9WFRoa75sHIt9RUOoHpcXjXomOmjI\n9zWN2iBwzA1dgVH17Ha5p5iK/HOAeD2NJ4bdoUg2IUwkX0SamcdvyS9w/MVW\nvDZjo89d/Qi5unCB1rxDhePKpZM8btikSIoZNoxPRc6lqD8YjD5k7JEgQOTv\n1lGNFGz23HxmoGmXq5iB2c/JiNS2AMxB29ZQCh7VI9iOBZwVtAqWjV9de25X\nL3FV\r\n=13QT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDInVlDJJyTCaszisudB/w2MCob+5GHFBlccivmI5G3rAiEAnbSop/lUhfr/IyQ3zKoRzq5aanvf+mQ+/UHlpBY0zUE="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.73122cba.0_1625081832753_0.756883426580468"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.a6912af5.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.a6912af5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.a6912af5.0","@material/mwc-textfield":"0.22.0-canary.a6912af5.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b34c74a66bc7e54e1165edb13005a2923702f9e8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34c74a66bc7e54e1165edb13005a2923702f9e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34c74a66bc7e54e1165edb13005a2923702f9e8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34c74a66bc7e54e1165edb13005a2923702f9e8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34c74a66bc7e54e1165edb13005a2923702f9e8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34c74a66bc7e54e1165edb13005a2923702f9e8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34c74a66bc7e54e1165edb13005a2923702f9e8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.a6912af5.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-lT2/seGA2b6Mm5yed82dpGwH7o79P26iW2XFXH7w2GHgME+Tac4y8lCebo3Z1RP/LE9xa+btxV1kh6dPLA1Y9w==","shasum":"19b7094468ede3bbfb37e166bd49371773d224c2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.a6912af5.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3jTgCRA9TVsSAnZWagAAOL4P/RrLK+Tzgqy3zgV7bzuE\nmeQ1Ak+Ao2omMXP3F8De8xcOHm6O5+qNIlq/PnaK1nBGyPdM19vD4RGJKIhB\nMcPVZ//vTOBqyjnFBm3I7B3QsW9U7tENguwGVRWYWa2OMop8wegGsM2p+7Io\n437MkJdXhHUg1ZmGr+bHl8/lLqUT6cc0VK1xVVD5+DL0GlHsWKhST3BWHU5T\nlKW8CaU0UL2Z+CkkfH2paytbkMCKONcrgwxJqV1RUh//8IBdJkOw2d0Yjmir\nVuZYFag79wXICAG85D0IE9Fh89IeVwyARWebz4XP6dMoy690+md9XYp/ZfAb\nL9Xqbh98JJcnr0XlrkeKzVX7dqFgwSafghxmWuFv9sVEikEF+6Ww8n1I5sMy\nz3+2kA6qiZ75e3iQxWYWcHAtYUKpJlJXad/hr6TVubCHktYUISpm5qrqv4vu\nA+zMdMOFezulu9TvYK0uyW/NsqTF+0OfQ6xO7QNliGaOd7amTh4+00NbNva5\ns7i/I5Ved6CQ6LqXEYG4hVpLzfkjbe8ZHR2y7tzjd+Y6TAfiNf5kuViVnb3s\nPk9beTeIOxQg3yr9iCBME2KWsi6wDemGzC4NCX+CfCiSmJfwu39inVU5b7K1\nfpfPdJH76BREgho/AEOO3ubfgs6Tq7cwGMGfEh99YzXCnuTY5nebLSNS8B3w\nG5D2\r\n=IKNl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6nCStg41mp0E+04N/6ajTJWva6DSVH1JrCzJuuesowAiB0ATdNaiICAcO4hHBFinZdrkwe4uq/j22fXucLVNsG2Q=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.a6912af5.0_1625175263783_0.3570252776313194"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.134f24bf.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.134f24bf.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.134f24bf.0","@material/mwc-textfield":"0.22.0-canary.134f24bf.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1191b29dc7fa661811a1c3960131fce8394fc84e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1191b29dc7fa661811a1c3960131fce8394fc84e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1191b29dc7fa661811a1c3960131fce8394fc84e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1191b29dc7fa661811a1c3960131fce8394fc84e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1191b29dc7fa661811a1c3960131fce8394fc84e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1191b29dc7fa661811a1c3960131fce8394fc84e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1191b29dc7fa661811a1c3960131fce8394fc84e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.134f24bf.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-c2hkjwBX4c3+Q2WbXIHJpvGQKkQGsI+R7u7yaYWb5hLHQV6X7G6jhcoB4N5Hymh2GBmWWGbOrefwVwc8kHfceQ==","shasum":"31207d26d52aefe415e4a93b9658d4d830811b7f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.134f24bf.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3kKOCRA9TVsSAnZWagAAVZcP/1+yHEAeodTy9+W8zXry\nOCIrirStxgwVgHTFdGfskQh14fKQ1feKwOXApDNHoLX+lZBsePyoRC3yotyp\nQ2aABOT8CaYK/X//0k0Tz8zo9Se/alm/yxt6doDXhBkGCrjazvKu5jbdPx6c\nqVePkg2zyLiUFn0MQmQy5LHLrG01sYH22298jMlu5i99uyilBddkDSt2BxtK\noxCr8jpIy3D2+g67a7fO+QGtmHStQ0zdSNz9xKf/9jLsVFQk4NnXnZAsufkf\nv22HKebBdJZ+UN+LK1ubDr1TcDuK5yq8AfYxAkKk+Iy+tUg9CuIF90a4BPgu\ni3107QVJ0kTFtt8Cvt/FsK9+zsyXhvzGgjsJkZ/WPyGIHkGY9HD5z+/0+11V\nP/vv6bpYvEMMm04O3pAZIT0HtQOB4ln4R3RDm1wJjp9tJtIH7KiJruTMtW1f\nEuRyW3lDA9z+mrbmZuC1h2TaHbdW2yWArRLguZwNEkyI/T7AehQXuJeQjncW\n/rKZ7BsTpZngBNFprtsxVJJnLrByAIhrjz2DXIYcksk88dFsfCUdEkjJwmzN\nlUqb2HgBeHOk+C8G/MyrlTWCTMv7Oh0INIcEsnbdDRUOzcjDCm5ptXCXmLpj\nXVTERtzea7jB2F6K5qORu8DVr+maAKaO6pb1fzaj7FhvpzLbHgJpTvwFP7nb\nzjK/\r\n=fDbW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrhwa7AmMVBPJ8BXTJcUvc9ZLijYZ1LxRzG4sKbOKqJAIhAL5st2r9SbNAdWBvhOvD5r1jXyAT0pybmuym67uOjIDs"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.134f24bf.0_1625178766529_0.5248027872495848"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.1debb78f.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.1debb78f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.1debb78f.0","@material/mwc-textfield":"0.22.0-canary.1debb78f.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"05e5511ca831a84c47e7bd43f685202e9213b33e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05e5511ca831a84c47e7bd43f685202e9213b33e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05e5511ca831a84c47e7bd43f685202e9213b33e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05e5511ca831a84c47e7bd43f685202e9213b33e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05e5511ca831a84c47e7bd43f685202e9213b33e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05e5511ca831a84c47e7bd43f685202e9213b33e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/05e5511ca831a84c47e7bd43f685202e9213b33e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.1debb78f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-dqDwSL0aYyWu7rkfqH0zssYUtk6R2KdTbi0NSKE1doswmATko9QAqQhpH1Go4IGdVwkpEA6WBDR2+mc0dutTnw==","shasum":"e9268a0de4d24869ed811899255c06c1c9ab7315","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.1debb78f.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5Pl4CRA9TVsSAnZWagAA7AIP/1yYu9WtfT9KYVDG3BeS\n+3PtjFPM4GguU6AGyErOTiHqdkgBExBuFx9OEz1uUXhW3QJRASaYdMemIy7O\n2YuM8f42WjFJ97M95sA8+bIoHmTgrCFyDUQCrTWnuuDwGOWdPNOf6FiTiTRN\nkbIJ0ZPXKWco9Y2Gn1Irq+gH23heoR9LplZo+4WNTSAP2lTfYPdynsDSTvUX\nHCQXKIqspMnePjKaESkkvpwTlpixl0enDv8Y8dvnzq+pOt40uDYl8TF8Odv3\nclXw45XNAdFSYIPPbMjDAbK+2W2MS1NxXTUMD0hu8efrl5OPyiQXZxTqFfSi\nHNpDn9Ea7XmtyGZ1Ul0kUQUd22PpmuqDUiW1ABB5n7fpdHMF/9Y6JB0PNtTh\nRXEL8SuQukUonYcDvDLh15aLX3s0jkwA495ZbT/UZa+GPEBpJt+aj+PNqvkZ\npsXoaxJbYWUdSLiPCBY9MEATiXf+iYEj+DqykXG/2ohuImhFw5EWq6q7l+nz\nou3Hhj2Zmz+NC5ARL4sqMr9RFSylp1mgoot2Aw5mYsGMTQB+eSuXqL3teoho\nMm4ObI5Gjk69uYrfTBgNCesbNYzd5r9cW3PpV2lr19bI8UAGkn/HSv+ajbmJ\nTy/x8sQSBFu8IncZ6BEq7NvRCa9MG42E66QFz3vl7XAfOtAIKp6NX4IZmsQY\nYhex\r\n=qheP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICsiwlv9w0v8ek1rBL2eNWCaOZrDgo7Uxm12xklyFzF1AiEAsXK/FujbmgEzoMeSYhacf9c2JZy870ZGvm9svh9INNU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.1debb78f.0_1625618808129_0.8365373983772437"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.d53edeb6.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.d53edeb6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.d53edeb6.0","@material/mwc-textfield":"0.22.0-canary.d53edeb6.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"becc7820ecd046cb48666a32a633b8d9f76f2980","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/becc7820ecd046cb48666a32a633b8d9f76f2980/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/becc7820ecd046cb48666a32a633b8d9f76f2980/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/becc7820ecd046cb48666a32a633b8d9f76f2980/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/becc7820ecd046cb48666a32a633b8d9f76f2980/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/becc7820ecd046cb48666a32a633b8d9f76f2980/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/becc7820ecd046cb48666a32a633b8d9f76f2980/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.d53edeb6.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-R96utTUvXGoCIIhLZPLVxEKe9LOlls/Nx0FGvk+pL4SyExAOcnQQKPoNVAtQyH7SPky0nwy+nraos9U7wsWZWg==","shasum":"06a9fb8801c0403e989ad22b3c966c0fda7c6f37","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.d53edeb6.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5d20CRA9TVsSAnZWagAAOwgP/izQNIpskto4fx+/9k2I\nJb++GtrAxlAOgq7tNKg/YiqjB257qU5B7LhCUOyDL2Uv6QqZ71ZNsmOV5dNS\n5P3cUzbDNB3fkyump/6HVtqy6sk76J2/PSHETEUczuSuoRX8I6hKPKNgT2mA\nwCVUxdiG+F5mguoaUCNhbwwNY/C4HVlN8DoUAXPfppi8+ZasYkroNOIYxuxm\nwtjV/GIc+HZ/1GI0WRCf3B4d4p0NMkg7OyHSCulcy02YBoppRHGJeExBpdww\nYSL2zb+U46w6TLeny0ZoPmy1tXKJAwhPx4vuuQhUx1JCKPBMJnzm92In94Fq\nlWQtk9caxytAcZ/pbUksn+7t/HCuICq4RLo2cSodQcc6vBgBoeY+YwoLSlT4\npZ1Ux0sDzAtVHGnuspmMimCDeT+C6K53H80EVG+twAUcO+/rpRfkL2flggIn\nCGxwRwuv1o7S+6pCnSV1ivzIIEBJ7yG2uI73faBYEHa3x0DkFs6kWKvxAFi8\nQKUSOMVNTch5s3Fx1gaJWOR7iC7Ps5+cCn605afyeZzSquZtWA0vZ0dPSzdA\n17tg49zmjz8IKjWjM8VGoO7HYx5OjLh6t+AEPuqp8VKV03Fpy4INoYy9axeg\nZMdABCSBXFuXEf33JWhOan62esxBZ0Cez/w4fEG1OIcCm+tcBdQijlD900Z2\nKJBB\r\n=Alyp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHvVV5tZ7e/3XM09aFId61hL3ZsL88O5bexS2zzozqIAIgL2IfcWsj7DHXVO5nrCI91apydGZXVyucKSyM1fy5tyU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.d53edeb6.0_1625677236362_0.946670371168302"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.2226489a.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.2226489a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.2226489a.0","@material/mwc-textfield":"0.22.0-canary.2226489a.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"4ac660ba00e610510de0d1b8c86d4095110ac230","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac660ba00e610510de0d1b8c86d4095110ac230/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac660ba00e610510de0d1b8c86d4095110ac230/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac660ba00e610510de0d1b8c86d4095110ac230/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac660ba00e610510de0d1b8c86d4095110ac230/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac660ba00e610510de0d1b8c86d4095110ac230/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4ac660ba00e610510de0d1b8c86d4095110ac230/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.2226489a.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-aQxk8acwroikhbDPQCQMsBONAgcrCBjyoQyAB525MIGLz5qStJhx63GPeH7TIhuUaOJm7VjiXNWPejCkI/OuJA==","shasum":"8139e860ffe8ff4e0c5ab5ba6e99319b4d9d9f8a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.2226489a.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5z2SCRA9TVsSAnZWagAASvMQAJqqvvVqyaRvsxVOATWt\nNt8EilE3p4ac9iC1xw0e/sf28SiEopQf9wEMWT0XHSwyss5SVFPe2xIWrYLR\npMDq3EstnGMYNkR9mznzMjubwxksn3Q7ymwtvr2s1L1tff1ako4NKJ1jXmEt\nLKeKbmAxT9+VunxlvjtwF1OqSN8FjuYq4qDrbl6Prl1LiULh5Tn15d0goZNN\nbm6kWxXBmKBxrvqGx7rEpxbFprt5dpTorDYkfVk1C9ntiwOb4iHMmC0u4wPo\nbh4Kq4VRC6S69vH0ZHbHiygZQCp5dHOIsHE4wv1kX9vvIQp4XxE8bugE+O6v\n2QO+oQlip+GyMllxt/KT339CWgVUjD2rcx8jdD01Pforpz1ul87ibWWdFLZT\nkjRleI4xJ6ifk6wexfVtUaypR5k5tUWxGkCd+0z7HWiZY17gl8N078uh4Sbs\n6PYtbYanLnFPRJu/Ril84qypqeMv0UJkYeOFVdUkJ1A6pCn0QA7YtLlfnOHa\nmlPNk8lgbck77JCf8BPRcLlujJ3Fhwfz8m2aAp9aRcPpV9zXQFzarzLjOUrC\nUhCnIzhwiNxLcjlozNlf1rOftfv+xFdZIdlXWNX1IGmhePD/Kkugz2QL/bLl\njtrMgq1x+VAwHIilC/JxtNOTDKOhVkGddCEHbUcPa10LHlvhCHCjZIObMXQW\nTQgz\r\n=GdD2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfWdXfpROabfSw2GfJWgxDTc5HqOLoT3b7LKGzMFcHtAiB9gRUcI7J9dyfVmpJaJTZBM8bQC0uqHQVUAvd+mN+HiA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.2226489a.0_1625767314092_0.6704623978191611"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.d4801c11.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.d4801c11.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.d4801c11.0","@material/mwc-textfield":"0.22.0-canary.d4801c11.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"2d6201005f2b928287b990b2ce5ca643ef37ce6e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2d6201005f2b928287b990b2ce5ca643ef37ce6e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2d6201005f2b928287b990b2ce5ca643ef37ce6e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2d6201005f2b928287b990b2ce5ca643ef37ce6e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2d6201005f2b928287b990b2ce5ca643ef37ce6e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2d6201005f2b928287b990b2ce5ca643ef37ce6e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2d6201005f2b928287b990b2ce5ca643ef37ce6e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.d4801c11.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-K1BPEHNdH73LS1z57r8LtTXffJb8OpXwoOsQ6I8LjQY4svYKyTVyexs2dWzP2yDLYwn5dc53rbP6Y9Q2d1YqAg==","shasum":"8b77d672f8c8db9f2d337b4eff1aba596cbfa588","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.d4801c11.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg51n8CRA9TVsSAnZWagAAIKEQAIwmUWxRPmf8bExAMNAM\n24ne94LmkWZfyGi3tXqIOnqmc5Oqh0S0JGUpaevSROlkQQvMhC6ljvEgWBJH\nf/Eia3M8Gfr9n0h6sM6GP+OrAhh58LCM47/7tylKJdy242WF7fOBsuG+cVRL\n/k4xD+gm1wVEZLUr5ZNNpEepE6uGq+b1uaZ2pGq5wbleqUFzPfFPgwnnoYv+\nT/CRbca3ZPKvIQVH1PbSfbnnc+k/65YyH9gO4p3ziuYSMCuDVf97ggaXtr54\nt7pklqgxDoQm2hlNyqz0scdPZiVMSvmzyxET8+A2bb/TvUsM8sNkeg4F18bH\nvM+Eoji0ICQhoF2vGqbaZPAMGFi+HKokhZe4nLmnEPuhaLDVzVXsrq/pC4D7\nf9gLzww8DWQg1N9hkXxNLohtEYVZBE2DNm1TJJGjXzPkpBsPfO7deQ2xY3BY\nywtErZa5yNwPMlqwUIs6/UP4nkrfRr2Z7ZS9rP7TI0gp7tbHPXxR3SgrfjnI\n4wON4C1sGXPg+mtmYrAHK9IH4TmEsuxBoA9R6oCDnjBS/k8dqwuMqYeRAegI\nDQc+iTuAbVTDPMAtJiyzER40gH16dPaLmJzv6R7Ne9pg4Bpy18B6HQa/wwNz\nT9E2EmdBwNOnziLwt/fIjVMj0vV3lqadSeQr9keXgYj51MKugCw71k+g0yoP\nDoxj\r\n=/aNy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVn3vn+Ry1YH+07G6N9Cmz8sNkQIsIvKVgZKXJIROXLAiEAqO0Wthm5uXrhxDGy4xLhjME4puE/B9NRMqp8F9BLjTE="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.d4801c11.0_1625774587817_0.20365729817057754"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.7ec5f2d6.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.7ec5f2d6.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.7ec5f2d6.0","@material/mwc-textfield":"0.22.0-canary.7ec5f2d6.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"530ddb2b50487eae209a7b76d4233a5b591dc62f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/530ddb2b50487eae209a7b76d4233a5b591dc62f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/530ddb2b50487eae209a7b76d4233a5b591dc62f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/530ddb2b50487eae209a7b76d4233a5b591dc62f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/530ddb2b50487eae209a7b76d4233a5b591dc62f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/530ddb2b50487eae209a7b76d4233a5b591dc62f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/530ddb2b50487eae209a7b76d4233a5b591dc62f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.7ec5f2d6.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-0n0LSSR22mmHmJY+WvMFEKE0l/8sFWtmhzNJfYzGV1hE53DS6Lztm/L3o55S2ErFmGS16iqHIZ/j2T6Fd38LrQ==","shasum":"efc1ca9927559f7df9f995638fbb9f5025369d97","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.7ec5f2d6.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7HkbCRA9TVsSAnZWagAANukP/jX/WGicXH+NYG4HJVi1\n84O7TsVoo26++1XpiugNUcn+dUwUMtRYpHaMhUKfn8eU6pKHvW7t2RL/Vr/4\nIhDZemdj+X5ewuaczblvqKofuSlIG5HbkJ35DMlbv3jeoTrCaxYtFvT+cBg8\n1jr3aKet8DzhNyEOyBznBwOqrZzpwIbIX03gs31bb8own8ifeNyHsqQd5+MT\n03FcA0J0mg+8ZkSHB3oKRHc+lLKqtrND3L3l6AZJbG7jawxUmbNPJOAyn/bi\nt3es8kUozcq8tAXfcqFez1II8kPUJ0TPmp5yxbUE4AZeipZ8F//fhp5JYm75\nkkdMLFIxvgV0Eb35SxcA+F/qDMsP7SIUBq4c+cIoySXmdFp8JxW0VVEvp2dq\n6GXXGd1K6VWrXbTLC+S4+vzl/A7J5KdSTIKyQ6JbDnnp/pCOkmrx/Wvm4WmH\nPoD460cPYrGB/hEZto2HACXE7F7Fkdeid2N+cApUiE9yzDtdSyZW4wmluAwl\n0c/yaaXR9tbc6iJc6IMC++5l97AgSLB9dVfnCh7HfhQCkRzOklr5yMPIzg3g\nPc8xPO9aVPRJrI2eN80z07HI1iQm1tzJNWbPT4ViK7Iq9wpuCQwLk5I1Aq4f\nS2QvEcfcN9DfaaXziKVVHGypHdWiAj5Flnnh29z3kP49ZlD7hp/Tm+ho69Bz\nR3It\r\n=cjKA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWk9QyDXnxHpVIqv9730T7TnAuFQw3aQMVUm4wmm0Q0gIhANcpPaiOw7cldmI5fmOzkNsz8rJgHT6iHHlt5wlL2vvY"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.7ec5f2d6.0_1626110235373_0.08997558357182744"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.86cb4ca7.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.86cb4ca7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.86cb4ca7.0","@material/mwc-textfield":"0.22.0-canary.86cb4ca7.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"f679091aef1ae61c94f4217310d6cd1161c48598","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f679091aef1ae61c94f4217310d6cd1161c48598/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f679091aef1ae61c94f4217310d6cd1161c48598/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f679091aef1ae61c94f4217310d6cd1161c48598/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f679091aef1ae61c94f4217310d6cd1161c48598/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f679091aef1ae61c94f4217310d6cd1161c48598/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f679091aef1ae61c94f4217310d6cd1161c48598/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.86cb4ca7.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-P1xLh1tlvbndjS3wfW9dzOyI7UlU/Y/ezOI8+GBTMKLtt3GiopRU/IpbwEl76HSgRPGa1hGtvsDWVxlN6PxdYA==","shasum":"6522d97da50c04080f313e90d30c4f50f4518df9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.86cb4ca7.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7c96CRA9TVsSAnZWagAAMsQP/35cJPdYz0KliPOIZ30E\n0HDMxTjp+0NNVdtxUHdXoSj0fYF7JK5ux1kNfTvxgfURPuLEOavA0EBkl9In\nILxARVkXzfk+6GZZfRjg8K43RCWy+ajUixiCTd2ZUivvQ0QsTHsjm6SKDQEF\n435QSPaWQ6HqqUCuEIuXndXlOOetzzIHQ6PnYB/KuGQJruPk1nmX77YOMW7c\ngeL408h/9jNBpddQ4Och56jkyMKZBXgQ2qhRxF26AkQC0NKGv7L/drJMCUfW\njV3Bi1eI9tBOs1Mhz22fwY4tpRZPstl4lKb4N/JPU8dxF9IlBeAAxrfDdqJw\nPoziiqR4Ve7/wTXPUTMF+7tA48hTyqkJXUK7m+nSFnfVg1W3RzkPMupssJ9R\nHThF61D0PVyZRXrtsDK6SwereCDjK3xavNGn0yvcFswL+QITp2hyH8T1p4Xg\nN7izTXCkvoumjRVZSpvrWXHiJGw+LS8eTtH4p0fV09fVe9l1crKu48EX3P+9\nQesv8wCOsfFDSAH7+o10gEBiBXSYJpMlQStOZ6y4LMi1f9Hz2Ibkx6qjTu8o\nG/lZ152Gg25LgCfb8TU1zq3JTRTuZm3kfd91uiuiSbw0A4fZZXe+zanliaXd\nCIdwCBG30j2Id0Z/PayM9CgcA0y6vJsho+2ulFEHW2YIIW6qZVy2bGdSOcz+\nGp5C\r\n=hwFr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLN4H4uczk1RICVUdAUJsoxnO4zb43gu2XSf9pPHYsnAIhAOHzmJGlVak8NL/thR3fZ2owloCALvtvIFirc+NZ2VA3"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.86cb4ca7.0_1626197881560_0.5041361407269069"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.bc9a724e.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.bc9a724e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.bc9a724e.0","@material/mwc-textfield":"0.22.0-canary.bc9a724e.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"3f6fbd971026d270d71f4fa8515adb70cb387ae3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f6fbd971026d270d71f4fa8515adb70cb387ae3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f6fbd971026d270d71f4fa8515adb70cb387ae3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f6fbd971026d270d71f4fa8515adb70cb387ae3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f6fbd971026d270d71f4fa8515adb70cb387ae3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f6fbd971026d270d71f4fa8515adb70cb387ae3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3f6fbd971026d270d71f4fa8515adb70cb387ae3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.bc9a724e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ImQ7TQ8sbpbeiM/7M7R/+wmER7jlq3iZCWKd1avYLMLScZ6ska/u38Gg/DR9MGzCFnhFyAiyWEbt7EbzG3w9rA==","shasum":"55eb3039a7b5d0bdcfe5bffdbf334fe71512fd88","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.bc9a724e.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7d6SCRA9TVsSAnZWagAA/o4P+wYyiFFKnVrAJ2Czp5Ak\nc/AKD6x3nR8z5xLT30mTFK0yDl4UPU/SC/mpUwR4MB89v2cMJFyffeVyayMe\n5wq4OWsdMiZxQzGaQcWGvPZ3lwHTyihKdLAqGt4gqyUAMo5TA2oSwuwRuxX9\n8uxv7xGT7lfSQ5bdZ1s5je2i+rXaBikQPr9KVoEw/as1Ve4eDz8Mt5FfmjCD\nfszEGU5jVoUuPM7MHzhyf4UDa5lex12M3uasD+7XiY90yKOvSgtRkfzzuI/d\ndEuE3WhCbqqVBqgs6Hd+iUrjD//BeN41L1Y0yWQU6nzhO6PtP7EeBIGmV4pS\nVLNc2AxU3LTRiGQzoZ77aaV2zUv0MtLmoycluEdhyNgPNKXs8mbROL1RMNmh\n6C+vRz3AXUsBiYpe84V6kv6RSbbJx8BwY0v+bzJ1r7DQJW/Oq5mBMRPWQJxr\nIsgltgxWogklr63bRE4G8nA1rIqk5gE/kmmSu9zu/4d82UX4YnG54YqPnnB2\nDBTHpmUikQNWNYitcTHLoLfRd6fXAOK/AwoqebuRcC8gY9njU20PrDBmu3p5\nMIQQYuk6E206ESPaY+rUKeIENLuEB4d8CDLVmIPiXWxMZKCl9+kgpdjwS0Oh\nqkzwSe1MUVD6Zsd1ifBVZiMqVpeOYQpLAlKs6aZ0k8JKzT+ljGE7u+87owro\n/ipe\r\n=cwn6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxsrNp+CIMf8jvy1EH2ZO6/Wn6h6C2CEk1Oqf4JEIDJwIhAMrGQ8lCWgoH5nt9qhW7wAJJduwSR7IkSSxyfXa1JBET"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.bc9a724e.0_1626201746196_0.3296338673937518"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.7847b83a.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.7847b83a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.7847b83a.0","@material/mwc-textfield":"0.22.0-canary.7847b83a.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"96a87e19e381c977d8ac1c7a5a20a261fe54c448","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96a87e19e381c977d8ac1c7a5a20a261fe54c448/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96a87e19e381c977d8ac1c7a5a20a261fe54c448/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96a87e19e381c977d8ac1c7a5a20a261fe54c448/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96a87e19e381c977d8ac1c7a5a20a261fe54c448/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96a87e19e381c977d8ac1c7a5a20a261fe54c448/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/96a87e19e381c977d8ac1c7a5a20a261fe54c448/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.7847b83a.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-oIMmoggUlCvwXQ3SzUl0rwUPBn39PiKFbr5ijKrL0xN5mCHO/R0xYVI1uqQe+NTcnwsSzNukWopx629JA++ftg==","shasum":"18b5d226349612149159e10d00ef2aae1d29de15","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.7847b83a.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7xyFCRA9TVsSAnZWagAAr4MP/jJzDBa9bEfn0pftq4/s\nTRn9VPNE/s/cBie16JvfE6CpmLgwLhNMRT3Cu392r4ubs1CfwdfHB6Ea6J7V\nUTsqInxdVt1lUdCbet3R9TV9bbzXKn1FFr2bPRfIaeniOr7TSjciC2xW2eqB\nSJPGPe+a6xjPjrP5xDNjLioxh2TAeVaMW/1LoQWZ60Q+1P/KBv47SqFfPIQm\n8UEcN4QOCL750APO7jddJnzoRnTSQSp4avFsbhkHMY2haef9UlUFz2r5Etl2\nfFj2NKrQfKueNapKs1iNf6ubdzI6irNjhyBdBYZt++wNoW5XlRNQRBpS79gW\nm6HTBNYTpHu63ZW4uVZxomGgkyMIbt+65R5pQAAwzpvOl54iIFeK0qlTlHgR\nXJkN2nBNX8Qqdmy2EAWHh36uiKUrRkmeyvOb/fgFGCaOTvDsoshZbMKZjJB4\npiKpFAHhgCSSTmCa+bwqkuSFiiGtfTe79MnEhFc3EV6b5/MrHS5g3nzy4hYE\nZMozo9ukpdCUknYVkNhfkgeybYkCmuppD5FFlSIDHzHBoLRaZ/RFA8yUkAKw\npBP3QIPqwY2OrPaHqNwtdrPdcPRtT3bqa8TS1PjI6apjzsSWShkHq/6FQHjs\nfAUZrjMLr3ygzJavcabVVTJp00SMYKNfRxsIR2C/wpkrT7cP2vQhtd3kJyar\nEpry\r\n=2/Kh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFJyYD4Bd5u5el7EZe/VCd4JjHXWioSXWKi98jaFrjGAiBGwwi8MMtVu6KdQfh35S9DSHQACYbY53FrfC+83B//rA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.7847b83a.0_1626283141415_0.6681503683583911"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.0-canary.8cba18fa.0":{"name":"@material/mwc-textarea","version":"0.22.0-canary.8cba18fa.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.22.0-canary.8cba18fa.0","@material/mwc-textfield":"0.22.0-canary.8cba18fa.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0eb1334d9597f86a21b5f9edc232a1c0f67f6abc","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb1334d9597f86a21b5f9edc232a1c0f67f6abc/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb1334d9597f86a21b5f9edc232a1c0f67f6abc/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb1334d9597f86a21b5f9edc232a1c0f67f6abc/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb1334d9597f86a21b5f9edc232a1c0f67f6abc/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb1334d9597f86a21b5f9edc232a1c0f67f6abc/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0eb1334d9597f86a21b5f9edc232a1c0f67f6abc/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.0-canary.8cba18fa.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-cyC8Q8gGMLh90orpX6CCQOQ0eyhmJ6lZmVr41Z/uHqaeuAutXwS++WgJppwTs4qnbMnCN/1fNWFJTItmsB3sfA==","shasum":"29ff54f1e7d8eae869ff752c5a30eea92e7db757","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.0-canary.8cba18fa.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg70iaCRA9TVsSAnZWagAA/FgQAI2z62ySpD2e1PAfJ/YC\nkMCkmLPMoDx2vhWU7rC1AWvyBBrgHk/lIwgpyjLRXnpFUzsCpTWzmzKQ8xFu\njJNobzJrVyRb98pPn/QVebopcqHuM9djjm9fQAdOSxjfOc/KqYP6RrvEMFkr\nqcHAvZ4hm+/evEwcZfvpAweGr1ThPj9gcSLLjCn+q8t+1fCdFYwKxHI2s/XB\nsO2f3TARMb1Xfh3qyWDKsIXLgpbQ9cTe4Ij7QPhEwZ3B0985/wPaUInfu8LO\nl1wE1skEA510KPLlxLO3uw06jfCgoHNr89F+gUfF5bot2XTV1+I3mSlxks1h\nQTwkci5Wglthr+vbD2PHXQYHarsxs93rx6pJEESRDRY8CtkXu+J1J+Z8rsgE\nx2QgS22249nPp/PNmrb3crg00MNQ6zEyoP8KhK5VZmXCM4VW4iMD6Jqhl92a\nh878mWyciw82MR12orDZ9t7kGP99CtNTV36ucIDYDtHkN5U0O2ECCgkszi2L\nC3AmKLt2MR42NexatfXbB5ZH4F1n+/lh3e/OLxqAm6Ap1OQx6d31whzq+dE4\ng7KQb04uipAOC8Hm0Cu/8TYs2CoiNkMpY4/hTQOb/T8zh4C4eYdeocOtoxkR\n4NQaa7kXhWtAkQN8N13UFYlyzs+Pw1RLgkLM8wSU0P2m8ruhs6hZ5zBcfjAn\nH5YE\r\n=v5Al\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJFgtAOki5oU1jpfVB+GblIvkHvjW5H5IXIJd9H3ko6AiB8AGfxYC1oHVNH6mpWjGJaqihC2LMYOxU7J3qI2pT4EQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.0-canary.8cba18fa.0_1626294425736_0.42168302955381454"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.22.1":{"name":"@material/mwc-textarea","version":"0.22.1","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.22.1","@material/mwc-textfield":"^0.22.1","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"fbc09b4e8766843c4aef86023c2cfa4cb9e7cf5d","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.22.1","_nodeVersion":"15.8.0","_npmVersion":"lerna/3.22.1/node@v15.8.0+x64 (darwin)","dist":{"integrity":"sha512-ta5ARYpxaCRvseXTKkp8tFBfJ0oP8FWsE4FymrjV5b+UEAEzAzjcWWolIDyS7DdixSj1ROI5dJHsU/on5lWPjw==","shasum":"b169ab026b4805fb0b508064cba0990ea3a01fef","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.22.1.tgz","fileCount":13,"unpackedSize":38973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg72rMCRA9TVsSAnZWagAAUBYP/Ajio/xBLQMowyx2bdwY\nH0v2x14td2NauPaI80EEbNwWt1cHb+WB2eIlxY2lfUTCnjRI7aSqICDnM69e\nKhLki1Ib2410daD4zJ0Ke6KbPwcSmPxAQ0dnl1Rd6aDrzRhIIcnxjdgkno0F\nqyB8Jdb5O/M83Nxu3hxP52465axfGxmAGO90xT5YqtJejsYymA3jrUAVb+Rs\n9gUrYhWIdITd/Y0GDcJza2jpElCKZjsx28e9O8O2RQcmi6TvFUo/EIN7RTv4\n6SM2GyduTcuetGIxV3fUatY/96vjl9LkR4uK/i/uR1KN7nhq6dQHtVeD2LG2\niQ3KgGGFVQjH/L0uUcbSbCDQ683Z4mzG2o6w8mNPrn+IH1ZTxKcgIAVOgbGZ\noVDKH4Rw70vjZL57xxPXHJSrNSjBVFCdIGHCXLhk5n8e7j/XqPIRjji7wx3T\nU9xGLxXut11mHvfp80LoYT62ARLoQaqCJ3do9JX20DpHLyDrasGEriBb+ScL\nu1X7gQLBojaGzzmNwgGf4YBS7+rQF+xqidPwafEUrZvpfwWqx/q5MVhX8UyL\nCiY0eujrUfuhcSdegErqFWogOHd8RySsaZjmD4GPPc4vPN96Qi+DyXWGW0Nf\nHcyf137HkTwv0qK2FLUo4CWAfcS0LyxbRI0s4dptNVx18NQHue3QIrQ7MePm\nd0ef\r\n=PfBK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQRYJQnvSvlNQtn8OHlzYyhVYGgCF3ffVWsANjZhboQQIhAIR6uTQGvcUvhPALB62ZXFJZnVQezd406VmV4iIA+xk7"}]},"_npmUser":{"name":"aomarks","email":"aomarks@gmail.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.22.1_1626303180045_0.13622137782525434"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.fbc09b4e.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.fbc09b4e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.fbc09b4e.0","@material/mwc-textfield":"0.23.0-canary.fbc09b4e.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"928fe21d53da3c383833e0766f262dd5454356ed","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/928fe21d53da3c383833e0766f262dd5454356ed/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/928fe21d53da3c383833e0766f262dd5454356ed/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/928fe21d53da3c383833e0766f262dd5454356ed/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/928fe21d53da3c383833e0766f262dd5454356ed/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/928fe21d53da3c383833e0766f262dd5454356ed/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/928fe21d53da3c383833e0766f262dd5454356ed/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.fbc09b4e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-imwdngTN+CpT13LBMDMktkwI1dcrtkPtaCFhl8+GJKmOsqOhHHrAzihngRe9fIecaRr0DOtwzJd605WG1PhdUA==","shasum":"4bb336e7f124db86b38dbb6a3895be64d889cb9f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.fbc09b4e.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg72smCRA9TVsSAnZWagAAgPgP/1hroNNTzV4lvglVgNZc\n2ld69XffHBYeUIhvqgqfy0WnyBYicjhsLtNnHXituXEVZFG/Eq0ftc4XTUCY\nWZvqeUMGJu1jW1/P7XkdGiIyiGT0RMzHzZ4RCAEchqlPtlDyNdN65tpKklP9\nT6GDvYSvaGFZ9HHD2AIFxIJ/4TQK9TjmA+qrwHtlLjWQmZQT93GzslFVHxgX\ng3ZrYlu/mVgXC0EvBxIZSgSug3lzVyXQTCGsZcP75/FTa3OFpofOK+SHet9H\nfD9G0KRwW6Z5pS4ldMdWkUaEhHvmXusZ7ayaAxJrtBqXGg4viyk1BQ39pxvO\niww/Jg9xfTNxJxbgYYFsiYFAbSmSn5f6W/Z4Yw6Yeh/OhiLXPUnnH/G5VIKj\nxU3iC1/UQ2RcDPv4PqpOCvKgIXtuKzAMIsMkn2u+fcBA2kwyTpah9mrIaeLI\nZCJS7ln0QH7SBg5O916KT2PAW/JiCm+zygiVf/Serrb/e7ZVARFV2Vh1EbL2\nAI/8NvoxvjJEBdmlh+3D0W2XFngimjMgH4+V8qg9+xBeVHPzznAPcoBNJqvv\nIAJBt7QQa1A885GjNnn4ffMP++5Bja2KBdD55B/S4oBcL8tupTPJkgZ45PBb\nW3FiW2+dE1FsAzplGksbwLbzcTgHJ8yJ8cHkgi6CIJnFhqzNw9EYztSu3F2s\nOrIT\r\n=3OUX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgSF9dxPAPsgVvgdVX6gK/s8cEYRzQ/wEj1hzeYuvl9AiArLEwO/oire9IKRU7ZRGZgs/hsYrrWvNoSs9HUes3+hA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.fbc09b4e.0_1626303269986_0.3838352193764407"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.73e9f83c.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.73e9f83c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.73e9f83c.0","@material/mwc-textfield":"0.23.0-canary.73e9f83c.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7cb506f7d4ddb8897417b2451e1dce233644faea","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb506f7d4ddb8897417b2451e1dce233644faea/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb506f7d4ddb8897417b2451e1dce233644faea/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb506f7d4ddb8897417b2451e1dce233644faea/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb506f7d4ddb8897417b2451e1dce233644faea/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb506f7d4ddb8897417b2451e1dce233644faea/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb506f7d4ddb8897417b2451e1dce233644faea/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.73e9f83c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Vd3Vj5n6wSLEi4ziF9LmZVpHrDZYxf8bsfOG1TUUzPyZH2wR9LJEosnumjKQlm2c3RaPdJ6oQVDAEIGL0g12tw==","shasum":"0120e7e380f643d34b54c528382e53c5f61d21e8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.73e9f83c.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8J0aCRA9TVsSAnZWagAA/2QQAJh/iyxHclI2PW1cgYoU\ncQ2sf2hQahZT+tBi+A7jn5JrfUmOvS6EZdtxb0LAEi8G5phZnwQ0AO39Li+X\n8caWdythB4dCRVj2RwEl2PjOcrgBkU+355MqFr23qFRRkaPKWwrYzoFiSmEt\nIVkDi5l2qErYfZGtTbGaFeuQeqaC/4/AUNO7ImZGgOEwyWF+CM6HNT5+Fl29\nFkXic0V66SOqhB4Q3ZZWRnxAQ9AeFWX5YiSg34qRmxqVVIObP3MGh4tRgBgx\n9OK3MpsuFpJRYgYu52+ENTR9FC+uDrCMBKmDPOfooMWeF9hgXkSO4mgCssNX\nhiBe3A4s3x8XlAGcU4EJEBMv1CrpsTesKAJ6R6kj5N6erZz2R/sS0Hgx2s86\nd1WBBvfVeVsQADghES9ojTK/uaIWFQlGfpKCyQlJ5Z/OCrEeiHQ3oGaw/WbX\naj/4o211HPQcUVck7Tgo0LCYNVHsHjS/IRqLPQxpw2pXST2M4sqU0xBTU9da\np3Oypx8HWEzdI4Yy6TSqNh/CGWdNWNNgRV3VeHS8moXb9vwYvrVihKuYrZNX\n3pxH5z/MAjLN8WaMfl/zw8ErTDKrZmeFd/UECP7+ZgasIwCU1YgeuYm9+hBC\n+0hHsaX8GzYgyAN7xPObS2vgeM7BFhQS4R6PLZ5uGGdzK5VZQ39DYHhZVs+S\n5orJ\r\n=cBhk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVY9Bvk6xi9uKBXEeckX+mCAVD4I73pb5BnnIs1os9kgIhAOUji3SLBRmQyDhDGu8cme8BmyneyTx0kjC0vvuq034m"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.73e9f83c.0_1626381594336_0.17281732746873857"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.cc0aa7a9.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.cc0aa7a9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.cc0aa7a9.0","@material/mwc-textfield":"0.23.0-canary.cc0aa7a9.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"46cd2c64b884400d63eb38fd81a1ad72accf42df","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/46cd2c64b884400d63eb38fd81a1ad72accf42df/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/46cd2c64b884400d63eb38fd81a1ad72accf42df/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/46cd2c64b884400d63eb38fd81a1ad72accf42df/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/46cd2c64b884400d63eb38fd81a1ad72accf42df/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/46cd2c64b884400d63eb38fd81a1ad72accf42df/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/46cd2c64b884400d63eb38fd81a1ad72accf42df/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.cc0aa7a9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-6bbqiTPMTBgAaU3uxfjxz69Ju6oDi3mTROSgVOvosD4RTv30IpJqXgY4afi5qJgCKdyJYdwQdWCsiLl+350s2A==","shasum":"9540a84685c5565706ee358a5f0bc3f4842545e5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.cc0aa7a9.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8KLJCRA9TVsSAnZWagAA5TQP/j1ZbClqlkuXdz6fcqZ7\npl86aaRHv0X38e49R4utsOhRu2ckBGt56r4lPtzRcRj9B8nc3gJ0yzUfMdvV\n/hEZdbvk0FEAW+YtAIvLN9TmXB/ckgXiFRIfCOyydtcIZpmyL+/buA/YFI/s\ndTLf1QLJ2N9NYsnox77ivNBJ2WhR7CfUPoCo28PHHq42EXW7tjSpcdndTbZU\n/ayB8xUWi44gTs05mULygEQiP93V5fShyX+2Gyk79EnTokxYJG2pSP+Kr4Wp\neleygUznaqDE3h1YxVhmsRse3si7EMD8pGIUvp8YodYolgJWstW1RAbldIih\nChNrS9pq6D25POf/3g/gCi8ZUr6EmJ7PXiNWYdXdBxLaoufgnPiTMYnqtpIV\nM7/Q+Wkp+qxZ7Vq3mkADjD8VCkPkdJxAoX3VIESvqw33DcwFBJaaISaYC8pv\nFCem9gU4UujpsTQisB75Lw19dIkhVjR8T24ApLS7qJzwnnWxpJvZlf3eLtIQ\nmI7lAnUtXaSU7qNCSc//WVQknBU6KJ6GOdv6CIxQCC2hQTkf8FL8g7568d6g\nzrB+8u6vMBXrJaMX9USjsEgJMxHAest9y4EUlfdVcFE75zmdQVIu/YDD2i4F\n5PNd/S75pjvvQOgfAvsCRHDkduAmR83nz9RsLtl+dKV3g53SvU1/9BgzLQib\n2FW/\r\n=MZkX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGkUBEAPKXl8azrBXkw1OgyQ4MKzTQsDevSGZhSwCJCZAiAJycaEa/Cp11kisdQA8hnqQU0awwXnaN9WJdfm0bhAFg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.cc0aa7a9.0_1626383048925_0.36219781717517163"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.a8fcac45.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.a8fcac45.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.a8fcac45.0","@material/mwc-textfield":"0.23.0-canary.a8fcac45.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7319affa5e07f6651089343a3fdf21864f2d3de3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7319affa5e07f6651089343a3fdf21864f2d3de3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7319affa5e07f6651089343a3fdf21864f2d3de3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7319affa5e07f6651089343a3fdf21864f2d3de3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7319affa5e07f6651089343a3fdf21864f2d3de3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7319affa5e07f6651089343a3fdf21864f2d3de3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7319affa5e07f6651089343a3fdf21864f2d3de3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.a8fcac45.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-3/XHw+DcPvjL8wTAA+8pIlQOxVHf82l6oEpVtupnS4gu7Q03f3UBudHRDBzHWN+/Nh8dNitmvPDBZ6rfVF4hGA==","shasum":"2c6f2801e600c3175540a02f1d4321bc255e5e33","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.a8fcac45.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8KczCRA9TVsSAnZWagAA4roQAJx1nLhaJNeC5VwFlMUX\nLDfiDT+Vbbe3Pq4LVM86axiwCJ1ehqpXxPzv6FEpntsUfzqzu0dXTvaVKOfA\nbR7F0zPsqBxZSX3ncczKdxz0vmy3jEL0wdyJMr6Gq7ZuK8d4J+2dDagBpLBi\nzdfNydQQaNjjRuK5GmcqdHVbEyDq1CUKpMGyYDzKKyss7DMAmgJIDach9xgV\n/aLT/1iIxLN6aB7mnKDxiTYxW6guiYwdwWAHuO0G66upSJp5RlXmhyfbCYzW\nqRUySlMqHm7qbM6a+ZyojaZ2wcvVgTFCoIsSS4FEKA922B1q3DmxO6Ilau/b\nU8ecsm+l3/UYB258d8LgSBBQjyakfnjhsrq7tFXC3O0u0xc7e8fRpHbYbh4z\nQ22AzlWusZ9LG+X49YiLEqnzRJY/LV+hZ4i/POrQUgHfKRoekO67mD9D446G\nS9r4gcsrXgHmHH6R1U+X/i7cU6NHzmy+1VYsPjhjhpvYuvsFLZdFTrgaklK3\ng7GKK8e+iWaxhHyknf27F5Qq3IE9Pcw+72GJwUY2aNHysl9X2U9f4iTxPliy\nMp5SbJ6QwyfGA6W2pzD4tCBCq95eESuDYFDylyYuy47w1D7RdT594zXrrWAq\nCem202sBVmM8ENtMikKlUFnslxQon/MOxz1UaFki4IVBoAKI6yFCOf97L4c2\nlnUR\r\n=Z/f6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFKNJWxPUunMgSPseAjpJKJpS8GV6fYOK7T8JLu+BPwAiEApOaTni+aM5wtLcoMaxAxD+BQqhlESLREhjelI4ULmfY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.a8fcac45.0_1626384179386_0.8089652605122655"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.3ca580d1.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.3ca580d1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.3ca580d1.0","@material/mwc-textfield":"0.23.0-canary.3ca580d1.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a2e57ca3915a4619a2a2fe234e3e3bb8be5a5496/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.3ca580d1.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-GZr36TZkRVrXfKF25rNKPGeZCi8igFoqH4T/QluY7/yUMRSTPvfMJCHdmY0XAap3uu0ri7xuQsj7Ck3VR7/kPQ==","shasum":"2c2d2c4ce371718e0b6a2f258b40929791f27ee6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.3ca580d1.0.tgz","fileCount":13,"unpackedSize":39025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8LDoCRA9TVsSAnZWagAATqAP/3rIqS7IgcBwaU9f/vM8\n1tgm4UiOvMmsXHkY1+uZ0wkGyPNRWJ8VKbp3eAIeuM1AN2vy5YTI5U8Joru2\n69ou0BxjW3N5emE4D3Cb5YqhF5Rb0PaWuz4gIs129To2BfrXM1gPGTEk+auY\nEahvIRIklNe4ETk/aY6HzpJnaToCUTODBpTQWVJjmM8wKgq4aBD/UbGtQKt7\nLdhwFDMjy9IudVjUvMh2untULgK7JwtiIbJIzVCZiGwdH3jTVVdOL0niVsPm\nKLxtpJMQkFZZFC+ho3dT4yQ9qFT1n0G8jKdrwCyKTUEi6aGbR8/tebkimz3t\n8GMmQoMapfD6qE0Qj6y/RHK+0obh+E7Dx64P4a40eWPskRsPKg4ZP+DEYm/p\nBKv2DTNb6F4X1upde89kijj4kw+WKPDi42mpcP0c8KNTvpwL8eOwcMM+kgA2\nQAOk8ggIzsEET5zWgXP/GmR1lZElOswb2bUw2ZRxx0mQqWzewLmwZw4kOT1V\nMfswsQLYLoJAIniZo00vJTEyDkgjenMiUT2EBLHmgLKa6eC3ki/ucLwfcXCr\nM2DWRNKIrzNVyADgkTIZc3XqVHxlM2zwi/VuWw2N0X3oAJKZ13f634FV31ap\nYiFrOYjDlM8KeDsV5WVpBDBJ5ye0mmfCyydRWGKXRFK5gHfPyIzCagdObNIs\na/T0\r\n=2oUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrIZCxf1zu9JVc2YfJILBcpC8PTppHuOs1BUd8sqoTrAIgfwswWnUPlOW/T67YH+I6BxbWN3VKLM2ZU3/Jo47WNpQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.3ca580d1.0_1626386664733_0.6821545305346135"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.9e41cb2e.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.9e41cb2e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.9e41cb2e.0","@material/mwc-textfield":"0.23.0-canary.9e41cb2e.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"66f1b7c941717bc279a73626020dd81fa186f3b2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f1b7c941717bc279a73626020dd81fa186f3b2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f1b7c941717bc279a73626020dd81fa186f3b2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f1b7c941717bc279a73626020dd81fa186f3b2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f1b7c941717bc279a73626020dd81fa186f3b2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f1b7c941717bc279a73626020dd81fa186f3b2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66f1b7c941717bc279a73626020dd81fa186f3b2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.9e41cb2e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-EaguwEfuFwVBRsGkCV6Y9tAIelHbyI7fb/Zu/Yctd7On9ufz9aV1+kKqyIM+Ut1VQewPY44F1t2B+qxOY5v59A==","shasum":"a0531c27a5963f0e04aeacc37b840af43cc7e8a2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.9e41cb2e.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8MAiCRA9TVsSAnZWagAATM8P/3sk2nX/pBId95QcmvXn\nuDTMu5jmQEwsEeeAY0wEW88nXM3QMN3J1Ux0kUmpF8uYakTT8GqNemL5YDnw\npZp42EXULhLclVFRhlf2cUd5pLqYuBvpNIeBu01xMwVAd70qLTDA7BUygGoH\nehtbVWsXw9nt09BXS5gufrLGMZNuejXipzgjSwER2qvRE4Xzhzvk4mw7ahGe\nY/LCmOQik+rTQof2T/+4kZ/fkUhNUJjJD/aWtUzishAXndL+ITt8OffKfkwQ\nV33MVF/5jQFPadIMkThVQvYNOEf9SvSOf/WAbzS6U1BMs//+rX3bmf8To29N\nnPmcUGRqzi3TEfK7RDd937mSC+ekiVXH96AnKqK/Xbx6zq4hyIuo+kJXlreb\nNtW8S7bolZbEnx+uJybczEQTO9wGw7Qm15eQQ4Bwk+ODx/FDA8SYgfz6Lq3b\nKIOFU0ESP9b5O89gFp0GQb92fHd600m/Y+mUeHSWrQEcnoMr+jDmvhY+q7Qg\nRaNXMqBADcwTIWqLJTnmlZ1pARr5VlYLwKL3gZ1CWTLryQCSOIW6DPMLEYwO\nRyod33WHqnbWiQImFqjmn1oiWSuH4mDEbk/AVRm8lANgMdKGeAB0QSb/2IOI\n+eE+cfUGL2yqw8GgHnkyzsAa3XcoiVJ73L9hnk5kFt1ad7/vCmW4Inj0kHya\naRaI\r\n=BE8R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAmOhadIlxZFYNfnRCzaV/m99sBTVw2Bm1IsvHj82UaAiEAmgdb53f2BPvDMqVnWBTWYJuIt5nAaOt1mNTSjf6sMNU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.9e41cb2e.0_1626390562600_0.6683753624291455"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.c180db74.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.c180db74.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.c180db74.0","@material/mwc-textfield":"0.23.0-canary.c180db74.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"33c53eb23c6f331885c1a70223139ee7e69ae97a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33c53eb23c6f331885c1a70223139ee7e69ae97a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33c53eb23c6f331885c1a70223139ee7e69ae97a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33c53eb23c6f331885c1a70223139ee7e69ae97a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33c53eb23c6f331885c1a70223139ee7e69ae97a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33c53eb23c6f331885c1a70223139ee7e69ae97a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/33c53eb23c6f331885c1a70223139ee7e69ae97a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.c180db74.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-9PjkHSUjj+gHSJIAptdS8HJL1k/XV/54NTyuepMLJ9DAAl11oVz5CoLkQctFZJN0xFD6XZ27r7ckSTVWFxVWQw==","shasum":"2e7f42d539db31b82ea4a42c3370e5572828e6ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.c180db74.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8cEECRA9TVsSAnZWagAAIaoP/3iYz7+BB4xQvqnSNHhG\nZJmUCe7/Nl9ecEsgVZquL8ehex4T1xVwGRvMmNrdNzJAYYvHqo3mkIwEcdTg\nNqtX4coWkRY3F4Fyu5/KXTPPiMI8jpHQOU/Paw93d/KDWrSGQ/h2FNPee48k\nLIztyFhKeVJFxNNQcatF+wi4xv2I22H44K1F8DdGcRRCbIn2ta+9lJ5VIsaU\ny6FT2rha3EXwLsU+hwCztGbORYs+6erCz4u2K43o4EX3lE2lM05t/S0twKjW\niuUAd4vzzw5SV2GF59TG3KgeaB8vpYBPCe69W0UqqgsKc7ZV0taOwAHTrrkX\n6nmxA6j7A18owfWnz8UkjLjPYC5xXKVgrw2zqhrQYM/u8DJ7u6qPAewA8dwy\nCI2aEcwQY8iZHAg2bRsM8dBuCd3vZ2iSV7D+Tuewk7HPmw4ro4kcSdSECfVK\nxHKIox1QtLi4ResRlLkRzfvuO0XXo2kjXrC9upbVGuiIZ+U76ivqIA2Inz+S\nrZeur6ZxJfFrU1I6J1Kuhh1LMsENrSHHUAyFKdDKlq9GUOD0KhpjOXDjx1uT\n9W8Dywm8iyfyspN8jVtLDTzLYVKCC+BidCdbe34JVTf2w275F1DNthQyfb42\nkCMYwnb0mkqCxMBFYyRSe2OKK+JnWxe6miUiKtPjd+5Jfndf9Z4oAyCj6wPj\nPTzt\r\n=vhKF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/bixLVEKx7JkZw2h9k6ZnZvb81WIp8nqzVaFTqr5gdQIhAKTI8uVHD6YTomLLZ4BXYkMx/WkQ29E5sK5PcdlEbP6x"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.c180db74.0_1626456324390_0.15236217336874924"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.0d0a9267.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.0d0a9267.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.0d0a9267.0","@material/mwc-textfield":"0.23.0-canary.0d0a9267.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"edc1a3fb88ad7e6dec8f22e73f329dd02bca032f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edc1a3fb88ad7e6dec8f22e73f329dd02bca032f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edc1a3fb88ad7e6dec8f22e73f329dd02bca032f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edc1a3fb88ad7e6dec8f22e73f329dd02bca032f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edc1a3fb88ad7e6dec8f22e73f329dd02bca032f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edc1a3fb88ad7e6dec8f22e73f329dd02bca032f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edc1a3fb88ad7e6dec8f22e73f329dd02bca032f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.0d0a9267.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-C392e4hW2zBtlZWiqUSgsnSlZWOIFp9hX4LfzoRQxg5EW4wgpaecCBM5qGi9jT3Uw4zw1ziatM4A+/4/klLvuQ==","shasum":"44d2f3301cd14b5ed26c8ca2cb2d6205018847ba","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.0d0a9267.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8ciQCRA9TVsSAnZWagAA8AAP/1Pvv0kHmkdwGZmRsYMJ\nE8xqarK26a7Ef5MAyK9FbxFWa+dt7PBJNvKp2tdScRU7rfld+orCGb5ofXW/\nEIdxpb+A+NkJWPdXvYuwgS0mnrB2yQYj9prhdMEzW8XDH8tbIfWgeZOfb/Bf\nqVzS/TXmFSEcxNBsSpMJ6uXyKdp8QV8pu94jZ9JPqEffBdbCSAvDTci/ROB5\ns0t9c08utWkO9deLJVyNbyEhMqTokejyYQabiXfuJVbFsE9gDdVuGa/my+X5\nfaTXVmz2DIw/8CorOTspCnpyF4yQs3oYpl3OfO62o27OFZGCkEpI8AlZFu0x\nWE9tZKAZaTM9k2cdTQLRl3UHhr2bKOmfXUwk7WW6KbZKSxEuPIPxGuRf7OMc\ntAUBEvBvOO4nKv3Nl8wXH7EwyYvbijhRq9lcU3VyUuUw6xVxiQjnzfiUrd+y\nYGjQBn/p/6abH5kLLwMrPW8HOuQCimrmXU2KfxAq5e21Z/DaC5b0hj/sWjmb\nsA8Gz2WUhWqIEM5D1YJPgO+7UTA61B9P/8DrfLueld2umYBy0ZayDfbzAE7b\n5U27E05e38+hcQ/ala5NSodVu2xPLfiUdv7YxUVErBg7Nt0/EH7GPL2WxqNJ\nLPiX2IiyWu9rWqPfAMjWbYKU9YOVAXmvkqsA61TGYHEtDaNuRYCgLzueXX7Z\nbZ1E\r\n=sX+V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO8QgYGfGICRHjQXqmY90nZdO+/9Os0mPvPhAqGkOgBgIgPjFZjNcAUcvTRWbVwan4nH91K+6AU1W0U29/pKW90MU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.0d0a9267.0_1626458256274_0.47645930673461034"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.d234ec3f.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.d234ec3f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.d234ec3f.0","@material/mwc-textfield":"0.23.0-canary.d234ec3f.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"950f54539b9a71153ac09a57ec5710112c307c8f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/950f54539b9a71153ac09a57ec5710112c307c8f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/950f54539b9a71153ac09a57ec5710112c307c8f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/950f54539b9a71153ac09a57ec5710112c307c8f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/950f54539b9a71153ac09a57ec5710112c307c8f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/950f54539b9a71153ac09a57ec5710112c307c8f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/950f54539b9a71153ac09a57ec5710112c307c8f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.d234ec3f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-wojpaOOGZYROtkCpkKvXvj8ufsJl38IqWirOZpFoyJsGgarAev6kEDwO4K+1s99vbrs7EGyKYG3DyrSsx+x2vA==","shasum":"89a38ffb430f28490cb3ed33c6ceaf9375e547e0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.d234ec3f.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8csHCRA9TVsSAnZWagAAoPwP/10EcgpN9OlIMpktyP8+\nKGOQn2frHTVo+cZL/WNexLY4AF7dDKaYIIOdHkwd7Hs4Jw44zYkSWoBk8pC3\nfLtIj6B9HvE1SPUMAe+V2ZpXyBCa7tj2pRX+VWlHn8av/rl71GKdfhyC3XzD\namvsIoIQom1l/8amdtrF0Y2rS+zy+wISP2v1biU2ovUQ2ucGj7inNpjaVmnn\nG9KdIYO+D42vWeUf/tAbzkG5M7ovleBwVGlMpqBIh28VZvYCDrF38PqBhDv5\nowpUn1w27IYSXRg5LBXuoYZaxyqJOzt+AE+nmNNkxPdmWLoAbM6bBHZmbBeV\nARdUoy4r+L7afCZnAWbVAg5gnFrSmhvLJt5thZU6Za6IOsppPXD5cwjsoh/n\ncHgIGYDPCUING4TsIUJ4j1n7vUZceTZPDWpEmWYiEB+e87eg6HdZe+y+TUOO\nBf9Z7rhupsDOREVH85oWgQu9OgwUsTxAABPRVcMxFZDgKWLwvqcdKSrdFLd+\n8ceEdr3AzD7EhSJnKWmqxi/0sNNCi6Vc/x6/fdeggJjMg+3UqRG9+BDpqkrr\nKfuQ+NBUGkzFHGrBmJQdD3G7rPPG9I72jEoNLZapDSPvaXu45HAN/KE/HvGK\nhGItvzyZyp687a7xP/bxcFYMrL4sJCZblKr22IFYldY7a/pJ8k3kQMwl3u18\n/K6w\r\n=8Bx0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2bHbPdEeltgPgRD+ZmIZpi8iIG+h8p1pro1A2uqNCjAiEApkt4sRL1ib67JQMTLcA0kr/lH5NE5SnekFxM4uxnyHA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.d234ec3f.0_1626458887406_0.5811020478895792"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.5cd4bcdb.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.5cd4bcdb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.5cd4bcdb.0","@material/mwc-textfield":"0.23.0-canary.5cd4bcdb.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5c053f1de07d32aeb409f327470360f0b5c02ae4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c053f1de07d32aeb409f327470360f0b5c02ae4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c053f1de07d32aeb409f327470360f0b5c02ae4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c053f1de07d32aeb409f327470360f0b5c02ae4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c053f1de07d32aeb409f327470360f0b5c02ae4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c053f1de07d32aeb409f327470360f0b5c02ae4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5c053f1de07d32aeb409f327470360f0b5c02ae4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.5cd4bcdb.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-UiWuYvzYbAl7Akqu5oFYaBj4d26vNJa7653D6CabEuARWaENdkQHJPvQ10TZ6SEoBVgnL7jGL5sfZGsLvy3RcQ==","shasum":"9037a8a25e234cd53e4dfdc1df1b2573350b2bf5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.5cd4bcdb.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8fY9CRA9TVsSAnZWagAACD8P/ipMQsgZ4U7+PLlqC5Wk\nuwkTDZMNG+lG2zj7yrbO9RNirBcjmj+e77G6loY1+WI/B3L5dDg16AMbERYz\nUDlVU3XUmSmJbs2vxBzg/b30eqKr9qBWXVo3ga7eoJyyEof0xc/qKfbaUZ2A\nsf1c5kNrgrDBkx7FzUiiifMYI81dhFHSQqmr7efabGMvaKo9KxLOg5cD58i6\nUFoIulqYx9naYCx4GnFFI3a2QyTRWk5tL8IQGHk/p64KnHpscwS9OF7Zz7RD\nZv0yk0FQP5rQH/JpIqLWzKfLFHosqaRmf7fbSc+diWctu0bDxw4pyRSfnuqU\nlBYmDC989/jR6sjep+FUIo7Evbglq9La4AbkoyNuTE/ZGQma9u6vcE1qmX2S\nQ+hQQ5jynhEWc4p9zX2uOIc4YELYZ4edLV8u8Rgivb3fprNnRqbT8OaKsvUu\njM8d2NojB3RtlVR9ZQ+G3+F1rWkS7QoeZkMkw57upNBYCzfCnLTPbtTmKvfo\nDkDJviiRnhM71ReY44wlMZd0srVHYICCJUMaVION+10FxB7zvAsnzX03AWj2\noIHmVNG72fesLfpBcYA1FYbHyeZWiLHPI42kN7jkNPMTkpcEFFrUR5eaaNDj\nnUpottfWYx+FI1Uc1VlBhMPwc4jpHUQ7m3MBJQ8Ych5yq5xBCTrPoyh8KzCl\n3zIC\r\n=G11z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfx/3Ap42EJbwQT2ivtVlo66uVT5GeNE11A6sVfzbRoAIhAONP6qLsWpzQSasZnOJDuNiXDJG9TIduW1Ox2BW8G8yp"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.5cd4bcdb.0_1626469949195_0.4718057768661543"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.2b133cb2.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.2b133cb2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.2b133cb2.0","@material/mwc-textfield":"0.23.0-canary.2b133cb2.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"72202d1bfc4060bef4aa100b9593a5dd27125d0e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72202d1bfc4060bef4aa100b9593a5dd27125d0e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72202d1bfc4060bef4aa100b9593a5dd27125d0e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72202d1bfc4060bef4aa100b9593a5dd27125d0e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72202d1bfc4060bef4aa100b9593a5dd27125d0e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72202d1bfc4060bef4aa100b9593a5dd27125d0e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72202d1bfc4060bef4aa100b9593a5dd27125d0e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.2b133cb2.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-FRURYb5/yMMvqbMPwyxhR3CVwGUZDnHHshBjLFZRt7WmYQjYNMaajqcM8Kce/EvdwOQX0v/CFvPhqlFy8tyFkQ==","shasum":"e7fa8a5b8049fe42e0b42715b62bee766fcef00e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.2b133cb2.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8gMACRA9TVsSAnZWagAAeNYP/2BClrZHQzeSoG40uxSv\nrpeDfXPUobaefzziyV2DpPIT5iranq3W7SfLOYOj63gVXXi/ho4pDixVHsRM\ncCVDzh3lXS8i3RodUVrvJ39HgaqT04iV5ksvfIGQTg+EN8bHG8xIdSYwSlI0\ncUCB6B64fJE9IpPuga9MHBpibTX6PRnkdFBfShIAw7KzEX/HbrPMsoSA0zeR\nIZupHEOORRtBYcNFRmHEWy9M12NQQQ1aU7UW3TQZZjYb1bV1shHEk9QqXmAP\n/04h0DygRbcXHnlqLQhwxi/H1CUVIn+rIRSFr7ARErpKVOSWbmf5w4KEloDk\nStDGhm5pUGHaiLHDycW19sFh1aY+LvzYxO/FAj77G0rWxm31lEKtt6T3rGRF\nHizU9abISqbUDDxrU0ySMCjF54OGtQUG3cYDzdlEf5GWBh1KBZtqiOFm3+qW\ngBQ3sbldDzwckERzI6eOpzGGMw6p1WgKG30yoF+Vjx3Wi7IDsXPdrzmGPPZZ\nPhj7AfX+Y94C9qvKSCTBQuICi1AfKLOKpsXjOm2IHyN76jC+VLQuS8Xq1Ywg\nU4oDK++sln3vB8NsmIqe1j0Bs90G1ItIWNFVfOE6NwvhRISxobyUN3Z6b1Gw\n1Xhoa+/cWp+XNFSIpssd/VpkxfVUGl0HFxRKkirNEj9mcOwX9Rt2hk+QyoY1\nARDF\r\n=lm6d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE8ypMHW4tB4URfrCA3bbj9LfkdifrNE09amt7kAADGAAiEAmznxH/f3eWdqtDIOnwUPwX5OmmSiWOakP5TPWKFDPUA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.2b133cb2.0_1626473216296_0.07791255361145533"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.ae4f422b.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.ae4f422b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.ae4f422b.0","@material/mwc-textfield":"0.23.0-canary.ae4f422b.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"8bddb410bdb60fa3790691718471a6b49c3f8765","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8bddb410bdb60fa3790691718471a6b49c3f8765/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8bddb410bdb60fa3790691718471a6b49c3f8765/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8bddb410bdb60fa3790691718471a6b49c3f8765/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8bddb410bdb60fa3790691718471a6b49c3f8765/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8bddb410bdb60fa3790691718471a6b49c3f8765/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8bddb410bdb60fa3790691718471a6b49c3f8765/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.ae4f422b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-azMIQro4WJda0t2ePwtQKTmCeYKLabX1gMi/E68c78Gha6hap0Qa+yVqYi72Wr5o3dD3JepgVJ/QRjZV2N/Ihw==","shasum":"952da37e69f5f8cd64a50ea9f22dfd4f75699c77","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.ae4f422b.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8hw1CRA9TVsSAnZWagAAdO4QAJ/ekIHDr3A8grj4480i\n+21htNSt9FJU9bsUx4AW91zQiv+8qjVHm9CNWYmy/xxAq+WnF0FClyNWTqrU\nUPAEf/gZx+FMYk0ysUHln/t1uWYQiTpJ/zD9YC1A6HNpwpwWJNNnY9BKMz26\n4ocJ7WP5EU98VjmWe9rdfKWi3ifcSlTg3l1nsFyZxOSLo7jRq+b8dhlLEUc3\nsvL/miEY5XUb195Ph5SFIKN3XB368vpRoLFUQyetaituCkbYjmKdWAvfO4Pe\nvm9GJDUxFjdWEL7se5zBu5tkvhoF/MIU2N+fMSceGrd4bO0Ip/mmDtaOGtRI\nt6Pnjjg2b/2uHNOef6YU2Zh9X30623n3cqpA2jf2936081jcuOVmyZ8cuyAR\nsrEFh5GXBhfdlmcajaSas+uEiKkYi+0ruyzq/JHTun4zf1754EpcarUOfyym\nSJd3Oi2A6hz50FTgIqlw0Bm580pQo5xSjhwuDRo2JiToB4b3SZaNQLWCrD9C\npPM30xhr9uqXDlaSFADoZyKrjAE4N8CouKuBoBz/TODm51H6vl7i/L1TovOI\nSBSJzK0M4aZKoRiOpsQdtcI8keOZOCfO97OGfGbAECfQ5mjyz09rO1JbuYGc\n602qWMKW4wn2JIeWc5tjIeF5IdnExAZbYHXs2QlL+srK4s+JcTYC8ZlcHQL2\nHXJs\r\n=ru+0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEZ2AXEZX9jTkOI9Z1Q7kgn7ABA1bqb31+XqauNoUCZAiB2OxODfGrAJ6NaT0RUK8jsf/BlQmp7jabNZBLfNFJVoQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.ae4f422b.0_1626479669223_0.07727990894740322"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.90ff8057.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.90ff8057.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.90ff8057.0","@material/mwc-textfield":"0.23.0-canary.90ff8057.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"f90c69a94171ac1d67bd6c3315ba759c0e2e79b7","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f90c69a94171ac1d67bd6c3315ba759c0e2e79b7/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f90c69a94171ac1d67bd6c3315ba759c0e2e79b7/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f90c69a94171ac1d67bd6c3315ba759c0e2e79b7/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f90c69a94171ac1d67bd6c3315ba759c0e2e79b7/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f90c69a94171ac1d67bd6c3315ba759c0e2e79b7/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f90c69a94171ac1d67bd6c3315ba759c0e2e79b7/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.90ff8057.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-fkRljfujdN6C5CO9IMRmqPFAnkg9UUyYkQ8/HdNnl1ZUeZTHxHbmt8ehcmBWtgQeVhtAV9LMq7EZjPpR5VZFJw==","shasum":"a952f47e6e04304baefe0147f1f47431b3755fb6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.90ff8057.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9YdLCRA9TVsSAnZWagAAyscP/0jNq0lNTNPyOw/llG3R\nl3bDLke40fY3NCf3iz2yr3/iy/ZKCG/iZBED47k04z9FM92+fc/B+wpAJ64e\nULlBtt5c4xwDTkb6Ckrbj4fnTzzg0IoW4k9NuoGs/uZnuMxHuXyyCSSGcVSA\n1ymoNdwxb/8sOn+wB3Pz9cKkOHXVqZ6TQAri5XLdH+H8ljN+n3RJJCuUh0RI\n1SLzmNkgsk4u6sAZK68wR77aejFyR8YnLdXuFlDuyixg7xQGHsfioyYkr4cz\nwZy7RDF9LM+3iJh5uPR0K/ccmc9wFSKfVWAesZX44Q9/wJzsKSQBIJ/QGHXw\ndLXfxBeZ42tRhx+p3P2cKssqFfWPBvu9bqfeP9Kq0Jn0q/ObNZWZm1X0eS8Y\nuM+V3zygOdoiXcGin46iTdHBbO2L/SeuZyxyjQkVsDktOZhh0iJX/L/obm/F\n3nJGffYfQi30QL8vsyPNfRMxD+hzL96HR/6mkfkO1AGJ0a42I/bOobblVAXY\n0bBUsd2C81J3daWg8I51CFdg66O3spABay+kT+fauZCCfDxZDX8iXQtCSOKE\neqsHsOX1Zlre2qAZ10xkLblz1cv5TdRBTInCWXdvcNKlE9Ux4hS1NUWV7+xh\nnTmzlnEyAK+d3torHrVzWo93IruxTTB6rRA4epnL8k36rg+0QWhxIxUzRT8C\ncQaU\r\n=vMKP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQMa/6Irqba5wBfjBrtR+kl1mvXD//JZTsnXmRebcFpAIgM8IibqPwFuhBeWBpa7zXQjAvsgcoL9DnGE+13GZTo6I="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.90ff8057.0_1626703690787_0.3292334747715704"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.dd7b75d1.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.dd7b75d1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.dd7b75d1.0","@material/mwc-textfield":"0.23.0-canary.dd7b75d1.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b0752e4552aba84ad89d4eafc1a2a995bbfa0607","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0752e4552aba84ad89d4eafc1a2a995bbfa0607/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0752e4552aba84ad89d4eafc1a2a995bbfa0607/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0752e4552aba84ad89d4eafc1a2a995bbfa0607/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0752e4552aba84ad89d4eafc1a2a995bbfa0607/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0752e4552aba84ad89d4eafc1a2a995bbfa0607/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b0752e4552aba84ad89d4eafc1a2a995bbfa0607/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.dd7b75d1.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-6UGPPMcvy9fwb+Xi6dcdH8lWzUFYY531+ya+aCW4FH9UzC0L0A+ng0idM6aRCt860lOKAQmJqME2QMy/B017Sg==","shasum":"7d71611a6edd640bc54ed37d1b61272d906ceebb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.dd7b75d1.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9buJCRA9TVsSAnZWagAA24kQAKHzW29eltLVQq4ie2LE\nral7IVPiVXD6gAzcBkyu+4wxEwJJ5VGK0DtgcAG2aaO8rKqA4h0p+AX/1o9v\npaw1Lq5BEPf/ziFyV8LjGsmGTFev8x/JFJTZScbR9+xMj7agOXClIbBpRL8E\nU5uVotDoGi8bc4p8pkv9V0I23mpjuEDnJD/jg/IdkabuzHyEERHToah70wpc\nAx/fAuLd1/pprPsHSbz6dLgMI4EuXkANLRZv5DCQjzfU1vu3dA02hbV8mWs1\n8BAs8OJZHaAl2KacFpZDn9DI6Rj0R9xjPACEJaJcOwJbjxh22+4xydcpjzSz\na5vtsDHawV2jySh4kqtEUUuNPuszjCx6ACrumF7SrZLaMq44TaQi3viwmYQf\nt13ZGegEaM3Ql0SAPUBKzfzLOgBeaCrpyYMQU9poWA4xRWG5q3nWfxA7ZC5a\n2OqQ4Zgt1ZfG2MdK6pQ2bxRrwabDnfvhVArmNWcGzZWdXkEmRMH9KrVDIyRT\nR5KeffdOLdS7q+VRfXN+z9R6Ku4+CEQpn4zeXsNM5W8AZUIEEWpImB/G7spF\nPwjfpd1i5wAgpa/2znWAahkWGIHdnShkkctTcj6JVKsZcNu9tJArM/APcQSr\ng+NvHeY7pxC5V266CLS38UXte7exY/ZesOvBFq/o7MbBbDuUh399VanRSQCH\nFrKX\r\n=prwJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmY+eOohWTIA0U26pAzda4M2VQWT/L/McBVmZLVxqrFgIhAKJIwKb26ZxX0PpmIMK4Ipq1V5QOxbyztAt/78guBxbR"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.dd7b75d1.0_1626717065722_0.23139261698163938"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.104debd5.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.104debd5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.104debd5.0","@material/mwc-textfield":"0.23.0-canary.104debd5.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9dde76584b6e4258f93d65b54a1f9695d2dddb1a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9dde76584b6e4258f93d65b54a1f9695d2dddb1a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9dde76584b6e4258f93d65b54a1f9695d2dddb1a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9dde76584b6e4258f93d65b54a1f9695d2dddb1a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9dde76584b6e4258f93d65b54a1f9695d2dddb1a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9dde76584b6e4258f93d65b54a1f9695d2dddb1a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9dde76584b6e4258f93d65b54a1f9695d2dddb1a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.104debd5.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-wvn0vQzh/kyiknFyteh+iCnPx6hEf020y84btZxzLefG5HZPPOwt4G0pBA7+rNAQhsbW4e8wwwlSDJCHKW5fUg==","shasum":"ad3a7d38319869c45d95d61fad8c5a3fad0668ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.104debd5.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9gKFCRA9TVsSAnZWagAAw2sP/2O7p4uHg5T8pzFxFJYl\nKzKuNGl/oUyeUn1VqUMcioiRja9kdqYxQbEJdB1JVQr9y1iKNH9smdrvudeU\nUmamRdKbmq/Jd3EQGZv3YktEmTmynEJgDG1hrN79tMlXTSOTb6xWaWDz4dM2\nzG6AqQD8cdKspYqLa0TBEYhg5msx+QhaC6G9SDznk9/rcxTkRaR48SZlS6BZ\n7pAtbRljRttGba6y1vE9NimKSVuA3GPVzOf+PrzyJsGBrZPNCDftjdqJs5zP\n+EyNY9UJ5jLClYeKRTp1N8ZUbZqOcB+9gKQE6kE0X0n9bLExFbt9aDVa8pyn\nJKxdbi8RmzypcBSmfqqnSZbmF+udjAP+3fuHdkzU5nOFhBSKXSOo7MloO1q0\nY2u2gUtRHBhyLIc4whuZL16Rvgn5N7hFRSyP8XZOrggqRRtbla9KUICNhoff\nzLWnHkBw0SWkMICHowm8Dp7lzoE9DdhR4UzfY8YoNdM4PhOE7o5LP3tsfulH\nQDN7uTTk1C8VwfRtqZCzuViS4MSnyw0b83SynUJyvhYjST6ixXfqMFDIRKoT\n+Ss4cOc33mGNNtr61MJbK7VO3GuN+jRvO9JtfGdTkTudm97evPNgLrnao8Ym\n/cyB4t/VrIc6Vq10C1RuhBNZ4wW3pzjn0DCKS04mat8S+1rPUef5UFRNIJbC\nyR6X\r\n=WnC8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCe/cJBEaXmZHlqnqMlzyyJt7OXuubIdkxV6XJMDZig2gIgHCytFaW1eqJfQweIivYxQ8h36acpBqC+gMQTYHAoWWc="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.104debd5.0_1626735237164_0.740974442420677"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.4612705d.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.4612705d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.4612705d.0","@material/mwc-textfield":"0.23.0-canary.4612705d.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"28f0176f44158c2fa7246b69d5737a09425a6e4f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28f0176f44158c2fa7246b69d5737a09425a6e4f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28f0176f44158c2fa7246b69d5737a09425a6e4f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28f0176f44158c2fa7246b69d5737a09425a6e4f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28f0176f44158c2fa7246b69d5737a09425a6e4f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28f0176f44158c2fa7246b69d5737a09425a6e4f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/28f0176f44158c2fa7246b69d5737a09425a6e4f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.4612705d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-NVoEsLLUkTtWNcotVrg15LNxXVmVwWNTba3B3DUJXvn4qTNNIxMf0B34w/ltwtaPxp/cUToUJfB9nsJ28PZIdw==","shasum":"a260012e48a07fca104265c76f1902bffdef0b12","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.4612705d.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9vQwCRA9TVsSAnZWagAAGeQP/2snBfagvnoy/r6zf9yR\nqPuk739uFyIweUY2uZq5Yduxo/hBFh9Q9lL0ncBRPXsasAa578NTe56TolpA\nKADJXGPkWNQk3gLjMNguNnr/ylk4drGjmfQnLFdRFQ2Qd737xS4cOmwgki0U\nSbKYGHVuKntwHK6kwY40mxBqeham6LgfYxbEpAZVlEkHw+AafCV3i7V5eNaI\n9x7uIQ0CCXG78i+Vauexx7yhD7FjyhXVxkKFqga7ZXdC3uPQvdXTAE/9lj7K\nhZf9rJs8t02QXrE6NkrZWPPnigRigY4Z6zbXzWULTMBhjeUlZR7OIZP4VQcK\nDOTlPqu06CdrH2n1Ri/4/iqiRS3pjRrBMQ8qoGPJCUWn/7enZxzIQaeXRA7e\nB+GncO5HE/OtCZWBxC/WeHtYJMEEOHdBIpBcQ7vb9CI26h7DZFcLMV4txSbx\n0AVTfQyWrLTYVSuVM6PDwUrB+daBuO+J+XZm1Jo1OEgLsIn+EuQ2CaU6VkuI\nWjjch91nn6Ubu7CfzMR5cyPgMN8zC/wJ9VlQd6s5jooFfbBm3n2ZEgZ8GLU5\n4mR4Pomx/0fD4whlqX9o4W42DSOmoQW8qQBjBOX3uYzRRU9pzOTnWbCkT0hK\nBVhLOL4gki4ScfCUTyTusckN6+zcvvcLFnL3/3OqMOng/s7XfN3JnnUm5OSE\nj3KU\r\n=Bbjj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCfIC0UA373bEVEtGAgsrL37hGvlKiDv8Lwg7pWOPgPAiAW0IwvNwh+/0eCLujjJUmvN1CfvhK/RX9k1bdwxfRTCw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.4612705d.0_1626797104000_0.5888405090451718"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.b36502a2.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.b36502a2.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.b36502a2.0","@material/mwc-textfield":"0.23.0-canary.b36502a2.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1df0a9b6912d747311691d2320eb16519bf8c660","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1df0a9b6912d747311691d2320eb16519bf8c660/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1df0a9b6912d747311691d2320eb16519bf8c660/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1df0a9b6912d747311691d2320eb16519bf8c660/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1df0a9b6912d747311691d2320eb16519bf8c660/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1df0a9b6912d747311691d2320eb16519bf8c660/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1df0a9b6912d747311691d2320eb16519bf8c660/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.b36502a2.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-iLawx8YUSozWGPassntDjDXiEAu1B6v5kfODM1jwwiCHlQHGJ3nxKc2BFyGUN8czS8r/Hutpg6OzRT/nssr2Iw==","shasum":"bb67f6e55f551e3b48aff1144435b8f3892b3011","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.b36502a2.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+KEUCRA9TVsSAnZWagAAahoQAI1BYCEJtrFNsXvd/mBl\nDOsC7M1pMuVC+7HiUBr/xdE+WC67dvJotlYO3xNgBswYr3a9xg3q3AABZ985\n3qk30lk2VyIb5M1ZlQj2aVJ0QA4AL4YVEGvED65u1iubvvYsAy8KTKE7apYG\nyAU86qiJCgmCaClNTFpCFoz7xPrhgdnIM2LyXYR2xvqwdrJ2pA2D+Zr0dIjw\n5Emrk1dfWg/9sZsGTqqAJycmSU7A28qPtlgCQOIe507nrNl7rCBoIAKcONOO\npXGD67jzn2belEiG3/Ox9MJ3HE4K3hUrPwNG2hbwfMwxFHbgGHAThK7btmQB\nhwHZ5/GzbIr3oVq/11HA6d+OU/EMU6KZCYKP4RR23+E0pbevBTr3BXZxrXoR\nVsLENFHWHRzcEdTK3FIDNl80xOHkt/ND9JMP7oXr8hG5pgUcx7+fsfSlQVZK\n+sr3CLFkmqMXcVBTngGshWLoGqGR2HHyaVIqzPagj8xyByV6GsISdsjpAJDt\nCsRbFrjl7Lx/HZgAD8M/Eqd5iICpIj5qI18yas/frYy4UiNFDNmjMXPegu1X\nvGASDbJNFQu7F9DAhjFy+UHGVGcdip93Gr9UMWLwZpzqAJKPvhYwN/Ec6ley\nVQrQzvsmlIKtQJwBFSE8NP9mf+8WPIkPKaOAwysywfyo76k7RTyp7DBmdpFP\nCkVD\r\n=XqO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeNLvFnNcnp7ErzKEGZ0mEFXjshO2FsnV1ZGv6AkHoEwIhANk9nXepSqk3ggnNJWs0H7kDvLJUCQqiJLTUIJ/GQGP7"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.b36502a2.0_1626906899884_0.955830981398329"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.2c392ab3.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.2c392ab3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.2c392ab3.0","@material/mwc-textfield":"0.23.0-canary.2c392ab3.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"83a61c9efee1610d42af318683fe4985effae0df","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83a61c9efee1610d42af318683fe4985effae0df/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83a61c9efee1610d42af318683fe4985effae0df/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83a61c9efee1610d42af318683fe4985effae0df/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83a61c9efee1610d42af318683fe4985effae0df/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83a61c9efee1610d42af318683fe4985effae0df/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/83a61c9efee1610d42af318683fe4985effae0df/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.2c392ab3.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-+9r7yD8Gy5S+3DiTer+VBO8BmweVkRqQTEoUJF42fpaJ8pHMyFGW9KvWHImuWd2st9OZ0UgHDrq8vHlrM8PQRQ==","shasum":"f110b78c383a8fcf4ca316016da7cea49ceeeac8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.2c392ab3.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+YZeCRA9TVsSAnZWagAAfmkQAI0LFph2Vy1DB/0JrcHX\nxDCDpfP6yffWnU2QuIiqnfe2P9YyWOK/mqNp+Rkk02OmXWrBY9noGoE0mptw\nvbgZIz9BBwQm1x/RZNh6NV8nc3QorXiLoDPRAC1n7Imnr24TLxprXfPxFEDx\nmmtMOkNcV23oR36I73fbAT+Nz7W+8PJiSFSJAQfVPjwGhpv17n9h7SN8jP7w\naWcpG957ewCB7ko2uKNrjWKiQ0p++Vol5ixtKfX/nyCVk8GYxQtWphbco1eB\nhRsh5iKrLqbOYYHizFgE2SN7E8CkZsZ2DriokEkuWdRZfspHbuCxUecGg/Qu\nvd+Zu8X/3YhEqWqki+pRQQjKOlDKh4ZTIrUmQY0baZ+K74MdmBovAnnT3Bbc\nUdkbzGNVkuQu002wOc7QVngISGQ9cnRKiyqw7cAK19qFHWLcbgF3+8q5FvoH\nxkzpQRL8RX4h/E0n5irrnJZPX5UMHNMpPcqKHCDuYTb0pxrawk/4p5drXFzk\nn6WExPs2Mij9+SZUkBHBN3kdJLOAvztsmWrd/144NfKiu4Ce1bWzokXxGdzz\nOnE7hMcXoXsD3N/hc0KDppiN5TJzwD3uxiNP31jQP/J+nwgV6T+AZLOBmYdg\nFYwsQDiZXrNpYcbJD5p8V+Lrk9tFwzOm3ht8/xWxWTA6EU9hTFkW1rG64oJR\npCb6\r\n=2R+9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFGRoUAH4Zv7EK+ueI7jCjf87YSjC95i2ksfJ8qsMxvaAiAeYi7FW7y12OlVZyEE6srX0J76j2vj0oJuDhZPQh/KFA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.2c392ab3.0_1626965597804_0.025162755712628826"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.e8bac95a.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.e8bac95a.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.e8bac95a.0","@material/mwc-textfield":"0.23.0-canary.e8bac95a.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"2215253d0031fb9db27cec4c40894bd549b72930","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2215253d0031fb9db27cec4c40894bd549b72930/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2215253d0031fb9db27cec4c40894bd549b72930/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2215253d0031fb9db27cec4c40894bd549b72930/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2215253d0031fb9db27cec4c40894bd549b72930/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2215253d0031fb9db27cec4c40894bd549b72930/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2215253d0031fb9db27cec4c40894bd549b72930/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.e8bac95a.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-wIzPc6sbl+kvlegg9oO/PVB4/ANrKP7zIz+xgtW5BzAYChi9EjRAYoirMt20W/GiZdVXHfDzruCi+fuMg3sp0Q==","shasum":"2320328e97cd70ea9d0eb2760133525744729d0c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.e8bac95a.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+b6bCRA9TVsSAnZWagAAIvkP/j5sjxB+xPmdxySSu8C+\nHI+JEQmCmFwlxwSeQO2AHwWzilPhG+RUElexRtc4pj+kgZi5oMfLiJ9hkcuM\nBT6FHZsfn+UWc/+YepsaajKi3z7XuNr+VJQo7A0WXGrEmKZIaWgBKaJ4kKHo\nJrh4ifN9shPaaVpnww8BRdrK6TMDmmMcUbbnZRd/E094KbYaI7LHfq5b39Eb\n6RP06Enq31hOznexgIBKxNPnmJtIhvwI0TZTMZhHfKjoBrjf+G2pXTiyAAyU\nxc8hwgDsyA1pQiwaPNB7S7B9jEV1ts2ypA+2DwiDVFAgbuLM1KikbHNOlBmx\n0CctZ5PXmAWFmkBeklyVW5HlIdlD2eOQaaXqwqbbWY1Ka2NC/EqWTWi3Rpqh\n9YBY15sSILmAekmj3zdphcQ7shUm8jzsk+GwXzXw8j58o0u8TmlEoBEDSS5F\nfwRE7263ExD5hPJFea4LIuKGfD2C12Y5hDSNA8ZrVEiYo4zy4L0xdSKrg3sQ\n6uYv9FvM30mUrx9t1KIxNr6amMfGn/ZuHVHrkOvfNbsCsQQWeowI83Bl/D5i\nCRn7N0fbgcNFs1bx0SUHhOCGeZTGw1hgbIa9JryM3Wu2DMjZXN3aok3pd+yy\nhJcro+VQJCBBSTpy52xVOX/g+/osobkTsFWVeMtpj2rwSONebJCE6vQD1/Uc\nlTbY\r\n=PBOA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICeeG7vPXmnfW0GgBuOpUyTrABeMj8PvirvBBors+/cGAiB6LhOoBIL8XJPd7Ya8zVoMtGa+vqrhYVxLsfNzVE2dwg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.e8bac95a.0_1626979995508_0.41246712305718747"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.38f29f8f.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.38f29f8f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.38f29f8f.0","@material/mwc-textfield":"0.23.0-canary.38f29f8f.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"484fc84b540f757ad561dbea442c8566694496a9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/484fc84b540f757ad561dbea442c8566694496a9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/484fc84b540f757ad561dbea442c8566694496a9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/484fc84b540f757ad561dbea442c8566694496a9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/484fc84b540f757ad561dbea442c8566694496a9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/484fc84b540f757ad561dbea442c8566694496a9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/484fc84b540f757ad561dbea442c8566694496a9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.38f29f8f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-w/l1mBEHeACaxxPn15H0lGUxo8OXzFD0BqIhWuTU3kfAPyQFCqIiB0Q5q+mfUhTCb3NMcLWu9HnnD5oIIqIjAA==","shasum":"03734f7ec0ff20239eb85b6182c04a1d2725d9b5","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.38f29f8f.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+wd5CRA9TVsSAnZWagAAo8sP/A2V0pBBtcgyeJTGZjRf\nn+LI2tyWXZWh9Knt3mpVM/B6tUxd1BfHa5YMqz7YCRkDbOpWUKzf/uNH+KHb\ntVrMJRBCPGOYBY+9zpOJB9hKCyHPE+7CctQzh1hVxYXtXsSb4eyONcVT7kkk\n6V6W4rq4UBmY8o+hzFuOJrUBLTNW2Q/JhVnDVz0Ez/bNsollTNNbamJw6JlZ\nDV9POE2ZZTlTDME1Bv6q3Nlnjew7i+02BuoUlMNUVUSUcJxNh9iUx/sfLcUq\negCT07w6+ALqz9qy0X75PqM5Wx6aCf/fSlQDHoPwBi7ApdGcIPMJ8F3VbI/+\nG6oVn7wwTx7OX3q5Pv241G+8rXMzwVpXmu39L/gvkdVQY8cG9dC028DZthTK\n+eV4SBBH9YtopSRiR4KsYGmsLv6UhKRxiNE5duYUR/r5cbrEHgcG0Soxk1eC\nSDTKUFPA3zLSF3lmzsJBRprK+5XXhDGBRXaTVmMD4tRtZzbUGxiC1KPcHUTe\n1Mxw300FwwFQANt6huoH0zxDIJniqD81sFFPR8ca3CQzBw0yK6r60m8xir8z\niAiXc1HmVTqeU7OUIsoYa12mV7EtY5WAp/K2V6ad4nI5LIN+bBoSo7yPZPBk\n7Wvjm9NTC6MBoIjNLqLd6Rnfa8FZk1Cfa+Ej24QNVf0rAsLvj4GZUUjC1wR/\n09kL\r\n=RTry\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDovMPnpXJ0CLaM/MOJ5iCggBPIBs+SgjLStWRjxXY2KwIhAMpSHddOWfrhrqpxFUeUVaVs4z+GYD7Tv03ASWjDJbfR"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.38f29f8f.0_1627064184897_0.2101579021227682"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.e0693475.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.e0693475.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.e0693475.0","@material/mwc-textfield":"0.23.0-canary.e0693475.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dcaa39c4b4b0d5d5bda85df7a11ac1205f2fd669/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.e0693475.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ZftE6iRfm5wIqrFK3I7FA0Ix6ADLOxT7BE6gZ7/CwswPf8CEauiLbCuGM6fTPzEcDObL73K8y8o01DMBS4mBLA==","shasum":"f5d414250a23a1c8e8c966d829cda4c27c471309","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.e0693475.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+xDiCRA9TVsSAnZWagAAcZ8QAJlrV71HKc8qa8+SLbrf\nmg3YUWOm2QhtQ3is5IuyP+A4RmjU7Nx2Q7I0mmRYUskVe7aA/LAl2jbXd9U/\npNOpfZ9Wj/+y93+IW9AJIUm8iWPWrdTEKyVph79rfhifV+3/7B2DtNWk7Au8\nRVYSeNH3dlxpYNtdWsSNvGpz83oMl3tCEmHyBkMzNxOjr0PfSfn0YHt12nVk\nN71mDPa/yGPZOPr06jizX3V4lIqqjZ5nLF/QRcrg52g2IHBnai7SiOK2W+j1\nHJo154FoSG7bUHo+A0/YDXAft3oGTwg4x53GRNo/xoIJDsoZlYSeoGpK7VoT\nAfnS1IQQ5qTtJP1u3jiG/6tt7i4z+gmqhuTANPF/4nxlVPfhmX9apSVK+7zf\n1Rcoj8cRiljTQpoSHf1Sb1396SiJXOnI0p5ZD38v6WKVAm7xFsOuY0YUgUJ3\nR+OsNLUNL4aW69ZvsHaOEV7Ht1uJofR/YT9hGPewHuxmaz5VtLtW/3hQElzw\n6/TzIy/DUJYZ/VMn8hdzNVa8DwIpk3VcpS1UF0U0W1oZDfqI/OTsOToCqPoq\nzeelPhR6rfGF2RYytUfcZDYCp+rxWivYotG503RE6VznJ9Z8itZH8Qtmr2zb\nF2SMyo7KAmELeU0HelPeADr4/uigSoGA8XhzkQiDAeaiGYCGmBXDT7Zga9JK\nxCR3\r\n=L+rR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCP8RLUK9jSzCay3DnFAjlHdDx7YLSk7bAvyrfoq5LegIhAPK1pBOShee7UeepojEq1waiANLV74VUyW3HF3DZ4myf"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.e0693475.0_1627066594308_0.434051567095197"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.d595e030.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.d595e030.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.d595e030.0","@material/mwc-textfield":"0.23.0-canary.d595e030.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7c8056c080cfa8a28ca6e2a5511b4db50a604a87","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c8056c080cfa8a28ca6e2a5511b4db50a604a87/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c8056c080cfa8a28ca6e2a5511b4db50a604a87/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c8056c080cfa8a28ca6e2a5511b4db50a604a87/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c8056c080cfa8a28ca6e2a5511b4db50a604a87/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c8056c080cfa8a28ca6e2a5511b4db50a604a87/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c8056c080cfa8a28ca6e2a5511b4db50a604a87/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.d595e030.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-FWnqvORl8Jna1rAdW6qyngz2fryHxj7Qhf2gkLiydLdGvxz6J3t6JaudwY+BQqG8lR5CmvpNzAX81IkwfvmPbA==","shasum":"c66798e4e0cf4dd17d682801523d7b2a201f1cb4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.d595e030.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+yxQCRA9TVsSAnZWagAAGZcP/09cduT8IIgrLjzJfenz\nxEH02wc3vG5tQpV5hFV027sZQWV3JouYx35nTMQmu1J4BUWG5Zv/HNsp7K/v\nH+H0LK3vZEVDDsAcP0EcWXQE5pFi96IxIHUyMzos5JfQYvk/JxPaY4mznxNt\n71UJgpiSjXoEYKQ2zow2rR37EgkN48qhsmWy5qOfx2nJq/SFM36yDGlYJLAx\n/v7JB+gCraKw/x+gWqJyhpGafYP/KZglf3drWU6xW3uc+ArosPZEZdx+Zp94\nfr9jXFmkTtMO+8j+2c7vgkQYRlau0Zz0kIYumrfqDcYkzlKqlC9RsGKzc5cH\nG72AyrXcxujg/FHuuVOigazg5u6YrVKWwUk2WoBN58heL531eQfbulTRFApm\nHIX9sfQV7oWEoofMiXdErN9qkpsK5Uxc2uKe/93Y5THwqSfNnLHvEjw8ERK8\nAEqObSpgtAjQMiXA04YcPXtHNCBUpOdazCCKm9FMIhe/fcbZK2ZyCpO30lzB\nesCbR4mlk2pr9+gT9PabTi/Sp2+N1DE+WhQGCGayzNR58442DwEOXx8ri0L+\nw6pQOTWw3cSbtQK4MG4oENuoCY8fyaSoC4Kxk7QZ9ZqPdt2uH9m8TM/z6mAm\n4ZsUwlsbwvGjHjVDBLZRDmE2/r5s/4yXqXxnjRkXXBAbYsSCpejp4+AW8FQ5\nOJ0V\r\n=5fcF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtKl5eLNqLX6im5nIlH1vwdSjZtZ1PC+F2E2Jn0g8zzwIgDaYAtxokF4R1XQeANhAQdab2x9V92r+VmU4+gr8NDvY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.d595e030.0_1627073615996_0.5765539627986422"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.fe7cca31.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.fe7cca31.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.fe7cca31.0","@material/mwc-textfield":"0.23.0-canary.fe7cca31.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"45bb0797db4a64851859f8894864015974863643","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45bb0797db4a64851859f8894864015974863643/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45bb0797db4a64851859f8894864015974863643/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45bb0797db4a64851859f8894864015974863643/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45bb0797db4a64851859f8894864015974863643/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45bb0797db4a64851859f8894864015974863643/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/45bb0797db4a64851859f8894864015974863643/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.fe7cca31.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ppWZZNBvjUqEwIONN+eso8MfOgh/LbTmSYfk4J/DNnpNtqfvxPNPlg9IBTHu/Z2yzYGnAM2UCL69PCt0NCly9Q==","shasum":"f7d0f854451ed9f68e54a458543d1814dc517b62","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.fe7cca31.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+zs0CRA9TVsSAnZWagAAgXIP/A5H+eW8TIJpoNnv5HEs\nBjldrWxs6TZ99GIkUUVDiwzVurodGVkxYX0R0OV3YcOPCvQ7cVGSnKKsBsTt\nttMxJqWPXODzIKGcJMWXK+rTBlnyt+k2C3AcBijKGdCrOKxnLYi61Ue796S4\nkSZuN+QGlO+1+kVTaTNzo/XDZ6x1DCgoDRO3loS3CZ36aj5lhSbrSacTYEB4\ndkvb8vkRCOTKIyeUQ9Ie2BClDxhKQLD+xx8EAZUERLpLcmtPrF2ELyrC7JCy\nistoklY+beMxH/+0eLC1mRQe1AP4cmyvmMVgUxPRJdu6eJv/trCN1aWLmN6S\nRwQtJ/SxtCpud2oLiD64P5HlwlisCDVUHxPM5/z3HVUwSLUqt2/JhGPgxkcw\nN20vDiUIz5Tb7opXDqeMqI12TFfr23M6afnLk3bdCuGz1iniOHsvK24X5WdW\nNuAD68Ymvjgli+ASyLNP1dLT6PmrmVmmPjvqB0AxyBxKvUrNp+PquaZpbDsL\nTAvU2tnKtvUWaq9kfchI0QuT2nQIX7mrRtpcTq0OPD3sXdHS9VQ+LvHibdov\n+NEAtVtumtylLYX0Gh43RO06u65n4gNr/B8LJi673ZZYymgUX5HpXXUUJ2RW\ntqndOWR5QiVgA/fenC3rGwl/vo0vUszwjBe9UsXDjDCgx8t11CoQ47Bmxvhc\n+TCV\r\n=Xq65\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICo9RiK1fgeLXqK/Aa+jyjv93AMGCEFw/XjchUd7mPVZAiEAnkkmlU9FfRxoTTKzoZAK+HLBziiVbFeJtimsdrcPris="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.fe7cca31.0_1627077428772_0.8275236184863402"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.fd9da483.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.fd9da483.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.fd9da483.0","@material/mwc-textfield":"0.23.0-canary.fd9da483.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fbed5ae8e9a1f66ef1cd5e83dcb0db11c6ea3c01/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.fd9da483.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Qm4Y7ki7CGyCA7BCSoLRbiKt5UrF5MbIw5sji7ot+SFnbnArI68Ijup3w5Va4hYk5YkmpBu6CepO3n2cGwbBNw==","shasum":"76012094d82146555f7c92849962185dfdadfb55","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.fd9da483.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/yhDCRA9TVsSAnZWagAA//oP/ilEMW46kAlTjtED62nJ\nUJjc1VdP3tIPDPG0CId2RmZOEt8zImMHENZ5x6KrlStQ5FczMDJE5/W0Oekt\ndst0H1C01IAzbeEig7xbVGZKnWED2OzDBLa053H1fdxWfGhK3lAQXZ004Cfg\n5MZ0OoM/7UrRmV8sUlgtdDTeUxWlTot5XqT0fWzerbmrW21lMk50HM08qwQm\ngW9U2kJZVmDbrbN7NFwn1xGNa33ekUP7zyF6IBHYzJLSBepsrKtpFaBdmjX6\n7TxMIQeO2eNt7Lt2sRLHrFzehPeXZHpMvV/QdyUc/G8+gb/7qs1RFedyXq1b\nRQWRyoE/wg5SaskZE+T461qlJcixIKSEY0mtqAHzCLjFWFwpP/tDpalEtnsk\nXZBfpNpW2bzMtRZMQiFeBfSSb7I+QoUcsyOpGSjVRM2GHfv2Pkc2NatU3vHK\nmT9u2d6JpSG5mZLFw1wSZmtYa5bXHuid18xWji4PITG1yvDmcXigWvPTVYWp\nLbvL0s2w0yj80tWPo4YDbxM85gUrPln1+NSrxeSvFJToshGCj98ojj7T57JU\nZTVIiEagcSgtfvhuk0GiTq86FBkCwSomUXgx+iYlh0nS5LNyBEtQauefQ61h\nDXgJTigcOurhlYgN00L6kjBQrGF1lJEGDiDa/kQsMizy5M4+ln2XLJwfq63V\nrqWK\r\n=lfBv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIApzwoeEniAWkaB4f+G65tDEX/z1jeo2KvhZTpl1pH5SAiEA2CL3AKk322kwQTee9i79sz7ZF4wANQF0bOURcR66mDM="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.fd9da483.0_1627334723716_0.1515934113504116"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.8a4c7e06.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.8a4c7e06.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.8a4c7e06.0","@material/mwc-textfield":"0.23.0-canary.8a4c7e06.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c98d35e959f2149e2a4ca8c8a4c5a7ad3070670/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.8a4c7e06.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-fXD/nWItpO1Dr1md8DmDHac1h1uY9SHAQwvqEKrfljO7JMmSFMR/rrNaeMikxWQ79TX/BwCksfrj7BsAA3BYCQ==","shasum":"390be84ea82d07251bcf1b64197723321093d79f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.8a4c7e06.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/zrOCRA9TVsSAnZWagAA7GoP/RyQY/sDopzJRKIwWesy\nlLETj5Mhq6c88ZfYOk+fbhottjiiP7DtpYZ2hvyXrzR6R6fCI8TIRBTH6ROA\nJGY6Y5i6u/TIn1rmlR/iMIB8ZClL6VOjb+kiQ7ibXMxWcbU21gw/IzinOp9R\nVNZbmXDwCX3pnF3JsSOGR9ZyFoBS2F4w/032XTraz2BYmh89Jl5x26THFFG+\nrqHeAZcQiBAJqStUAhyB71T8TN3LPLjjqU6LEa1Yfaim+QJ1DQW2sM2NSIfZ\npOdpqweVPg6OW3bR+8aPmnFx/xZn0z/1yMP1b406UmYNCLUnkErrPhUmmnbr\n+L5IglEFHfeJF9A0OVSLI9guLHiYwIgPMR2fBkCqPybctHw84pSUXKu6lcep\nn5gHd2CW12fsEJ7pgqMHkmv58Szl1cMpKGWretDdioR2+FrqEVKau3l0pU25\nQac24fP8P3+cb/T74WdSKRT/UsC7O6jcZey4EzVY86GbqQXX/TeMpuvbHOdD\n2M21J9PclmXGt2V03+PTVxqDB68Cg1jQTi7W+v16GSQILsQif/Ejp3pZp4mo\n/RbZM2YJgbc9jWlnB7a/5q+oHqScpNkLyDWsZdd59e7tQ4uJTb0jup4CQrxW\n2m+SYT1uVztQMzj06bJltuc6JzUcxSA6Q9/6fStFQrxoLCKd+xg9W6zVRZUW\nHsUh\r\n=4jZ8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKh+AtZ7hqf+EAS34dOEu1apNOO9NbFPvlvke+axCm9AiAVTv1SewVpvylytZjA1J0uNMauSPBBkxMQFRwwLgMcVg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.8a4c7e06.0_1627339470522_0.9933849815460913"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.5b395fd1.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.5b395fd1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.5b395fd1.0","@material/mwc-textfield":"0.23.0-canary.5b395fd1.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"49947c20a93de615b923efcb7d30a23250ea6dbf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49947c20a93de615b923efcb7d30a23250ea6dbf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49947c20a93de615b923efcb7d30a23250ea6dbf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49947c20a93de615b923efcb7d30a23250ea6dbf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49947c20a93de615b923efcb7d30a23250ea6dbf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49947c20a93de615b923efcb7d30a23250ea6dbf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/49947c20a93de615b923efcb7d30a23250ea6dbf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.5b395fd1.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-tu3jfD8/lIMSPatUmu21wc6SBChLSHy6kbUlnyqoi/tAdVejQymL50O4XZxW0BbGZCeZXH8H4I6ffjJfERx3Og==","shasum":"487e365ae2c78e323440513dd70d123b8d1162a0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.5b395fd1.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAI5sCRA9TVsSAnZWagAAz8gP/RT273kMzfRWRE4/nEc2\nI9mfe+VN0sqafDsEma/8e3BtPWlp5+sYgCILgfwa8nk7K7Q1ZBL73/hp6pZp\nkOlyEMjeAL0jBHXBH6Ht0fvnV3G0S+7GVaGT3eYc7owZzW1z2oUaoGrOakLz\nCorQdQpyflh5HoPRn7E+SorhRph/AcNF+kgohwZ/mDgksAeHmDlFMt305+UL\nqnH3UPF8500xph0NmnLKICDMSb0t2z9emaPudgzJw4Tk+ohLzoE22vgkWPR8\ntTareKcgpMoQ37hE/UcDuG27mMj9rL8e/8GgLlL2Q/R+FCjZVV98D2wXBEiP\nI1wCQjPAeErKTimVypCGzqemOFxa7YIJbrs0AF6gbSs+bhxj5661HbDr6FjN\nuVe8jHJx4WmfjrVHrjDg6Wlw05Dxrt9Ryr6t0MFGPExKeLm8/gVz4m7qFzug\nzDL+xj0jMEGT/9WBc+N7msIPxVTh0tanGqVZOQesV0EMJRAxjEwzOwi4E5ST\nVPHiqu6AAcVu/dtM5XNNea1ydLH9kfH/1EAjBh+JgR5nNE+nJWPoz7YnD/pc\ngJi8ShLk3nv6T2FP8uG/yHGudxjnSoGjx1eTsn6rP8hirUeQHb0ycvrkBN5a\njjq21tBiyXuMD9ENNtpz7Q8MUSmms20nX1MzY5HR9IqwAZvJh6F9XZ4Vo4kQ\n2iwU\r\n=6OCO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQSx6B/jiu+qzabUULNIgJEphu1M1soc9OZpyh4KJr0AiEA5tMGdlY3ypS4e9/0bEMC1pznO1vDLumxumo9P28ub4Q="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.5b395fd1.0_1627426412819_0.39175611635378993"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.e5efdcc0.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.e5efdcc0.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.e5efdcc0.0","@material/mwc-textfield":"0.23.0-canary.e5efdcc0.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"6ce7c9ba42d6630a9af68bb580b94e6fec508bdf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6ce7c9ba42d6630a9af68bb580b94e6fec508bdf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6ce7c9ba42d6630a9af68bb580b94e6fec508bdf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6ce7c9ba42d6630a9af68bb580b94e6fec508bdf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6ce7c9ba42d6630a9af68bb580b94e6fec508bdf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6ce7c9ba42d6630a9af68bb580b94e6fec508bdf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6ce7c9ba42d6630a9af68bb580b94e6fec508bdf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.e5efdcc0.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-77zaAvjXBXcImhQUH7JcEDwJTWN1F2vweHoWdb8TxtAl3lZkDhGYjMlZF7ED7ur2b0Rta2kjOE/mHcpyZCgkXw==","shasum":"626f17a591327bfcfa521e315d16ad0931a5da90","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.e5efdcc0.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAZJ4CRA9TVsSAnZWagAAof8P/1m6QERBghYT+TulWvoq\n6I4XhdBZXOUb3VGt1Hy/TriRUS9zierD1j/j/1kEM6JofDr5d7WmYS/aU/Gt\nmIq+lCBTGXdjfKdbk1QC3oZM91GZRIZVyswRhQ+FeM2pZyprtSN0gsM+QLPq\n21+VTSjbffq79BbHOYdtyiHqrQeH1xuvA3qiIVgHdF+laS0pLwMf+/4lXTzt\nqrVl93RJlTrAQtr2AYlo3h0QkY8X1F/BPwGmzvIHT0OSV9qoEiIkwLxfJMBg\n0d8iFH6hPW4AlwpPN8t0jNyO4IZZ/LAGv/a8LNLBLJXPgGpYKf5KsphjW2ld\nKl8RNj7vClyu9mVSjJEP0zmNYbyJHx3Bmnq+E/BXyCEF25xQLz3m5bzPLNFO\n6XLtmG3SPYO44U5cI6g8h83Ipgt6wKDon5+LuIeNzbgj8AwU1aPyw7NUvLk9\nC1Zm19hQXqxM3SwKVFP+Ak4uLtVm0mUD0QEvIZMTafriDJfEtXAb5XxwBSpt\nV6dUWVKmTsZNrks3EbJ31d48/dt4AvvN16iOw6zjh6CO0F5YE6pcwxQH2ekB\n+Kjd5LtkKxOKPkhwYfYLPXg1Er57qnTQHYiikQE+h3u4GD/XE9NgRCEbxpjZ\nTs/SsmgFHB5OFptH998b/iZ7GX4GZHiBogEu+Ag6v10WJWXCtwQGjU1VBfdJ\nKVNI\r\n=Ro6s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECDcSII0FW8qym+Nq/8X7VsKfpEQC3Nr6xedFJMYktuAiEAm0ym16VrYsgrb3wHeFCjOk9jZZc+R1y52F/zYUnSpTQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.e5efdcc0.0_1627492984354_0.9239091373010144"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.ab310900.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.ab310900.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.ab310900.0","@material/mwc-textfield":"0.23.0-canary.ab310900.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"e3a3d97dc865cef9b5eee17c8842c3ef9be90dca","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3d97dc865cef9b5eee17c8842c3ef9be90dca/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3d97dc865cef9b5eee17c8842c3ef9be90dca/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3d97dc865cef9b5eee17c8842c3ef9be90dca/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3d97dc865cef9b5eee17c8842c3ef9be90dca/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3d97dc865cef9b5eee17c8842c3ef9be90dca/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e3a3d97dc865cef9b5eee17c8842c3ef9be90dca/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.ab310900.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ZqjCvE/6vipyPvNEj3D5CAOVySwgtmaczxFseruQ47/qLXd+5DVBZBnnNSMO5DaQaz0SwI7zlaByWGZpcAgi5A==","shasum":"b99b53a90f417e9517946b62a6b96f85398aa0af","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.ab310900.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAbxcCRA9TVsSAnZWagAAFLAQAKIqjEkLYEn8kDeWpZrS\nBNg1C7OwDiRvIoqAb7Ol+YG4oHzkhI7ntOv230dZ10Up53DZ9oxqk6p05WtA\n0yH/9qunU+9VeAQdHcvuRlTUt5aw+z0pb/5YGwaILmQte2bXgFzREyY+XhFC\nM7F6XqJpY5AlVN4Du3zryuqeu0NUzVwk+uXfERIJTEQ3tOR0brHzpJgmWWo7\n6TGuaQ0OpaX8FSzNpN1Ua7WiHLwCkfxhWKlReCoHSCIE1mVQiFLO0bQ1R7CJ\ndGDOsNkgATkHzzWIcy3Okk74Ke8/y9IKUulFalobBE3Wiy6288HuHi4SNvAA\nzEdeIp1uZXTjwB30Xx8Qqd6ubYF9ILgRQtXzbe1zGrT6Btk02rkSSIE14KYo\nQ9EKo0UtaDi7vYIYY58g06OLg07X5x5oT54ke2fZPTT/gxNYlpIpCE0wVMf/\nGiaiApmFUuECdc0BRZTr9U3jonHxUY+shx8DYDE5Rkn7/dB0s/QEo0Lf0B0B\nJPwkg5Dnh9+xkITnYkQ+XdrRDSaBmDTlAMTTCBsixtDTGM53LOdCF8NY6bPE\n3nnU55GqsvI6sQalzC5tWvELBOCUtAfnM0c5/VLXMC+ovQRkovcp4rpeMHoJ\npd7Kkk1G8+PJjyJRxorJPtWpGoWocRhdYm++0nDJ8+3X/trb2R+V3yxSQEZ0\n6RVi\r\n=HGxw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0kBHD2bh4w/oNyRxptNlY5TS17CasUODQIr9Kq/DOGQIgdDudUDtimh43FD4gHmmIHBQpdrURqMiVJ7u9bh6JeTo="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.ab310900.0_1627503707914_0.4353148064476664"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.21dc9bc5.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.21dc9bc5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.21dc9bc5.0","@material/mwc-textfield":"0.23.0-canary.21dc9bc5.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"cfae2d30a40b9717e93cc7842d29f51de61c497f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cfae2d30a40b9717e93cc7842d29f51de61c497f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cfae2d30a40b9717e93cc7842d29f51de61c497f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cfae2d30a40b9717e93cc7842d29f51de61c497f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cfae2d30a40b9717e93cc7842d29f51de61c497f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cfae2d30a40b9717e93cc7842d29f51de61c497f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cfae2d30a40b9717e93cc7842d29f51de61c497f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.21dc9bc5.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-X/sd2SYNVxqzjO2Fqaf5nFVmXP9vZS+pEGvaEdlQ+MqRogRBMFTRP/U2y38DcbckL5zpKoZg44cguOMZDbTJeQ==","shasum":"c5562f0e18c24c9d27cc0d58cd76fce56a36c04c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.21dc9bc5.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAb18CRA9TVsSAnZWagAApCQP/05agUb9wJ8BC0dEI+cq\ndaz0r0aZM8di1Im5yoCFgWZ1+XoocZ9BPQVfwS5GergE+bfHEf/3VflhebbP\nCIKYkzT9d9qLroJ+raYuz+Eu7aAMbe+jmzhemDDpe5XTDBGHSxTIU8NHabr5\nQaw0kmwBJJuASUFjl5ErpfqX2vwGqKstbFVmON94JmwcelwQM/9oXPkb+dmE\nj5WnxpQh2Etj5NXd2qn4s+eVVGR0lz4T8ngPed/Tta+Asuaxx0v0nisvSqdj\nSjwD/27h1BYJziPqU2W+pdss9cUz4a6EltaBq+MqWAcZ1iwDi+bSCmxDiNQ+\n3xowx1CaDOOjHHq+uWrpMniqlh7WwfnInAkgaozbGGScw7i4kRGmvqRHTGTX\n2TIujPAwILCC9Kq/Hvg0cuUeuGy1ulEl5bjWyfugjFi1BHFGQE5XGQTH5U8m\npZ/0D6Hkr8U+pVDiZOEj2QuBFT2wxBhVrqQkWamIwGe0Vw+E8TkZGTEn2KWx\nB+/uldn8+UJ/c9M03fJHNcN9Y6BpKcE8IFlkoFaC29uWYfLBhzDzJ9xypK37\nIUKhwRdc77lpsBfzuX0uWJwubwJGH/CE0NloHeVRtTSh3ji9He7oxbhCmsPx\nZ/4wIENj6ps6PUVvMhRjINsp3rBJvawejStrZ31tkAYrXwduB7BAm7iUYU8a\nog74\r\n=dFGA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHEFuuJtji0JCf7lIp3bC/S3UjA9448CVUo0g0T9I1P9AiEAgqtwqNKTXUeo9k+cSO/m7MWapELBGafopb4IGNKfzXA="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.21dc9bc5.0_1627503996636_0.6749874900206159"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.68c7fe5c.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.68c7fe5c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.68c7fe5c.0","@material/mwc-textfield":"0.23.0-canary.68c7fe5c.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"d14f788b501a8e9e77ec19d160f45c10e76e3a31","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d14f788b501a8e9e77ec19d160f45c10e76e3a31/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d14f788b501a8e9e77ec19d160f45c10e76e3a31/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d14f788b501a8e9e77ec19d160f45c10e76e3a31/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d14f788b501a8e9e77ec19d160f45c10e76e3a31/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d14f788b501a8e9e77ec19d160f45c10e76e3a31/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d14f788b501a8e9e77ec19d160f45c10e76e3a31/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.68c7fe5c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-iTXPqnPsfVXSyheDCCv7Ya8nT6bA5wOaeKI8xxKuRGA6NaxkX0tM1GBaBM3hVroeZAJFiJINSSKNTnJPpfyhZw==","shasum":"af0d92090dccfa3b6b6ab83bcc3114767c62aca1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.68c7fe5c.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAvQxCRA9TVsSAnZWagAA9qMP/3FimBcxeuqbSC3ReIv5\nrgwtsPgyIC/VNUWmIxObBo6Q3Ic2wWNULHH/nrJPw2vaKM6cVNpSVfT/S7Gn\n7hiWPLMHG29MLVs/DZOjv0Y0G53jnQK+JZcTE9+zag7HL43O0jI3K9BgZQ3x\nRKZKZ9acMo4afXbWIh1iHT8wA80j3XhIJdi/Cp/vJFtPtu4Uu2CT25J6WRjt\nJET9huRXH7O9RDaSdepnVdvqPXm08SVIfVPimyHnUrysKM5Mb+KOaIZfCpZf\n6pZc41nIt/0/MLKefXOu4tIItaeCi6rjeIdOh6WkHXGDXRdH/OsUt9M9ldEZ\n1tgMX4KKYMycaplqCoJE6yBFSeMC8K3Nt9oo11EWKg2KznKuAWkSpNSyIbBI\nrlFCuONufyFsy4ItJvuCPV+mIjq78/uqxpo7jevVLumeNaPNhX+xv+Mxwmvp\nVzqZtVMzgDv3EtOLSZsk9fZXc/S5TiOCofDIiT/y88TGIJ53D06z2nXlWH5O\nRe71ooXNspH97jcsSlh1naPVsYMyQe3E98xEdG2cOVnUfEUtCg7pNOQmFXnx\n4WkbilwX3KXrupmxcWen1WKM2RGeePw02Vuhg8snNweIqaK8B60g8eWi2Npl\nlIsW7bsZ1bPCYG4z95f7+lIAZhlrQKa0vGV+k+3X5OjaBEr0mnRGn2JCPdOD\nYJLk\r\n=H9x3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXssvz3iXak1n+PjjqmQoEl5CiJeHXKBVhZWChsBwzkwIhANKzUb6uKRddB82w1+u74+8QdilkLM2UKWkeGs9Gu0nS"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.68c7fe5c.0_1627583537305_0.8419300862400736"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.aebe39e8.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.aebe39e8.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.aebe39e8.0","@material/mwc-textfield":"0.23.0-canary.aebe39e8.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"d28ef9fbd1251f2664f6385efd6cd33d59bd5a19","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d28ef9fbd1251f2664f6385efd6cd33d59bd5a19/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d28ef9fbd1251f2664f6385efd6cd33d59bd5a19/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d28ef9fbd1251f2664f6385efd6cd33d59bd5a19/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d28ef9fbd1251f2664f6385efd6cd33d59bd5a19/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d28ef9fbd1251f2664f6385efd6cd33d59bd5a19/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d28ef9fbd1251f2664f6385efd6cd33d59bd5a19/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.aebe39e8.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-74VSBXNFlXsNa5hLM0aF37LJLr2Xzu05wpEd1x3HMbokIp4J6e3JjNJG7rfyMuICYgzoUPInbDCUou3WbvzJWw==","shasum":"4f1445f2eb5e53d46aa3942e1e7d11107342ccd9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.aebe39e8.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBE+GCRA9TVsSAnZWagAA4YQP/iEksUKTzr2il59Px6uJ\nEh5kpT2r3rEYE+Taqa7z5b8nG9hjbmkPdsuLfYD2/NUJVlW+iiSAEvPmTfdG\n6EFsebR6uyKDLYPH/XNrGsJZlDVySFZ3HQ5Gd6VIB8kJT2uLrrKP0LDm3dWY\nNmuzysUEbLixnXR3dOs0InlPqaI4nLNgkTAOEsNgPh2cdJYXw2rTXaXhy7cl\nSglEgN0koeJs6QNPiIls84iNIj50WsrohEy6nBLn3NAXlaylrPCnPzAiHiHC\nGEi0k9YMR2MRj/93CrpJ9PS8soH1MVX8fXcJscVvy3bX/Jnshy5uQ0Hk1KVb\ncljNqvN/axlwU26iLu0MjAxvoEdh4ClkHsDhxqtYrM+dLUkfH9qs4qXvPrbG\nnXtXy321rBkEbVzpXhqcFcNVeoP3rPqLg0J095yD2mCsjTCXBOgPFuYq42+q\nLXJaaxntay7s01HijIT6E4dkSQz5jLrslQJR2/5kzDhq57hSl4xGQ5Tmtdt2\nUUjMVRbwIX9n7tVsMMJXWe0bddSa1NDf6owR0XAXrYCNv8PPS7Ha7elIJqqk\ncUGeDeH7P5O2kQ16/i4DRaAWibGjYVZ3Tl0sIyuZTPbdE2dtCOUyGcJS5i2/\npMLGOKPuy29zduN/zpSWsMKAXm0x2txcOcpCf/zmFIdfAUV7WCFVrQO1sjx9\nFrh5\r\n=g3kK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCt9RWsqqQsVRBC/GL7HYgHF+kbTfSwWdb3SHTaCiW3YwIhAKdurCpw0Cn4xfd7i5XZ634Y0VSEonJfHXTrPN6HDZQ7"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.aebe39e8.0_1627672453807_0.11907012123745364"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.ea889c69.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.ea889c69.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.ea889c69.0","@material/mwc-textfield":"0.23.0-canary.ea889c69.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"29d32f8e88155014cd9963c5b4fa346d8e3d28d1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/29d32f8e88155014cd9963c5b4fa346d8e3d28d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/29d32f8e88155014cd9963c5b4fa346d8e3d28d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/29d32f8e88155014cd9963c5b4fa346d8e3d28d1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/29d32f8e88155014cd9963c5b4fa346d8e3d28d1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/29d32f8e88155014cd9963c5b4fa346d8e3d28d1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/29d32f8e88155014cd9963c5b4fa346d8e3d28d1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.ea889c69.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-XY1O0a3c+UtSLZhCK40yw22cR0++O9ryLfy7NAP2dvVCfbaOQG0hc6pR1s9dpB6WK+Or+RH2J85z+62GWfIGxA==","shasum":"d4a359ca0e5d99defd7dae06eb9b4e646f46f500","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.ea889c69.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCY9sCRA9TVsSAnZWagAAgakP/RyKDF4QwiOmlGU3vWRL\nAbqRUeh0dtccoL53iClfQCsq7CJQ8qI85qNORhY206kPsfKneUaV/xjT9lc4\n0zM7pSZaYs0CMeJCD1sv248rOXa3ml9n+tHGPwnJfT/ktcCIQwJmK60wkafv\n8Y0OCvGv4ELoBC948YTrCx2th5BPyvhtXcnTAktLVhBKc7UKcZ9xDIn+hm8r\nFnP2pllWHDjwQAu4fggjbzGYq0psH7KdDhmkw55n80qw6H7ddH8yzymg6Z/k\n6jGNA7/BIjKQ5SHUdBapAt1mSHdMh1sYGnH8xXe7Gv4LlC9ujxTMOawdRVWE\nXFR/pZabg5C0T4XeFYplx908wlYCWJOXr9rG5ZU6sUR4kd78saGqZSXfHksn\ngpDzf63w5hCwFagzRpmaOzj1UccpYGYc5X2xjOIlGGTpIts9/jASozVfPWPn\nrlL8H//WnDHQwrun8VWmd5XXxEZU164S0f6KSZHO4KYuqXjvw4lzqcVCEPq5\nj2u3Q+vnSf+1pwv1ZN725s+db52ctc7lUa5Rx/XQ52GzwzsV78FRi5CLlQMM\nJZiaf2B8vl7ngZU1+/MxHfcVYG1f8iyZUT6SUka9FurShDA2cpYNR6o1c6D0\nd9pK/zPpazd7qRNafBHfewaeqg7rIEhvy0YbZfuI+0hkd+CoMnQT2dFfBey6\nbAIx\r\n=0vST\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH40VWua6fAOzFdOdW0+xXckJLiW9XmITAik6AUpX8I8AiAK3Woj4hOwXnNc0XpN3UHYj+rBxyHPOQgnKHxg1yjJAg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.ea889c69.0_1628016492309_0.9245625171246439"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.21918905.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.21918905.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.21918905.0","@material/mwc-textfield":"0.23.0-canary.21918905.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b4df0dc9ece9df56af685bbc48963988f2cb45f8","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b4df0dc9ece9df56af685bbc48963988f2cb45f8/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b4df0dc9ece9df56af685bbc48963988f2cb45f8/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b4df0dc9ece9df56af685bbc48963988f2cb45f8/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b4df0dc9ece9df56af685bbc48963988f2cb45f8/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b4df0dc9ece9df56af685bbc48963988f2cb45f8/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b4df0dc9ece9df56af685bbc48963988f2cb45f8/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.21918905.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-HFt8PjaR8kPYpGpw+hjljfpRNyDb77Aq4dFFZut8C5sHgBcQCA8xPv9N61H7Ut4Ph2gE96LSJuP0v2tmZh+SEQ==","shasum":"11763bcee6475cc8166c07508f67695389afd521","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.21918905.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCbHPCRA9TVsSAnZWagAAViwP/1U4se1UciD1Eq5MsGBt\nSB+MsK3XI6qMqLpWCO+QZ2zaAyfvVs6/QW+qN7oAGCI38XE+9XbgG+ivOGKI\nZSL29WgXrMqdsVzJGVZzO2SYYlcvp3gr8egULJFeW3SZWxbmG+qbm+xuT1jr\nfIvqDuoeK9a4eb0mDCTONb3Iko+F2rCNuwIeZlmHH6n8juA61nZX8+fdfoyG\n5nd2F9taH4XjuyifhevR+2jh2SORFMyxOMwBFYPJxtwFowAOq9OsdzHpntL+\nt5uFyrTiNAT7nzZYpFejb+2UExafvdyedZzSY7MX/pJrfvuR+yxHXkuYZtTx\ni4Ak8YqKJFo0IIzJDruZFt8gpgY4fj9rqGILtWJQMn/74Cbu3QUURYwWvngO\nFHyyn7iHqcF0yPfoemgnfIgBpuDkuFQ3/YbPphP3o2/xiKaG8hvtkU6IbPmv\nCJHKsiNA/IzSad5Mut4FlcOOJ0sAhG2PCrGb6KfABL4FVILd29QQWBr+8RUq\nzNTN1/RgZdezx5i1Memqmm5SK1DFCd39jgttobemOUzpkYT568CcIXMrRHlG\nvIgypWuhxIhnSnQ2IEyz5WJrWH4bWwMjUTnafMxaVYNW/xzGAAGEohZnWhq4\nFUcE4N5ZsBgYLDu79oMOaEePPjDSR/ONf/cyqXL8wE/KQGWz6SMhSz9aK75p\nX4xV\r\n=HM/y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFvs6uCS5OZKq2P2i7vRGxEfzANFxGnBlcyfGr5c54UAiEA0OAMgbRkAnKH4Y8+qERy1OaAuG0eNqu/UjaAbymG/0Y="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.21918905.0_1628025295050_0.0959634545573338"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.193c87be.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.193c87be.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.193c87be.0","@material/mwc-textfield":"0.23.0-canary.193c87be.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/62c9e4344bd3aa4983c1eeddc83cc2dbe9ec6644/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.193c87be.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-uaCRihP8yYILU6S0g/KZ72DM11G5BUNlNm16eLf08QncwGkDMHyvcpVDaKIcVtc9yPWtRh2WwQmm/zces/IWyw==","shasum":"3954eca5e9794282f04975470a2d87534f766f79","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.193c87be.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCteICRA9TVsSAnZWagAAZVwP/1PZx6DKmF9ZlID6KgN6\nXY3r+eStQJ+s9lC4dGpWOUYYOYrx9NDS7QBOHMbqKlDXg7oKPKlBfP/o70DJ\nmbb28xaUptrCoIMahOZb9ncBN9mmP+A/gPHe0ojIKKMdGWP41AkqkmUOar1N\nD8KQetwKfa4mb8MiowqIY50qf25MxLbDr5pNOhy3eJSKXn6eTe7q9neJK4jr\nLueLKlqhz95Vdow/7d+pL7US4U+gmTtI7DwSo71ku9PoT2h14xpz6v4k0Q4i\n3NSCdX1KP0NbJn47n7f62/sUULGPozdHThUSceQhUZaZE+e/X/9Ie+Jd2Qnl\nN/OGiq3hRw3DN/9Kpi6qpDeWS27AqIeTxlNt2L15BXSi/iXhWafPhpF7AVOp\nV1Z8PKbofqIzjzqfNW/eJEJpsIG8tEnwY0truRgSGy6jQzZXjr6bcJ3mevkk\njbTAYQ2Mfh1RiID2bA5vGphtcNnpXFC3ibOFBqRLdJywsPJC77WEOM5O9wek\nxtwKV8bp5UgWNNNOiibL3DH/EFd4zxpgXG+egqSor6gmQgkaUAdQ1pxFtwRV\nXFpNbwMrRZODePC6IYRrPQ3QT6j+61Da4V26tO73c5fJC3hZhFhWwj9TbOYt\nnqIP1EBRea5ZwD0oHJc/5RAHTg8BFq41XhqX+qo8Gu8TupO5nZPISe5OiyhB\ng1i6\r\n=FD0K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3w8fawj8KIu2c6oHChHHZd8Obz20I8ILR7gp7lAg2SAiAuMJIjV3+feVw7GB5vHQtmVonuU3njs8xEJ+E8fXxC0g=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.193c87be.0_1628100488491_0.6245421918659901"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.6fc52d8b.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.6fc52d8b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.6fc52d8b.0","@material/mwc-textfield":"0.23.0-canary.6fc52d8b.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"d70f6897dfb89d87fb73b1e96c8b4164ca76734a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d70f6897dfb89d87fb73b1e96c8b4164ca76734a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d70f6897dfb89d87fb73b1e96c8b4164ca76734a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d70f6897dfb89d87fb73b1e96c8b4164ca76734a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d70f6897dfb89d87fb73b1e96c8b4164ca76734a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d70f6897dfb89d87fb73b1e96c8b4164ca76734a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d70f6897dfb89d87fb73b1e96c8b4164ca76734a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.6fc52d8b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-cj9P2angHFSSJ134V4v/3dxtiME1GPhO5lxV46KfsH4XGhmWyYcBIE0hlwkneXMJ9P8L1uuZ++AbBp3SqY052A==","shasum":"486703469fd6808ecc217d072a9241bd7a09eeda","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.6fc52d8b.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDCnICRA9TVsSAnZWagAAuSMP/RPTb8ZwwLQIPEqv2bAj\nZuXED2orszs/M4Px/UZ1aqsyJ+oRfxIxZ7Q3t2RNxLPTnRdPOwppgPqC2Z2n\nSQnNzrwTmYG6ACXnvUQ32iHAbK1h5Q1ZuUc4W+6ZWctqpHb4dQ/B+RN4pRik\nQo34IMRlHtkhV1f+TuNOD/bbwnJKQ23PGb9xPPv8y0HXNRbvU0KuZqD49ywP\nJzrO+cHtUr+G8RuDAl5zVOpj3d3KzKTjJCOO//wRmS6usdlL/PO9SD1+Xz46\nRcdsRTLElRD9JLDl72rAsDJmDp6qVf3XdNC1qS5M7zYmglIkazOlhsEvk6Y8\niH/eiT0WqSfBTQrAdC0o2Ia/Cx4Er4hw7heLkIwvtLIIROU2nwVs1Q7CCs39\nv270oJFEsSO8hfeoPLXjW3+YpeOabRx8B2lwpgdYxMYq2DwksMjrmOvMrqa8\nNf/IpR6CZyDcpjbF4+1YwFwLv9nGMAinudA0dILDq1cd0Ur2/i2+m3XFD3VQ\nWKv5bFlrr5xa1chLkE+c+VoaIabgIcqg2qXCYc7AXUE+91z+v7GMMnGqTy5u\ny4snWMFKok+UJBBjL4S9V0zzOp+QwPlA+F0Kx34n1lyaMTEzAaZHQAMKghC3\nrRslgOU9XN2a4g6y8YX5zgIW9afYNSIK/I8P8FfpL9DWxtEK5OqcVJMktYxf\nqyI7\r\n=7UbJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9T0A8I90vPNnDldIESZtCm9prh4SbzceVz9huarSTdQIhAM+aha8P6IEONEbPXitVkRl32UMYWNNBnCC2r5S642CP"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.6fc52d8b.0_1628187080244_0.1659208280390243"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.e2e9777d.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.e2e9777d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.e2e9777d.0","@material/mwc-textfield":"0.23.0-canary.e2e9777d.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"cdfa31e7045c5004a0ebd645c1096ddc7724ba28","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdfa31e7045c5004a0ebd645c1096ddc7724ba28/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdfa31e7045c5004a0ebd645c1096ddc7724ba28/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdfa31e7045c5004a0ebd645c1096ddc7724ba28/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdfa31e7045c5004a0ebd645c1096ddc7724ba28/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdfa31e7045c5004a0ebd645c1096ddc7724ba28/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdfa31e7045c5004a0ebd645c1096ddc7724ba28/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.e2e9777d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-lMy+bvOvYrUYF05yFKKbllFIC6y/ymOXT9afsrBU1Ywf2Ks9Y+oGzndvKns9mauFd0mSMpz1Urqc4uNgSomjLw==","shasum":"0849aa3dcdae05140fb8066ab6ca7929aabf3d2f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.e2e9777d.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDGqcCRA9TVsSAnZWagAAt/wQAKJoJ7VIkWJ1UkRs34Fl\njpMLKniQLFmVPxtQidFEa9QKhUrN4eYfCd1Fqkd1xinte9ZKerLWGAbf8nJt\n8A9cQu92ZLI+4U6XDdQ7MqcgepHeoPveSJoS1uJkDCHE+/jG4vdKZzQQgv2l\nLHAS8ivuokSjq7t/UIMbrVNLywEnpvOzTFOIi39GINUOuKvxotzwoONLHgDr\nk3HltZpc8sZPn0kCyljadx/R60ssaUFiWxAWMrD1Zg0ZGYxgb2guxcIBSQ6y\nOR/8giK6OgIICMvHojhGGgAQXRr6NZaveCsvJ2pfb4EAgsNjNyh5gt0XqctM\n0GhmRsOH1k0UJbTCpIm5MRlPVzFnXUeGwLhhbx9m165YmO0BqWqGigI4akIE\nVdtd2JAkdR8bhiiAjLM2Z6GoNnExSH+DxmV8hYAROOJ9HLcKGecdGZ+2wBPW\nTdY+E6JWyXNFJm2EQ3kLDYCQZGhzh1SWmZjMaCx6RwKVffBMk7D76lX79ByR\n/XEb+ukSSzNk5Qfnzu750Xqzy0CjguDSipNQmtvdEOHA4lDxPpqrdn6ytyH6\n3teMAVoyBcxKh//DgGZJ6JBrRw0zzcB0hsvCAmDrdxpYFM6iU+fpCuMp19Ti\nO2owMJDYPxjO9lOUXIn5X+0dhPRhQze54dcIj07cQRvAmR5UTP39dxJU+Udt\neetm\r\n=Yp+F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHitOOzkwCy14Kz7bfpelGsdx5VWskGi/k0Xzx87AAOyAiAAzNDp5HEKUOWCHNjojeAgqEzPiK0LGlCF7ws4RdLW8w=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.e2e9777d.0_1628203676676_0.5233737191568628"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.72ff1e68.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.72ff1e68.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.72ff1e68.0","@material/mwc-textfield":"0.23.0-canary.72ff1e68.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"efaa4c0f4dc1cfea004a7f4dca613ec666b1106a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efaa4c0f4dc1cfea004a7f4dca613ec666b1106a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efaa4c0f4dc1cfea004a7f4dca613ec666b1106a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efaa4c0f4dc1cfea004a7f4dca613ec666b1106a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efaa4c0f4dc1cfea004a7f4dca613ec666b1106a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efaa4c0f4dc1cfea004a7f4dca613ec666b1106a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efaa4c0f4dc1cfea004a7f4dca613ec666b1106a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.72ff1e68.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-oyT5JR+9bGH+5tzKQrZPyjW8T/s22yhYnS1XOocyDRSZl/2ItbxrESlABnMM/K2DGohg9GzCsQZJnSH4nsZeHQ==","shasum":"475dcf38848c3cb4b774c0980e7a624983f034c1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.72ff1e68.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDaBPCRA9TVsSAnZWagAAr7gP/jMfZWxX5BN968ihTOot\n89L5aWptamVqnMltQ0Q1fvpbf6MRkNA06XSQUh1XCNErLk5zLojshxUuk1Nb\nfXske9j5jD2foC4N4iZCxYCpoT6fuDGF8gKgMz4BeW65bB0gFg7ZGkWjixbA\niNZaMU/a31CrySjHHPcPxzqvPea/rxBQM3iaK69+x75E4TCrrYSKWCD8gP5S\nBMqjbwCWkEjU7g3ZiXcHGgU9ZGZaHOqI/GBC+4gh9grTKaLqco/mDwbPC/QN\nJtRORzd0AM5647eIO3tmWxSX+1ufrszoDWJRp+UJ/eAT9IiA845GsjpaRMIl\nTGLDe8VuEDXcrsmgYarn/9mJFz0fmjfiUMEOCQMwpqAskd4rZwVh0Ml9C6Fh\nNgH4pbl8QjP4Pxl0zpyoq4cUcm4PWOyWXXVgol+eHV8PUZn76Ydlh0KzDlAd\nnV7H7RJfUgBPDEFqYGakn+m7PErhwxHlg17Oa5I5nVtA8FD7zBveCM9Uvz9L\n0pffZNw2XxRGZTBYUkgsIsAoSvONNdQmXMqvcnLmENtGukf9/L22WyPn1tUV\nKN5IHKd0vIMK9IN+r6Exy4bWFB/mbEyq4WbfzNxKlcJPbMcAdRJR9JhiHso8\nJ/Y6TxnbezxEIp/9JZtUlXwLa1Ufbe5jJjjn+Pmk4qgeWzG+CKpFBPEJtX7+\nirBO\r\n=sVr4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF6nRkylWn0neeaAyVauPSjA2NYk65/fqDB7HgxfNqPzAiEA1SHB+c6fzn7LBeh6N2/h76iKG0MektnOkzwm0sX2YA4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.72ff1e68.0_1628282958783_0.2206756732619115"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.c527e93b.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.c527e93b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.c527e93b.0","@material/mwc-textfield":"0.23.0-canary.c527e93b.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5f7d2f863731a86414f3b6d188833c46053b72c5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f7d2f863731a86414f3b6d188833c46053b72c5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f7d2f863731a86414f3b6d188833c46053b72c5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f7d2f863731a86414f3b6d188833c46053b72c5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f7d2f863731a86414f3b6d188833c46053b72c5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f7d2f863731a86414f3b6d188833c46053b72c5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5f7d2f863731a86414f3b6d188833c46053b72c5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.c527e93b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-8kszF4wZcyEh7FS0aoSC/JVzezsXADEGPKlNyUN45msCvxcTLKXZFWWzsxT/L6aD9bRAofY0CB+43kLWNFudkQ==","shasum":"bf00ae7d30e879c369c948a6fbef45c8b4044ea0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.c527e93b.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDaVhCRA9TVsSAnZWagAAD00P/A8V7JaQacerfFCKBsyF\nrbvptOpHSxQpE8h7dndYEyTv8aeFaX71HGk+6xJLwIIQ0woPFTeKfjQHnefC\n4ODKx/3qtXVz9G/1ndPvzt9+cX2ZbPM/79PrSIO/LaZQJZUl0aJjzwik9AwW\nIdlj9zZcKc5Uk15HPwRwwedZc02Js437MQldpDMfBEG9W977IjqHDO1rJ8PH\n3YzbBS+B+w1disv8iOhbfgXgIfKVqDA0S5sWIXaCsN16zElJ6a8yYPgNoe0f\nXVKOqD6Qx/jz2Yx8mbOaGAlkwWQh1OgnTY3OQVH82RLAeOS4KQUU2HFLmog1\nQpKjG2BJFdMQTiOC62766jbyqlZk86ollRwbkxTeM7ClELi2Aeqkx3DKevXz\nkS0xxwFx9tryqL/yetAUK5VfOkM/J3HxSZBvAdVORwlCGYt/73va3zzXd5AV\n8XfCK8XxJWDMoqZOLPbLbn5fabOvsi9ReXb+nwNSpp3332EbvjW0Lq9IX4Zn\ngQ7C7PId3q1Fquwlp/QL6dRSkjAFoJhWWkVo5aV+UMhVj+mK/rlwhrZjSr4n\nrgiGvbmHDT30s7cdh0BzVm7AnGy9QSiY7bqPnykIsoSSlnXPtpJ2Abk44SS3\nIIdFKZ0I/C8EAmLKxSi66+Qs6tGm+1a7xo4GHhVrSUk9/13FAb/uhEqu1M4f\nS3+K\r\n=7uF5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAxaewnk+ejzNSEa6b1G6RzCMtcaY75jlCllNeVA2LWjAiB3s+Tk3b+qv9wfiTBF6s06Eids0NMbcag0CicVflyExQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.c527e93b.0_1628284257819_0.6470812509203743"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.78b1eaac.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.78b1eaac.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.78b1eaac.0","@material/mwc-textfield":"0.23.0-canary.78b1eaac.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"6052db26d383ccd469e4c4f6cca3c1d2e4533696","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6052db26d383ccd469e4c4f6cca3c1d2e4533696/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6052db26d383ccd469e4c4f6cca3c1d2e4533696/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6052db26d383ccd469e4c4f6cca3c1d2e4533696/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6052db26d383ccd469e4c4f6cca3c1d2e4533696/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6052db26d383ccd469e4c4f6cca3c1d2e4533696/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6052db26d383ccd469e4c4f6cca3c1d2e4533696/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.78b1eaac.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Wq6QJNq661c11yB9VbOJO/407r7KEubnQL3xhQgQ9HZHI0t7PFS55tTgA6EyVf5KxzUnOA0ZX7pe8QNgiZE8NQ==","shasum":"d498f0ad520f25a5c2e81f5aa8be4b44f422d58b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.78b1eaac.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEW4kCRA9TVsSAnZWagAAzsMP+wZjSF8WXjXE5pmFDv5w\n/K7zB+mAAg3Wqa0rRaHr3BkUBXtzK58b77kBJnEvRfdom1dNu3y/FXmUidCk\nIFhVDGsfsi4YKTWn/0ZZl3akFdv2vHlS+N+ayewLgHUxNqIf5gawc5g4ehry\nAYRj1aPOmoPSWgE3I7xhvAVKpC6bDMJe8NfQfaWuy7YmYvc24eMJ2Eimag/0\nhbrTM/nJUEH02ahvPoB1Y8xnsGrH6RhYuOQ33qpZ8+/xb0H2o5uq8F26la7x\nAMOzt++2Uv7yJ7kAoqT+FSQskF7iAm18AgvEDYc3ZhwyGSfUsDjHmtBDsOzV\niZDRooSnwT3pfBYkbcZY9F2rDsjgsDZERBRUyViLr1VT29nswPHH1vMs7U74\nEPzhEOhdwXt2/hgvHAkE0Z+0uoZKaml5XyhXdSEOevUylcWDL5w4aoIu3wp+\n/LWb+XTbPRDu96Xd5aZhBg5ODcxG2MEDedES68cvDm1Qbr4lkGCEjYpWAsu3\nXu7mKGbG7YSiXGO9j3If2XIAwdqRPNMPO8zw9QDdfogLNF/vbVMusnDO4VHd\noP5vZFfc4UUcctFebGdSSo4qFchAf2P4RaZ+nbxZYiyX4wyWIZYmJr6QPzam\n1uX+dhFYWxQo9Hpkbi7KlfWOrdPd5yj9qujoRtsMrge4ZGTiKjUKMH7QByuy\nK2Xy\r\n=OCxR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7VK4zDbVte4K37wu7deY2OOdzEGVi8ngOuQh8DEJW/wIgOBmwEJ/7/khyZBWEgIVhzioCaLBWa+f2T+sOdvP316Q="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.78b1eaac.0_1628532260456_0.34505370118926004"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.a8a4ddc9.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.a8a4ddc9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.a8a4ddc9.0","@material/mwc-textfield":"0.23.0-canary.a8a4ddc9.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"d9658c00d9d10361ed16fd976b03d6652cda9ef6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d9658c00d9d10361ed16fd976b03d6652cda9ef6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d9658c00d9d10361ed16fd976b03d6652cda9ef6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d9658c00d9d10361ed16fd976b03d6652cda9ef6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d9658c00d9d10361ed16fd976b03d6652cda9ef6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d9658c00d9d10361ed16fd976b03d6652cda9ef6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d9658c00d9d10361ed16fd976b03d6652cda9ef6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.a8a4ddc9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-eozGYfV91yxOkJBkN9I04lDtvhfcy0PgbmC1Kf5lpSh78YWgCiRDlwanHOOuWb+9SmPnwWEZaG8JNVrM3flQjg==","shasum":"5ca62d5431a3455678a563559a7f22f97b11b724","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.a8a4ddc9.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEsm9CRA9TVsSAnZWagAAL5gP/2q0NSVXX+FeUu7GxOKc\nnIvJqNxo/UKibJMTxNG7sb30RCHdrN4Flu4SzAWF4uwsxt9vXytQXzGKnoBZ\ncZWhrs43XkgQhwANVmDq3+2tj0cc3dWFAtA0zoKRyWGxKL1ebKFyNgLklsj3\nWzMCGyrSqEboKsh7QZKsmntvEDx/uSoIqDCJxPtL/ZEr2jM6bLlFI3Vxvd+l\nAJwKBwy+DNH3T7X/LeuugYfgFtkchNvCzHVXIW35Bw/mX84VFpM115ghYzuG\nfwZ+9BRRJQMBZQdPoDx1Pcr5Er4pLonQeUBJPvBUAWl7PTyKfkrCVgNbyYH1\ndileNpgSZmJ0Ro3CZGOzYxg+aGPAEGMTqZOZDljdFWRp4mFe44QRIZFtt7Y0\nZ91gUmo9AOf6bzGPUD9FF0lVH6p+qvFMbvZw4JdqChYxkqf0cTgAjKDpwTVz\nsc8HYv8LoF3Mz/EpOxriNVrZBKfyAmKvRJH3iyr5malf491agegzWEjskDvH\nI8nQaRgem9HVOFETuYLJ1tB1Hl0qlxZ6uQDgKWLArMchHFJkYdGvlvZdyIaV\n45b2zgT1sFSKE/Ixz3SXiQkgU8o+v30ESluqjpfVFh/r05cmNE9vxz4TKbn0\nUveQGe4uDtHQk8BkdgyXgySh715pJhScKx6EC3YUsDo/YphLGHcWDKf/BwyI\nKrUN\r\n=l82b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFwC0u5YuBewpbH13saSMD7BPXdKkml3mvzPq7BdUvfAiB6Ag5u+WHMgQiRqZpZa0H+BgKLMWlghOy2sD+CPKDVrg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.a8a4ddc9.0_1628621245510_0.22514392094086877"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.99fc0632.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.99fc0632.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.99fc0632.0","@material/mwc-textfield":"0.23.0-canary.99fc0632.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1182c7b11008cbaa2e6a052092cde8c856306942","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1182c7b11008cbaa2e6a052092cde8c856306942/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1182c7b11008cbaa2e6a052092cde8c856306942/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1182c7b11008cbaa2e6a052092cde8c856306942/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1182c7b11008cbaa2e6a052092cde8c856306942/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1182c7b11008cbaa2e6a052092cde8c856306942/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1182c7b11008cbaa2e6a052092cde8c856306942/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.99fc0632.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-33yR0gBifdUGOmvBEat4Y6rkL8NlSH/uUMuUgXhmz5iMD1cy8bNZLmkwl3lsSCv3Tf8gzQP4vyIoUwG36ruexQ==","shasum":"c04b49db9899ec7529216a3340a474d193cdaa2c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.99fc0632.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFE2NCRA9TVsSAnZWagAAejMP/3SYVQ0ZSMaITi/aTkZa\n/FTBtTSGokG1LCTGdFErol81xVfsPGwJP5OqY41oJiovxb+bzQgOMKSTqAxr\nKhQ1mJ55jzz654MAPbj71mnHLKEHoyeitYanejXnOIqzcfzL5lEhDuY5NJiR\nU/eDfzqnVaiuo2IatMWho6+hNlMho2Z7Vv2B0p1ZyeiiCMBbqg6CVeWKO3JR\nBMl74qGLzUsczcc9u2Psl9Wb633ha1fnpZqwLb2+jPIKFMHMBPk9mYglTX1L\nFFRJ0nBJOyz6uuSKEpQ45ek0y2q6sCn8ukR/Pn02IJyc4U7QCcNdMxHecg76\nBuLe43dQzEglEcEW8ZNVl0kwZt0xgwyRBJ+U1+fa2RJKwva1OUtQmA6iPiF6\nV2WmE56dM2qEhGQGrf48ekc0C2zZ7KquN+OofGqBZXAmUg2KpnC3x0oDkvWl\n/GcvgEPHYtoNllfuK2jqcXZ/qt3HtF/fNuuZaIGeGPZmt0lFMMmNZh89zpb+\nVXgAbxAA7Qs+q3K+9lgbpdJN9XU5cD+fo4lcXwdzJZPduf7dkUKQ02uCyJSQ\n2gJ08HFEC5ct48hE1fcHTzzDd0Bs6FwMy45htRA6N0oV7jpw1oAfKC6G7Xeg\neznq0KE5FDW0EQjQsDs7yX+7nkK1qkLHGCrOiqiJ5tMq7kRNc2e8gJJUqiNQ\n73Cc\r\n=tGbL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6DGp7rTBYuwfL9oIE7VKIiZDB+JJJNjkFkyPGTmG0SQIgYe3Clrt8EbxQ4W7liWpAauqeNXXy0EvkxngYkJe9TJw="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.99fc0632.0_1628720525718_0.1492677538625955"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.3f47ae57.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.3f47ae57.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.3f47ae57.0","@material/mwc-textfield":"0.23.0-canary.3f47ae57.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"edf4f3bc9066a2b36444c8a434994a5482e8b500","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edf4f3bc9066a2b36444c8a434994a5482e8b500/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edf4f3bc9066a2b36444c8a434994a5482e8b500/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edf4f3bc9066a2b36444c8a434994a5482e8b500/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edf4f3bc9066a2b36444c8a434994a5482e8b500/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edf4f3bc9066a2b36444c8a434994a5482e8b500/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/edf4f3bc9066a2b36444c8a434994a5482e8b500/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.3f47ae57.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Z4tAXcKpsGhUp2E/KJJtA2RZcbH+OZ3g0gSHVDLZLJZAhvbzpaX/yukAGVliQXdt8kOCR8ulK1LByhDJYlON2Q==","shasum":"f8c6b2822b0c0c365664626ad472cf937ec61ac0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.3f47ae57.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFWG9CRA9TVsSAnZWagAA2wIP/j5WSCvwvlU2G5lzH7ti\naCnaSWvTId3ZnqZcGG/K1wsT+kzGSf5F//P/LOLZfdDhx7llt+/DCNPgZ6gI\nX49/r3nOI8Ej/u3tKzG6ypQQ4J55T43hvtjISCVV2x5Ye0OMqp0+69ZwNpkx\nycxjGRF64rAodTLNJDhaJkkRnGJ1khSU6lbaDn7SnJhMl2N/5Bm5aa3jBGn1\n2aoy7YvPYvF8tkmQkM49PkREy1ERgE4UtJU6bhwRbr+5kI2JiOyGLD11k9/+\nXks1buJC7Y3HA83DAkqJ/vc08pkEYFNaNNJbobxxFmMeU4azGVeoDNvW6UX9\nzBiuEV+VTgiW1k1RkHaOAmmRTqvZK44/1ADi0C95pzTv75Kfa2N65wOd+Rah\nkCNcR+louEDzxLMAxgdcoG+FFK88sS10L5F7BisTAS/uHhS5pAI9uuQ+GDaR\nFKzvyI7tFHIAXnLWQynffLN/1K666gJ6S1JuWsyxXQZAv4jYmIXJyMUronN4\ngrq/5xaPtNVZ7jFroQGtC/7/bHcpJ4GXyIhdgynVx4u0IEDyHwVoJk/3eFiq\nCYgyfAIgXkhVAiEyr/0PcbiRhn4yCLqlMJOFD9+g94KNEYJ/71Htro7SMBoj\neQqLRbYqE/zsTst3m9CuJCeY9LNXqlDiPKPFSvCctkw/8iqwcx7NnwneBC99\nClEp\r\n=HIiC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRndp0ZblDogxfIK3ugbxq/EA3u0bqYtCsuy46sm+uswIhAPZlGAo/3cjqHToz8ZsZv2w+B3PuTfJG0I4OVkWZQdtZ"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.3f47ae57.0_1628791229461_0.2889080916611584"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.6b9bfc32.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.6b9bfc32.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.6b9bfc32.0","@material/mwc-textfield":"0.23.0-canary.6b9bfc32.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"2479bbd88c9e53b974ec7671345a52cd8ac0e907","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2479bbd88c9e53b974ec7671345a52cd8ac0e907/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-components-web-components/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2479bbd88c9e53b974ec7671345a52cd8ac0e907/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2479bbd88c9e53b974ec7671345a52cd8ac0e907/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2479bbd88c9e53b974ec7671345a52cd8ac0e907/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2479bbd88c9e53b974ec7671345a52cd8ac0e907/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2479bbd88c9e53b974ec7671345a52cd8ac0e907/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.6b9bfc32.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-SXgwVWBuejnFEKuhK+s+REB82vVxD4T86HaDgqBqd5NoT0hufmmi89AuLpwtUGY9I+ZtrKjP50S2p71ocAjHZA==","shasum":"5459a23a3fe4225a2125d14c7ee2119d249f7223","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.6b9bfc32.0.tgz","fileCount":13,"unpackedSize":39477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFWdpCRA9TVsSAnZWagAAdIQP/RXIMHuxWVE/WpMMIK6U\nFcEMaAlcVdstlAzzA5Tcx3AgDa5JlbRJ8e2WtJ82Q4d8aIBnfcNgcyz2zqA/\nOVIpc7JigAOtrU5fFvjfCNp7hFhPAVT65vjHyLetbMSeqtUV7h/X5sDtcey+\nkbkAphM8z97v7vucP0ryYEbMmqiBkAPxubD8tdhKhoOY8jwbz/GObmduX+PM\nqyGEXhYRBvAMvjvmlL56bnKFEQx4IugbVKwkFTqho3p5UcX7c73WjUqZZCSW\nZW7t7HcxPzlDeKbaTMkAc1Q6v1rzGLy8G1niKr0HcprtyjRA35M9ocI44Zh4\n2FEJ9bL6P+o4KVz0ub+kEUwQRaZoIOTeaR5r4Lddmk/xFI7i3234QT86EuO6\ng7ZB3oQRt2dhIX2nFxFyBQakfuAOSuaO0209liaTHmE59MoTK0RPN5YEwLS1\nPfFtnQOdRNqGW3ivgdVqR0PLnSQ+aDkddzSzZCdTT+F+arpKk8hGJM4VrG2S\nj8pGI4BUZZthBEniVRQhQnWQWcMIM7s8EvnGGooqt6lT0AfTm7jx0jcuJlT4\nCq9v7MslICIsRb8aoqS+oLLha5DOK7fRr02vWzK1iVXn7fRC7JWcZVpYF37e\n6SPwX+SDMEU3dSc8f/3UrHyntWRzfAyQFj7IiJPSBakhVNLDVLnEworXLbks\ntkzm\r\n=kN47\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjX7D4pqCj/sEctSBIbrieU2FwMiPYPvP2QDKXUjKp9AIgcyp0FT1UMxSmtfRCgxaoekZNrB5fOS0owV4zAc5PAxs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.6b9bfc32.0_1628792681036_0.6371468280771868"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.c89ecc63.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.c89ecc63.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.c89ecc63.0","@material/mwc-textfield":"0.23.0-canary.c89ecc63.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"aaa5bd89f698007e7af19bbeeea7c1212b851c35","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaa5bd89f698007e7af19bbeeea7c1212b851c35/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaa5bd89f698007e7af19bbeeea7c1212b851c35/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaa5bd89f698007e7af19bbeeea7c1212b851c35/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaa5bd89f698007e7af19bbeeea7c1212b851c35/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaa5bd89f698007e7af19bbeeea7c1212b851c35/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/aaa5bd89f698007e7af19bbeeea7c1212b851c35/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.c89ecc63.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-LG+X7v70ykZ7XIconOQdhkYzrwO5LFJ/10qSSDMP1aot9PYIuM4NUZrv5nfYzJ2tEQZ0G6K/RadaZx3H7pFEYA==","shasum":"6449d0a9b28dac8175bb29219c0cdd9216f5ffd1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.c89ecc63.0.tgz","fileCount":13,"unpackedSize":39455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGp2mCRA9TVsSAnZWagAA908P+weasAzXUIFwCOL6y4Kn\nG84u7K3FSoUaMlSblfxQT2l3qpuYzV32IUGABSMFUdKmzJm9Xd7Bh5okYBaT\nibB++zEjiScdgf30XMbB3yee1w0J0yDwmRRVBrlIcZE4JzNSuUG+GLc6F9O9\nPFG+XbfZcgNKvektW5YI54p+s3x1bqwed3zFX4p833HI2oKw+feZkhE8lVBQ\nqfSxJ09A8ZNyjmD11kn5dC3Dnsf0jwOLHpMNuVL+7OmMwC0h3VukAQzJ+JR0\n2v9HPkXSvu6ZupYDosh7B9ADdlWgE4XpbW5iS0IKEEyPT7LJRJZeoSm+q5Xo\nhGvs1jC2xjsC1Udkz8wdCOaJ7uih/YNdJ49VpNM/fhnRWnAiT5JJcxvPebH6\nUKnSLJdurcIxIzkldaNFT79AXjQWU2rdtWkqJ8OfnvIS9z4wIfinJ4ZnMLKe\nxBNJ/NikGu3dcyV6Z0hoE2J02mDehU46NIAVYi1fD3LUpwh6AMJ3hehpgvD6\n6OTSWzrzrAzv+OEPTs24vpb+dJwaW2YPCUcVqYH4Eb+BJyXvpufcUVTzKWdm\nj1DQaiQsCj94bW2IOJjmZkqcpovis4EODB03mLj2cxbD5JM4groRVYcIEkYf\nd8DSQCwyhcNPa9V8obegPI/+jGWVEkt0UeNkSvcXLMK5+MtBSigYYLSrkBB1\nFgWM\r\n=QXCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZ6JKABE0IhoX7783ITrcwmBhWuKnAbDS3DXWcJMHygAiAgYDCKGyNHT4gYRJfoOwNb9wNQDk+vVc0ozFtD9OVjDQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.c89ecc63.0_1629134246647_0.5901503135693529"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.59de86bd.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.59de86bd.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.59de86bd.0","@material/mwc-textfield":"0.23.0-canary.59de86bd.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ac639cd83d2e2bff117ac2f85b2cd2641560a85a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac639cd83d2e2bff117ac2f85b2cd2641560a85a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac639cd83d2e2bff117ac2f85b2cd2641560a85a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac639cd83d2e2bff117ac2f85b2cd2641560a85a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac639cd83d2e2bff117ac2f85b2cd2641560a85a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac639cd83d2e2bff117ac2f85b2cd2641560a85a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ac639cd83d2e2bff117ac2f85b2cd2641560a85a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.59de86bd.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Q7sfA1c853A++Zs1oyllTW0D1k08Ct7DdQs5JhhMA0qb9Lspn5T66QzOX1HvB5pvB8J13i3Y4BpujVtgVo0OUA==","shasum":"dec9e16d9737dfeb49ba535413eebc28d537f6f0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.59de86bd.0.tgz","fileCount":13,"unpackedSize":39455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHGSuCRA9TVsSAnZWagAAhs0P/26L/e17idPkLANxYIZy\nzrw6taL0AGBMQVQKaO9DJfQePPyZd1sQHcdV6CPCT6ab15JMWTKqs3+aHg4s\nv0SbmOiLQKOE4RZTwUEEeLOLf9QaECJcJM9KsMXSrgmDeDixAO173NrLmKac\nQ6xqjwfzk5Ku/Vro41mFVfSG+X8fIHAzKlm+95oih29bDGfb1qfiXLaA1VMm\njqLRmJgJacd15Vhkr1Grf7rPIOmyofvOGlWkpJ1Ea5fTmvpm3PH2BWzSBUHR\nW1sNk5pKRUMEcYJImIZ0l8VhKIAgGj3hPUj4kUf+Hhd4X75r51vodESsTUwB\nVJroJtg3r9yzOVKssXKRJmjEjeWXEIsl2Vg7V05viuGEI01sk1Q0a/dqryUA\nGj7ys82V7Iagb6CO++O1aS6K/dIA1yJrHcPLY+o1NV9gs8iJ2WAZRZuWZvqi\ngHHDwxK5VzgunNlLgE/XBFI97GxNkwui8ShIJJTPNIoasa0Vq6/DiMbWHkfX\nMYKQB+Lb9Kzy3NMVgVSfWioiA09G6Mg4GX39dXFhSZo6B8yuxbFEm1pMDxfa\ngU9BySw9He/dXEVcOwOx74eewvicHFZbKmsdh/oNEOvSRFyleU7YyVTIKEu2\nI86j8Cz7sBB5PB6vow/EZubEr8WrZtT8H5goFcUaKiUJ6kVbqsStAtqtChFW\nzuSt\r\n=okmZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK9mosV3jxBWlI6dQcvEbvg4ERJoXdyQ2kDvdJPTsLYQIhAOGot8ktniQAiwpubP7Nh9svLF4tfSMZyfa/vSR5yXGI"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.59de86bd.0_1629250734760_0.767614549561739"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.dcda879b.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.dcda879b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.dcda879b.0","@material/mwc-textfield":"0.23.0-canary.dcda879b.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ab309abf464fd85bb1f234aaf8a2ccd35b8e7635","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab309abf464fd85bb1f234aaf8a2ccd35b8e7635/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab309abf464fd85bb1f234aaf8a2ccd35b8e7635/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab309abf464fd85bb1f234aaf8a2ccd35b8e7635/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab309abf464fd85bb1f234aaf8a2ccd35b8e7635/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab309abf464fd85bb1f234aaf8a2ccd35b8e7635/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ab309abf464fd85bb1f234aaf8a2ccd35b8e7635/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-components-web-components/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-components-web-components/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.dcda879b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-BqJqMP8uU9AH1+usJCKF5zJ/iyQlJv7dUOcxBbLqJKd8pnMwZut3qiTJHoV2S//ACFABNOgdLA1BtoM1uXl95g==","shasum":"a7ec308f0549e932ac9dae9b63401636988ecf01","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.dcda879b.0.tgz","fileCount":13,"unpackedSize":39455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHYhyCRA9TVsSAnZWagAAZMAP+wWCprWp7gCOVtbV3rN7\n2IukT5JlhRFaJTy9HtQ3q3CL+Az7o+taXG19DUdMznMD0EHufnkbfaeKwzmB\n2ctTb6KFlYR+o+La/fGq+xdH5nk4xD+lZMrCX1BlhKV9dc43lEF13a5wvvX9\nY5YnMYM6v/XaHp8lDg9RECm632CgLWRNMOOmLcpXuK8VM72HvZfHhnJiqXSd\nVhy+tUEE8iIzJeATYvNxu/ZzyFGv1i/WCrW9+nTS5bpveiBYVRDKWPlxfABe\nxldr2EL/ZgNAFwOtRRvWqf75PZ3CsX5h6BJTWUGT2V1kNQmIE2EI3loak/xL\nBBuy2AUsciJRE6ODE9yEqndHVnPLAN08ugROtDD980AtjfN4URLki92TQMCn\nWiauQhRM9UEQDOrW9/v79VLZBYIrzNmS0egwk4yFZXD9vq8816ik4bb1O/Ws\niIAn+pLgXzzC0CwDHhSP3wZ3LbgDwIQFr00YgGcUPkky33jkCppDe3HQNbOZ\nD6mB0vFbJ6Ij+M0tMy2AkaE6ntE68Sz1zA4zV25WQBWQNuN1lBua3/OXhO51\nBkovGENVV7T6SU8L6XENskNpsCGEMTcY3yRSOVrNje/fQiPHxywuRjkJsbG3\nPajqwfaRSJf5WFmvdyfNKS+ta725rq5AwWNLAtQvHfl4wLf7brYCI0+C9OIg\nbKAl\r\n=t76/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEo7GzqkfC/EL4ABH5W30gLY2BD2YjywaK4l70I/RHAQAiBlVEWKBCVPFNRTNVvNqYfcf15ppKH9qg+V9+NCofPw8Q=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.dcda879b.0_1629325425991_0.8977773766096062"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.dbb8b366.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.dbb8b366.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.dbb8b366.0","@material/mwc-textfield":"0.23.0-canary.dbb8b366.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9def9b810923fb3cf5946b62d7be5df5ae926fe6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9def9b810923fb3cf5946b62d7be5df5ae926fe6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9def9b810923fb3cf5946b62d7be5df5ae926fe6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9def9b810923fb3cf5946b62d7be5df5ae926fe6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9def9b810923fb3cf5946b62d7be5df5ae926fe6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9def9b810923fb3cf5946b62d7be5df5ae926fe6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9def9b810923fb3cf5946b62d7be5df5ae926fe6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.dbb8b366.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-N9km6mxk4+4CbGpeL19LzVP29wsB+z6NmOhk+uUN/qusU11VKR7YT9tdP4ljIqrQeJ6PQ36DKMUeMWpJT9ejlg==","shasum":"624116c83fdd1a3c69dfc04b856f18d1f10b22cc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.dbb8b366.0.tgz","fileCount":13,"unpackedSize":39345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHuKgCRA9TVsSAnZWagAAVV8P/3RAMD+Wof6T7xFGoBhk\nLhvAYjYPy3PlW5IIRyrxHRm5MKs+OqhsusUefNKot1CC/7lcMRl3ceOrPJM2\n8uxX243kX7hbn4FoAmKotk5XQYcG51p1GAjK2Dugnx1TbWryPObLhGkfYiY+\nmHanjGwS32ZBUv2nbiAh1K72zIo8Th8I+IC14Q4PWJRTdTgTHW64HUFyeRxM\nHHaFWAIPQle8RFjWgpGWRbQm8Bs3gINr/2Ip9cuSg5Pu9AcjSVQQ17PcbPUS\nfowaULrDwfBpGfRleYLOxLt9qTUdxWqyqCRrIVry7XUo+g2T/LlG0OcY2PBJ\nLo+d0OqHJjvlOmrQt4IyGChk/vMdniaxBr6FvIjg663e95VRD0eumYOTXo3a\ny37esayOFz1LCuQYWVOSHeAj79lTrX5z67VtqZc6l5tXv2pWuWiN9w9kxdIB\niT6OM9XoY9J0ipVcy7WAU8T2dSHjSKf6iM9Tu0Ozk/pxolV7+BsWLJvHkx7F\nnnawTXcUS3KuxeyLqHEzvNDwtLAlsOEuJbT0CM/e7QDfUvaVk7b7fkdslUSk\nULB7ABv/ClJBuDpPvnstblFfmnHAdMh9UrSXjMU/uM/JaQQCyAeKu9/RKmGT\nAN3/A4qPrFBkcreebdPx9boqEW3AKCjJEuujt9k45AFDgAvQS/Je0ixCINMr\n80gf\r\n=GrW6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+AVb6d36YWXStGomgdhcbelI46Yj2MMwDgrJ3QRwAfAiBJ3WEOrKAP6e/ZfUPaFkvCr+e3/V/rLkWGeY7VSTmAzA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.dbb8b366.0_1629414048511_0.6956977678165204"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.c6e3060c.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.c6e3060c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.c6e3060c.0","@material/mwc-textfield":"0.23.0-canary.c6e3060c.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"2c417f32674c7318ccfdfa842a3a2cb3d57853b5","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c417f32674c7318ccfdfa842a3a2cb3d57853b5/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c417f32674c7318ccfdfa842a3a2cb3d57853b5/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c417f32674c7318ccfdfa842a3a2cb3d57853b5/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c417f32674c7318ccfdfa842a3a2cb3d57853b5/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c417f32674c7318ccfdfa842a3a2cb3d57853b5/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c417f32674c7318ccfdfa842a3a2cb3d57853b5/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.c6e3060c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-RNbfWP+hMx0Xe1g8U3Ga1RS2JA35eUtOo8SiLbkf7HM0F3aGyIsYFIiv98NxRN94qGp2mwSkVVhg3kF6BWskGg==","shasum":"c12931e2992991a20fc5d2dc87954cfbe5398707","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.c6e3060c.0.tgz","fileCount":13,"unpackedSize":39345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHuMQCRA9TVsSAnZWagAAOk0P/jiDpbzn/QL+RifRoEnB\nF7edY5FO2UKxXH849fL5u7NKct9xdmAvrAMuG0ulKPTggBHQq3JjTjlWet2S\nqhGJjbAli9h72/tyoKZgDqqEFdVrAcWJ6iTuZK3mO1dgRXlUNvodFH8IGYnL\nPLo2uN2VSW8QO2v99uyHfuylPTSUZaPuYumGBhhC9UEtx4wuxp7XMi30MeGk\nFWXAiU7O6fNv3moS/7ZBBqiz8jqzLiGqAPP2XM8LTxiF6IALM2yQeH+PH5RB\nR9QWGeXkqlgYqyzhKpz+e5/771jsAsM9+TuHAtDK5zbGitA+6hR9eCUF4xVb\nupICVImP8h5LQGXPUdBFUFOgV0vib6LBWpU8kcbhBaZZjAzFlBbZJs4lKR6Q\nTJrvpUU4WnuGE38D/b0wTK+idN+uHHewapbAEblFYgMT4g9ihYrWf46kS/hN\nzYznU0Kq8tDWXclsH/nf4rC6wvnlQFFMQOiDcRWpPtvY7a/tCL0ZFK+uaD35\nurIcjcXoaSH2MEIRNg0DcEGAHp5gC94VoEls0a2xA8gUmByauvVrkJESEF3j\nn6/PpuLpdUfBX8MwUsFavibdfGzjkG4eo49cfv6JDQA2vxB0LtL0J8MSbhKa\nZ5rpSPX0g1JxSgTJyIJX6vSxTOF3ySp0uUfX0/W93FeGJkWGQ7Zr4wQjV9Vf\nd/lu\r\n=On5j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLjVWegfXGhYRt7YNyf0/7QXbIk4r9t4QIVi0XSL4JIAiEAmbRTxtSkFX/uTQR3NGyux4pGF2FuW3Sxx5+8YA/pzi8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.c6e3060c.0_1629414160783_0.12816125687286672"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.03120b7d.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.03120b7d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.03120b7d.0","@material/mwc-textfield":"0.23.0-canary.03120b7d.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ba0dc47ad891e00a21e2d69aec6ec4c6dc83e003/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.03120b7d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-oKKLndtkreTft9fTwHuiIBQ+ia8Wwi8ddmH8JCFLkrGvMndNsbk55NdoqhAKcp3SlHv9pcGPVzz3AWZTXf5hUA==","shasum":"492dfd459631832da9a3462afab6df45c4b36410","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.03120b7d.0.tgz","fileCount":13,"unpackedSize":39345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHvcGCRA9TVsSAnZWagAAitwP/jBsHFU7QsZzHW46hzNT\nvNP0qxufG42o07rCViHpH9CJUbymLLILpeVkrDsCHCn17S4FnCOVWDVeSTGE\nMhO/wr+nrlzENBmGl425LkZiig2bu4urD9fidCO7laXtOhYNDQ8lm2O9HrvN\nfn9pBWCV5pWGdCinpk/SQ086pUx3RScWvQSFjR4zxqQdbAJuvxu6M8Q8SzHy\neQga7pIHPSAhelM5OYY2bXkzGX8gpTNGUxGcpzTnZnfc3kd0fLWbml306jtx\nC6DZm6DZzBb9b1RM7nswj1J/xvTI5rzjHO5Y6TpWSROCXX4mKCn6W/+Vnrm4\nO5xllAUPAPg9zbHG6u49sYN2uiEnr/E+yVHXWReG2egnobYItGvn2bgdqKP0\nuLjZHz4kBJ+5+pw8jc6W1RU5D0nmm36HolqfxVXUf7leOG2Hi/pSaUb3xuqw\nwtihp4RL2Qx+1GsW8yk2VJ84yr8AAqM5ZZ9/Pc/6ZTPcvI1UsHSbEd/mUlmO\nmhUJoNzW+RiAG/u0vRdP8oaICgExN1yRs5j4vRYIQQsuZ4qjkWvwb/Y6PJ8f\nl30+2/Nyxbiop8W+BREP4Tbyd3FqMiuyx8KbAyRRTWOi+nO6CuPDf+NawGPq\n7wwzztptHhHQPTDDvsk6EPDzGSehphsrvvag/UHMQn1XiO+BmsSNbFwt4W5y\n1Ukv\r\n=OMKt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvqvfLIvJPjB5TCUxazmdcGIoRuLAmqA9gcpnin0pT/QIgXLBoOhlwZP0Kn/xrEGDfuUSeT9QQGSWtgxCWYu/CB2s="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.03120b7d.0_1629419269883_0.7105769216688811"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.d75a5f74.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.d75a5f74.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.d75a5f74.0","@material/mwc-textfield":"0.23.0-canary.d75a5f74.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ffbe861a3137fecad60074a6f36ca1061f940cf2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ffbe861a3137fecad60074a6f36ca1061f940cf2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ffbe861a3137fecad60074a6f36ca1061f940cf2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ffbe861a3137fecad60074a6f36ca1061f940cf2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ffbe861a3137fecad60074a6f36ca1061f940cf2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ffbe861a3137fecad60074a6f36ca1061f940cf2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ffbe861a3137fecad60074a6f36ca1061f940cf2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.d75a5f74.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-InawpcOz74VQbpPfWsHAwAY7tMmaUUqTdaagBdJ7X+qsbqgFziqEfo9hjw2hON0MbY2zI4N/aOeKQQBh+0Iewg==","shasum":"72e44bfa9319afafdcc935a4f3ca3cdab1c7e26c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.d75a5f74.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH2BICRA9TVsSAnZWagAAKloP/i814Aa4vsOsboNzBCYs\n6C9VpNcWcFBCxuHgPQ8jDbC5Kc+uIxI4v27KpLtYYRSM216iWlnwPCAqK6bH\nzk/11KSrTgyxTW3PDJaBjPpp+u/ULxADv4LaBeSaEGTytfr0vqNU+eU8MvZ1\nIiGkPeA8B5AAHY1MR5g6h5Xx6DquNHpxJ6MuepAsCpxEDIqHn1u8D5bVSqGT\ndBuPOvWOa/xTxcbtkV63nLKeF40rlfLUAunGYNQEHVyNG76HElUraan6w+1O\ne+Fmsr8oRFF3ca1fKZ0aGN92UqLJpYkfeCsVGWh5JT7lkPF7I33zUeQaJHgl\nwM4H/8WToktEMCgfZBR24Cs6DubaFyPCSehEFv2Ixi0rnQmp0hbp4d0sP8L0\nNJGTR3NKG6iRgHNY/GsYVfijUQH7CQ/vvED5/8wWFqHgGnfwmt8IGEqO/yjY\nxmB6SLobdONwrQLIvsxLdyvtF0LaYKXEJORE9VLzpq85r2ktskbRc1bKN07L\nFoXiIUYPg4uNmK6k/8PUsiuZfjmYg9y/5DrkaDwNiKdgMszZLPZ2fPYQxEK8\nwjRR6hGHnLh41y90Kh8jLHdd7D3qpS1EobSZypEVKg3ba0cZax/c2rkWJAfC\nj1hWygq2iw2rxnj80GrwQAknpEUS7X5AAaweADqaqZdyILvBTPBNKtyTGTea\nqiKy\r\n=7kWK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD68B2vUVL4ZQI4aH4xCTa/fVZLCVrW1xKwC7GoWPVKFgIhANFXxq85ZFo9insEYn4I+kc5poNw0vWLlXc9fCbJoYCc"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.d75a5f74.0_1629446216339_0.41117511853954225"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.3d79ffe7.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.3d79ffe7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.3d79ffe7.0","@material/mwc-textfield":"0.23.0-canary.3d79ffe7.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"4d51b5574d0d1d8166f9358a39a5d3f2b4c728db","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d51b5574d0d1d8166f9358a39a5d3f2b4c728db/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d51b5574d0d1d8166f9358a39a5d3f2b4c728db/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d51b5574d0d1d8166f9358a39a5d3f2b4c728db/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d51b5574d0d1d8166f9358a39a5d3f2b4c728db/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d51b5574d0d1d8166f9358a39a5d3f2b4c728db/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4d51b5574d0d1d8166f9358a39a5d3f2b4c728db/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.3d79ffe7.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-kw3sSs2FF8/LzjYOYLRCFAXQgW4+G/fu8omuCVsr09owbnlF8v9e60jqLuYZxJA/ilZbj6bO0f+ycbwFSZApOQ==","shasum":"57ac5ae344bf890736ee987734da4e0db5625af0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.3d79ffe7.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH+S1CRA9TVsSAnZWagAA0J8P+wSx+ZmraIlGM9cb/UDL\nfCY800A1F0c3l+te49Iat6t66LHuutPEMe4kH97XmogCgsObNztm23Y+4Wz3\n4Z/yxzXBPqp+LMWy+uVpa3034MYqJquXqeym1LdEIY+2HaSMkXtkuSyrZLLL\nkiobI2+DNxpRiR8uQukBOsV6uBIeDQlp5GaFUuyFENSyf8ZxS5jNmTbwJ69N\nhfQdX3JtlEUU1BDWormeNZegWSze4LC7g7vVUdrVNwg97CrjBPCsHqLooogH\nR7YVWiR9mEygp2NEUYGnzmKv49VRY2LZkwWrXtk6KHA9j/dI0LzMdZaFkxy3\nmw7fyXUcNr2KoHDnMDRfbWYjJP1JN+MQlA2E/ZvqacOuZ/oRSY9n7P+dhqDk\nGnxkR4NTQFQoLXb8FMoKtp4Y3X8PwJUkPREhylDfaLi96vJxy7EfsxvD8icL\n0m0ht5XYZkgBtcQsBKMIIac3qWSW6Z6j0icrgqwAK0iKhO9svaT0TqF2mqfd\nEuVzgt4WFGOCsHiWtQxXwNes/fmi1rckf3dttoMCMs3GjXL5gobGVwsqBZ3c\na2DTAdb6Vk6NIUAMO7LddcOBQNLye3zUR1sfF6D1arQflZb5u64KwfBArJDh\n0R03j0g37SPdCJoe8u1lQzm9HcUXqbhs+on/AQP9WVIfkCVWR/bWBH/AfQrM\nc738\r\n=fY8v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGOqvusCrCNMmU8wmWsCXc3xqDRjEvVKVD5usUXZy+uLAiEAudWPZifzLImHw3QchmxcnbqdPKng4JbAEuy7FpjI7DY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.3d79ffe7.0_1629480117527_0.9177571282157839"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.02213ebe.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.02213ebe.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.02213ebe.0","@material/mwc-textfield":"0.23.0-canary.02213ebe.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"fb5a30909287b897d793fe4c7cfca2cc93cae697","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fb5a30909287b897d793fe4c7cfca2cc93cae697/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fb5a30909287b897d793fe4c7cfca2cc93cae697/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fb5a30909287b897d793fe4c7cfca2cc93cae697/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fb5a30909287b897d793fe4c7cfca2cc93cae697/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fb5a30909287b897d793fe4c7cfca2cc93cae697/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fb5a30909287b897d793fe4c7cfca2cc93cae697/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.02213ebe.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ajjherJlIlyAC+UFR9wYtus3hs5b3zW85PKvHyC4UuvOfOQqOHhLHCUF6VUW78FfcQWWBNjR1aUuTdFWSlxfwA==","shasum":"fec305af9c5cd76d8017e32d9ee29e75308a7ecf","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.02213ebe.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH+XSCRA9TVsSAnZWagAAd28P/jMqoBjb9UOBILF+i2tj\nJW66j1k9F/z3Zio+65MDE/QT7KxjGe94J7WMUPk5lHYxgA6faClvhE3+rB5R\nb26WiRfp79t3AQNrPv1u3YPT0GI9F/85JvNyNp//Sq2QCjHniy0GkH6A+d6i\n9qJzVIEjHbGFkhyU5fV0YoS/yDCh0bPa0yuOmplz2SZauM/77RvSi+Sz4v+U\nGxN4PR7o5KABepJw64Y1FZefzMYtcCNmTikX0Xf6pgJLD4AK/S3nM9yVhrGG\n0omTIkIe7YD3pQhac8lg7TyWabfl9vIaGT/8u8bXdEAwkNinGcxIG2BAe0qh\n5gOmDislgkLpMZS5umli5lWCGXJMM3Y6xrkSafENTMv0PlqRB4uTYaM+jwdn\n4XxRBnWN5oKybYBxKcmkBGTXMHp1ugYfqTuiE52d3LS8FIglUnaigB6eB06j\n+OF+MN6vvSoA78d9dfy7EShmetMhWeBoINEpXP4mUWy/vrB/v9dl5/t0jWJi\n4ODyPOaLA3oa95QjZTGfxbOjp0dxiiiSMQpYkJaPgYBTBg42r1p8KIwYQ7Qi\nJ4+gKJYj+ruFSjIRzfTYNEHQ99bqGD2R5vU1j40moEb/zy//shEwJbubHCnv\nv9FqF56SUsBs1Z8BLjKElueo3Uzldu75WDREEH/lu1jsu/VUdIiNz5nu08Qk\nAylY\r\n=1zQT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFvnPq2MVkF0MmcNktzDVCqIlc+xNPw7s0hdAcu1bYAAiEAm5+Qczdg3QKnIrZBTIUBcDkv4htniaYLHfHROMwqi2k="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.02213ebe.0_1629480402584_0.0604667888319812"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.90a999b9.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.90a999b9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.90a999b9.0","@material/mwc-textfield":"0.23.0-canary.90a999b9.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2c4d7acf2d3387438092d8cf5fa7ba37ca3a8b8f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.90a999b9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-aFrMKEI0iSD0yIsQVXyoUaqNsi5oDAYhCJR6bxKoYQuFIsIdVKTkLHLf+NdkDo0lT5xNVGJddJXhQKocVhzuwg==","shasum":"f49c71f84d1f3d92f7ed16502d03fcd8d2082394","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.90a999b9.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH/e7CRA9TVsSAnZWagAA5h0P/1McwBJRNhiasqnkOlVy\nKZ/eR1ZHOHG0YeAG7ubXMbrK4HJHWU71lEAfLVoRSrEjiUOtvBdh/1hNbhfy\nzJpsts1LnEurUOf17/HWYXt6b38AQqOkmPrQQzHXTm+uNbmL9qO9/k5F2aaQ\nl/hfNcatYEo17biWM/DIrjX4q4pICgaDQwsn9N2yX2SzDV+m0LTpVLKT4uqE\n5aeLE4c0RLaOem5+d3iJ/fswwzvqBDZ1YyzdNh72gUPSv51pfo7X9ECk0Cwo\nqjjFqz9uZebzOkOIyGZ0DB+esOR8TUg/7PBehLDv4wq8crpIgiDhxvKcLPND\ndVnOmRYAA9yE5/hR220u94D/5ITTLPVVMCICp/RLj824yNY+w2VCyeh/lZlZ\n70KmEQZKL/vIeEvd/C4ObAsMT2e4uNTlpHo3M8IiUtVJSpONPl/MmrZ0yqQO\n/8XXpgqoawkOqUAB/IKcICj2jcSaaSDzkLecCgx3GXUfLuWqe3onkm69Hj28\nTJRQa0mVCen0n57RUOHKHxDpNw406N3qWAKmKJH2LLf87O0GS6rxLdJzhQjj\nJAxn0xqmCSVV4MdeTusqaclTOtQ25JxwfKIUba6NkSz1MmdzrPnch+5v/3Su\n5s0QD1tl8ust9tbfuN3+z6VuBeJJccTOPOV0konaDrx+DvYMtHRLS+9SF8qS\nofzp\r\n=YAX/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVzmBhEXy+9TajkzHtNlCTMBNqRiitKkvOz0HLV3RllwIgV9bOjyUWhbz9XMrM9eAz+heI5ya541n+SDPsDzBDs3Q="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.90a999b9.0_1629484986915_0.2805511159037315"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.6db58716.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.6db58716.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.6db58716.0","@material/mwc-textfield":"0.23.0-canary.6db58716.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"187faecfb35a3d9f67ae8a6ae1c83b5f796d3158","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/187faecfb35a3d9f67ae8a6ae1c83b5f796d3158/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/187faecfb35a3d9f67ae8a6ae1c83b5f796d3158/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/187faecfb35a3d9f67ae8a6ae1c83b5f796d3158/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/187faecfb35a3d9f67ae8a6ae1c83b5f796d3158/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/187faecfb35a3d9f67ae8a6ae1c83b5f796d3158/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/187faecfb35a3d9f67ae8a6ae1c83b5f796d3158/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.6db58716.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-k4zglSSfujRg6uI51WB2xcZ0X4tJYPihtyj4TNopU5ec/Lep9lFOrwXveJ0uZ2knKa2lkbcDn7cEkr/Qor82QA==","shasum":"0a1061982cd9e895628e498da0431a417b1e8848","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.6db58716.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI2WSCRA9TVsSAnZWagAAIKMP/i+KQzYDn1BbizOqbzDS\nOeMXqBopmiw26BTEkjaRVZjm9SF86FJqOGK/LgFD0DMUmGof4VEehQgvazzT\nnWtILRbb0MZ2V7mTny+ccNRvyD36X6ezL6TqSUdXOz/rWfU0yYPYmalWY1Qm\nL1svcDWnQRfK56OmtpyziwKE1dgkzSrpEFsp0LLwxKHYy+LziP1/fApvYJM9\nHFipq0xhe44yEPZqaTBb/pn+YjGPYpt06d5hP1aMua2FNQerY1N9lTf0OD2k\nZrHsikYyP5cKCDO2t728nHEgOy6QM9O/iHSgUMrVRsJqYcR7ZpRtlJ3BVVgn\nRZyFdqLIpU7csy8RPFdX7h1KCq1S8rx0/MO5CRjk/qKZEuyf3PHrUyqyKwQ8\nd0hdAmWY0nm86Ovos5Q6txrbmCUZ/FzPeZ2VaGjegB81lGM0n1FG7p9E5vrt\nmGh2xz7KWVGjvGrEcII869hGSGf/jb5JbFY89WnQbYiOxD8ZQGCqk0rknRGU\ndGFNammJ3z/es+cWRSflZnCMDcW68UcdMzCbtNuHDyblGRRVFiSyPS/ImZsv\n7t+dLxOWbDR8Sl6kevyv/yTpOTVcP6zEL9+7QjYkpvuBz2hrklcJ56i+uyEP\nABmP/mQbHk3a+aHBmNhK7FBBEnJK6zlcjasj7m/8VdB8642bLpKU5RYpqRl4\nlxmy\r\n=X0xP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/DlQv1RXL9icFUrg5XXBrBJ+p5VTJJlUAUHPaAyFbLwIhAL5scnN9yX1JYBnE9Uuat4b65AJ525amxPaat9nAL4xr"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.6db58716.0_1629709714063_0.14165522234314176"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.9fb5bc35.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.9fb5bc35.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.9fb5bc35.0","@material/mwc-textfield":"0.23.0-canary.9fb5bc35.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"492fb41175c44033912a37c69d8362579b70d081","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/492fb41175c44033912a37c69d8362579b70d081/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/492fb41175c44033912a37c69d8362579b70d081/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/492fb41175c44033912a37c69d8362579b70d081/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/492fb41175c44033912a37c69d8362579b70d081/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/492fb41175c44033912a37c69d8362579b70d081/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/492fb41175c44033912a37c69d8362579b70d081/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.9fb5bc35.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-Ixs1hEqo+mOs6qTH5wabtOOJ9vgw+9itLLtxiec4QXuHJrp/xyEdnK/JS7lGHNNjZuiILoy1w64W+swk95Ii9w==","shasum":"e2e7677636a6c9ae05816322e514a53bbfda6774","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.9fb5bc35.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJCZNCRA9TVsSAnZWagAAk8kP/1VE/DNmqHJreEFNawV/\nm/UIsiBXgTrQZnNPgm+Foz5FBItMERrpq6XfZaQKUAz4lErXtVDFEzd9/RHd\ng89kZU24isldl/GY2Ui4bee6wJMipBPtlYA2aU5WKNwFZNNIWxV9cqoBmPn5\n2xFDeopr1Qjdhj+aU8wFwU0skxmP6pNRB7RMP4/S0bQhKcnZQk5Q+4JO2J/3\nsZVlbFZMUkY5Z73lXUaIlrGDoJoqvPWXzOI32j5cz+fUurMjm+2bSdiq66Z7\nLSk5FNsUhqou8XvsjsB03ktGEcbfLH87RFvPmLvCeJbp5A62i8I+i1y203eh\nArqm2I8WSsjJYKdxZHyvZ5ZEsh3BaTwOcV7nufa+z+Lswe7oNMAAjgZyVw07\nqhgwfQ1jz2m1vfw4yZFSMvKqKnnNnyZSsVLptagtVVPLlU0fYFE9z8dd0P7n\nFHpr4A6dup0rCnaYo3o2BwK6ceHDAo7Z1rxl0IawMJ6yp8ueqLrFhToaDeUV\na94EtJFeW+lmeFBtgeTV6lzRqIuLQXSVqHE7E4BNtXNmKNWEvAoPH+bcdEBj\nkr0PZSAzK04+2co2TsJagnJup4hkRtGanYAocIun+kOhRp1a91cvMnzk3ASd\nY36i5SDq9MYOanBlhWKOPXSkEScWyq9+CFKHHzuLKz5VOvY/cLe/Z47mp/rD\nEGu1\r\n=qAlk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRP59QZ+POCt+HX7IPokyeur/dH0t2u1sblCi451xe7AiAIGCVp2oVcJFplOrs7Wo5+93G5CdspKg/Cwto/I1aIEg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.9fb5bc35.0_1629759053380_0.9326687518216472"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.ddaa5d8e.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.ddaa5d8e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.ddaa5d8e.0","@material/mwc-textfield":"0.23.0-canary.ddaa5d8e.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b75a351219e35d414333913249ef19e87282526d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b75a351219e35d414333913249ef19e87282526d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b75a351219e35d414333913249ef19e87282526d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b75a351219e35d414333913249ef19e87282526d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b75a351219e35d414333913249ef19e87282526d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b75a351219e35d414333913249ef19e87282526d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b75a351219e35d414333913249ef19e87282526d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.ddaa5d8e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-J8i+tAsC5xmeGSrv5q7qZEOijcilJtzIjBiwU6YFZn4SDPfLwNfkW/4l9skHeb9QaYJcxj/Ai0ybyFCAos6/mQ==","shasum":"93f0bcbf874930352302461fe84da4a48bf24b6f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.ddaa5d8e.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJT9rCRA9TVsSAnZWagAASpEP/0KjCcA0VDd6DXj3/XRn\nspCuvzhGwZdhhoEBVSADmuc90COz3MqnGF11NKivSJ+avM/gC/4TWOsqLx7q\n2eOJ1wRhXfou0sO1idL0W2rJiQfD1vyTvu/qhXDVscihNLf3LTIsYs2YEna6\nEiC1T1yz1nC87wRrQcpNwgNc7Q39j9BmHLvQ+16DUAg4bAugC35iHGIVNNdB\niZsh2n3+UEI5oG3jfoDAamHqLmjTM76S7h3iljjncXF8yfawOYtyoJoUqsip\nZtwRciRS/nAV+G+JCAICasmEHLBksDRv218fmZ3f/bDqcQ5AI6YwroCSnczp\nG3XRh8VYuF8QfIVU35Jl4by+PaR+sERHFeMXuCs2okimwxXbxWqxf1y4FVfp\n7NL7YP/hVlCNMY5+f8vjJGo1LSPhc7lI5qhWmULiRL0q4BQvgnt8cVroNouZ\nj9fwaf+FfoJMUYPd8G/S1pHRiGSzIVMfzGUm5PsDSue2gxPv9XiclDFeZJxf\nlq/Gux1g4Q0NtbdXBx8dhuJAXGgBgD7GqNGgVxdkT3/Vne+kADLKvwgjX1TU\ncMsIhUCFt//lh4u/BsHhmC14MC7HTCmHXMgNHbZhWAjn4kBLTUzTuUhNJsoZ\n4v2Jjk8VzuOMKO4vx/VVeZxy6+KmPohhNKvIVkXtsdr4wJN7ZszzZtd7s7pD\nMEvO\r\n=5haw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0qA+dIftkUhAwwwWI+xc+3g2AMs4rOf2twmUCuTCOIgIgbSe/VOtbSrUodzzk0b1IJwxVHqPxElz8mzRYOywBO6g="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.ddaa5d8e.0_1629831019596_0.5760581745484445"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.756208fb.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.756208fb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.756208fb.0","@material/mwc-textfield":"0.23.0-canary.756208fb.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"f13e06c94f8ec287642a6c4a258c32f5be7a17e6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13e06c94f8ec287642a6c4a258c32f5be7a17e6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13e06c94f8ec287642a6c4a258c32f5be7a17e6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13e06c94f8ec287642a6c4a258c32f5be7a17e6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13e06c94f8ec287642a6c4a258c32f5be7a17e6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13e06c94f8ec287642a6c4a258c32f5be7a17e6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/f13e06c94f8ec287642a6c4a258c32f5be7a17e6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.756208fb.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-2M0zR0u0IewCq3vGF5u9JCpqqtkiXtrqYcqfaRk8/cCIJrnIKIQjB4KhFqIeDssp+dTW5cq2kvhwBMU8w6y+6w==","shasum":"09426091ed72486d079e52039577a344ee66dbc2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.756208fb.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJp8xCRA9TVsSAnZWagAA4t4P/igquqTFC35A4fEUmbMV\njj2O3w8rYQktsWobLfZLQIC+yk+WHchtwoBl/IGsLoM8Q1dQTN/lV+qtqh1U\nOMbz81FGTKUXZE/wLONh/pMP2405EnVqQ9szekwvfCxivFzISrvAFUnrDiLi\n4SrIeCE4wA2TijjQciX220suUwecAHwJP9v9Hubc5/+7pzHQmF3zyPc67yr5\nBGoseswKhgdf6ifAdKXFvgk5GlSFkkqK80Tr1osD7I8CFgk+kBmCtzxM8DLZ\ngPfejxqGfNCN2r78LCU2VM0z50lc6bpfMmlO2wOqmVa+VvueE+NRrwDZjEY0\n+3ea9D8fNWf4ToxK2SHIFZ/M4kSmCwiiHPDy3PvrJ/IDglRssaCA0SXV3K7d\nJ/wuXvMUHRdGAOfejx/Zh284JyNucGDIRFg6v+V+mqp4iPsQedvUo5vTwUJv\nvmohkyxENpNbNh80U/VnglzvfzHDLKTYBCHgYe5zcT3BBppy8D9bAqWG0jUA\ny7Vt2LjHjR/YN24ppnFdQ/qqUP8GIOod4GjCzD6tFrykDvwUEM/MRxOyRlgt\nx284M7nYKszhEj/lYFC7WZBO6Nj9BDi/kI22ejqZ8Z4bTYo/biKS74jHkxUX\nZQPQqAIJuRtPUngpC7xatkJEhOY9xdfuMJ0xDGAGAZ2EYamh5VQeN64FnbTr\nFBT2\r\n=BojI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFm7E5MfyIHuk4SfROwlY1oGrClHW1Glt89BaDqZRjRQIgHS/L7MiR7qFZILXODzbnisrtlX7MNkFhvBmrJUiVDM8="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.756208fb.0_1629921073285_0.8872906180378046"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.9576dcd9.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.9576dcd9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.9576dcd9.0","@material/mwc-textfield":"0.23.0-canary.9576dcd9.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0d9211bc7f0c9c96cb4dc480ff59ae633f722977","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d9211bc7f0c9c96cb4dc480ff59ae633f722977/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d9211bc7f0c9c96cb4dc480ff59ae633f722977/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d9211bc7f0c9c96cb4dc480ff59ae633f722977/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d9211bc7f0c9c96cb4dc480ff59ae633f722977/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d9211bc7f0c9c96cb4dc480ff59ae633f722977/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0d9211bc7f0c9c96cb4dc480ff59ae633f722977/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.9576dcd9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-6hlFZCyltrY0LNvEOjKD8cLjhRGgoj1MHyWaiQ1kJ7jcf0PtcKcy9KT9/zIsnD4dOdSw5NoT7Vxrxv5UVzB5Qg==","shasum":"d8b396007a2f5f23b402d4885dd6bef16f5655f0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.9576dcd9.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJrm6CRA9TVsSAnZWagAALzAQAIpb/h2LnmLvrLpRtTz/\n0ZPd+T/LP3shqq++vxIpxkLfO08qR1uuCpubBWRstnXtSS/Qv9moNIqNWMJJ\nflFB/1dHWanBD6LXRSBF2GfX641tC0Wa7VLhRTG8/Jj0s0S+QRP0Jr/vbEfd\ncES89+PizC+HJluK5/WDyrhoYTbelunveu/i3Fq5GbG08zDbN0Ip2fU0aCVN\njmZOR2ntQCKRek7BNvfdSCMAxztU0JPKwvBSN56Fqowh+atRGAbsaav7fgFa\nMZ2E3r/neZkRhf0BwDlIaa0H89WTbaLwq3SnkLnxPACsCLa5wm62gkBWzdLb\n47DKPuCjVqtmvWqlRmhrKgEP7C10zupLU3jg6cXXguqdzfB3VlcWUpVvv8V8\nySEtJvxRibZRA1GC/7y4UktFWsSR3gihZVbMHi421vAoyOPSAbig5YJb67FK\n3XkgGSIB1t96q93F8zWtWq4MVpLirPLmUp2I/Sd4huFWTK2q91rCOTUx5eXr\noOpAiicrwm6CxylzNdPSRBrzoM5nvM7SeA+DVU5+YLJYLaP++AUsnLGc8Qc7\nvwgnOq6PjO/HlJbt4NVaSu8i9oFXULB22i3N4LaM0ki6Xp1PpNVExnKBClta\nDEiYN1a0LMACAhqgIpw5xBs0408/XMKELxeYTWDRk5tdXR2blZ14ZjVp2TDh\nyEzm\r\n=Auio\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDzHp0TRkPrfE1TCm2DUdk61KopPOJDsl/NYf5CyAUmOAiAZK1S7aHBoa4rEgh0XXBFFpRAvKUv5wdDFOsdkKDBeCQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.9576dcd9.0_1629927866724_0.7354097383326295"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.7531cf97.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.7531cf97.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.7531cf97.0","@material/mwc-textfield":"0.23.0-canary.7531cf97.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1baa3308fe03250097e96c18c61446a8c8014706","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1baa3308fe03250097e96c18c61446a8c8014706/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1baa3308fe03250097e96c18c61446a8c8014706/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1baa3308fe03250097e96c18c61446a8c8014706/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1baa3308fe03250097e96c18c61446a8c8014706/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1baa3308fe03250097e96c18c61446a8c8014706/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1baa3308fe03250097e96c18c61446a8c8014706/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.7531cf97.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-kwXm6pKptjO3lSRLvhXr24H6auLxi2AbBJz+jSwmwC7A1YF8FlobO1zFstIzOETzIvNHrCBQA4MTQnFb3fm/xQ==","shasum":"2037362aa794aab25aa35245cbad22df0e98d6a4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.7531cf97.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ87TCRA9TVsSAnZWagAA2PwP/iQjhVq1n+Djmd5MHTi7\ny3/oFUqbXU7ohApfVi4Whx7n7vdpBGZiCQOlAwMoEGsmzHvHWnAkPp90+Q8u\nezOvFlfID2Hui2niu2XeEurwHc4NU8QZ4nmeh9tiEmYDAWL7sJ2ENbdc/8lF\nn+GlaqekeBDhEty0UFGpL54ks6M7fu0Mi9p3+rPqnugSCDhw7R4UF92RzHn8\nprVcIVurZPYKIuFSkWurMJQ0oNI3lIYf8Rp+TgrEEZjFZJwiMHMVAOqcdEVt\nLuixky3lmOozamG/DtEZoZU9a8oXjhRh8GSA/ev8no0huaf97kjoH5GrwzNK\nJCeNzoM4AZ7nyNMaGMEVOSXX99CPis712jvwCO8/9xblm81YRhTttc75hfNO\nBzzRJA8NW20U76I1RJx9PfcLlLALF2qAIr9F1Y8yTzHs1rfzOTQpEO23HA6+\nk8dBzSJO07FUX2O/rh0MhZB+1IGdbpTbFQjCd9rg8FJ/RDw/stVRJ4hqzH9W\nJMmIWDe15S+K5yxc5v3Rhhqgvy24vvmFrWWtB2HOvMo7c38X4cvlMAQEnbXX\nfVDaLnsuqzsJ1NCAunng0zKQuCDp4M8kPi9Js1qOtGRWN0xDaoAoOAdr90iW\nX2KSxobg3fy2tEbqIVknoJ75BlSw3Ru4d/VLsQ/mJ9l3axjPZhaiJ9kxeViE\nbPL0\r\n=p93Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcDTu/Pioe0fujTQwBnyF7wYSuwUHdwkSnkGL8UhEnkwIgeBXM/23Pbnjg5Q3fK0QzNVH7L3ZiP/sJFMtjz7O4IFo="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.7531cf97.0_1629998802796_0.884767948175845"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.3bab26b4.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.3bab26b4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.3bab26b4.0","@material/mwc-textfield":"0.23.0-canary.3bab26b4.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1637f7d8d3b8a228e1a957d94d122d9a840a63d1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1637f7d8d3b8a228e1a957d94d122d9a840a63d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1637f7d8d3b8a228e1a957d94d122d9a840a63d1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1637f7d8d3b8a228e1a957d94d122d9a840a63d1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1637f7d8d3b8a228e1a957d94d122d9a840a63d1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1637f7d8d3b8a228e1a957d94d122d9a840a63d1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1637f7d8d3b8a228e1a957d94d122d9a840a63d1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.3bab26b4.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-ufqWoyE86uEL8q3h51s9MPCCTm6DSwVuI8JCivxEHh9yrcXSwboR4IuAUe2Y4ntxw8GDz9P8sENkIQoukBLAFg==","shasum":"a97fb9e36e7345e1a8c36de97d609dba410bd5ca","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.3bab26b4.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKAtxCRA9TVsSAnZWagAASN0QAIOBSXFj6Wl7YOl+Iwlw\ntw9ct4D/uX529YEGhhT5vlgruYC9LKpCsOtw3vonjFw3oJQO63rdzBl+slnT\nmfM0/dalFxQB3J56NX/r1BfEjU89zY3q18kAqvZ3wO6QM++GEIjIYlIafzJe\nQxjlbWvUCxY+MPY9E34IDXIHaBGb1H5kyf5NxiJWHpv8meZdYzbmFIRRyrMN\n4yAkcdpQHuO0nHYK29K8JUomKmXKLlk92Ay+TvnK8ogvEvmwQysE3QBriaJz\n8a/kjXoBpTEX0ro0T82YIhE30n1mi1nyzfCMQybHTxweqHjc5R0IJlnCf0yN\ntYvZjOjal9bJ2sXGQ3Q00dhWdmJOn+aldbWK/Re2kgyxk4IIH2i2NcWlkOkT\n+CIeKJM+7q/u8fvWXHpJsc4/Oje8+NibIoJoIS6pCVM4UvqN4BTvmSREi8od\n77jap1HVancHBXafEsEEbKJ8TlWNwm7l0OJ3r1yYDjJ3qeEHTtnaRaR9B1zY\nUF6mi2sneahbicSuuyFxvzHZnlvp6pblk2Z9QJaUgxTaA7httPXkhkhuLyey\nj5UPNC4wKMKhpCb+w/w9CvKQn465bNDK+F6VHyhQ/MG6fP6LxDgnjLKvxhrq\norfeROxXWgrIKElpJnJlxkxKIL+SpxtBS/YHiCgN4cJaK2zOuIp/CRDoO7Bg\nZHYC\r\n=DmOV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyadz9QJUYCTPyBTzhYayIZZ4nUObUaZ+DLMpv5jC28gIgTQ97KtgyW+07tVIpMLa/z7xum5N23CWryRmrkx9ki5s="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.3bab26b4.0_1630014321304_0.3476553767546495"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.fab48bee.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.fab48bee.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.fab48bee.0","@material/mwc-textfield":"0.23.0-canary.fab48bee.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"4c3b20e414501a7103cbb2397163d4ed1c7d041a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c3b20e414501a7103cbb2397163d4ed1c7d041a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c3b20e414501a7103cbb2397163d4ed1c7d041a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c3b20e414501a7103cbb2397163d4ed1c7d041a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c3b20e414501a7103cbb2397163d4ed1c7d041a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c3b20e414501a7103cbb2397163d4ed1c7d041a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4c3b20e414501a7103cbb2397163d4ed1c7d041a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.fab48bee.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-p3awiy1zNnsRTGR8avzyHW5upZ0YzwsNckedgZckJ0Va3ks+AvOWobJTEVXZl+fFdV+i5Bxo7ku194PAKfXNyA==","shasum":"bbac18bffb34f18a23e01f6c9836e0f0a90c0e9e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.fab48bee.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKBDMCRA9TVsSAnZWagAA9foP/A6msXdIIHhS0oeqT5Lc\njmsiH8R6F5uiRyTp3LFBeGCgkstkMFWQEoRw4MXTcmIaUzp3o2juo3kNqVK7\no7T0i01jNKnPhehstgbxcj68FogRs/1y9LFfdoMeEnZnu5of/DqHT5FdoeUR\n5R4L3ejT1o6yE58HD00PHeSn2v/NNb7/cdXz4GJziEfvu7DLzBtJnVZ19ush\nE/CnjfTEsdg++pq/5ImCRZ+AQMy13gBj1edXMGjJeRDj1hDZcwfwTey02OW6\nQ+ElgxVwyhNLOzYy7Cy6gpjlSYyNWaeGjQ4893fxdsrESkqanqlQ+HPEVTZy\nxQQk5EssVRW8TZS06k2Gjn0D1Zc7GgT7CHvNl04Ad9ALz9/5+VU/jNeh1Ms6\nkiDdKZYz0/o+Wa9x2SKHZ5qv5nFGN5kbE2sWPgb7nSnvNh3kKaSkGTnQkxBV\npPpg3RqHv90MQaY87DP30PR86wG+aJWgdOjHGzsQQipP+11ei6RS266ykP5l\nv785H/QxWaSpujtbbJ9TuXMVMs81m+OsA3VMOcKnBAnHKSm9xXaI0BrYPJYG\npeXjYBQBNf5vuunDunr2OG0U3dSwnLhFwWPWWgIXfCUt++o+iw1qlWZ7LdwM\npcjR9b/IAtol/8ag9ILCF949ZJ3+CkQkujwQBB7kjlCGb66PJCEYuCQolA3Y\n6Rlx\r\n=P4bm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbyMyppQJngAIoOED7Io1zyCsoHL5DIdPVqhckIGx9iQIhAIpDdZ5+6//ZMgOEaU+QO9wQ9Ttwc6Cus7OrJHoo9NI9"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.fab48bee.0_1630015691910_0.5292397352985712"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.dec18df7.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.dec18df7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.dec18df7.0","@material/mwc-textfield":"0.23.0-canary.dec18df7.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5fa2a5aa7531af47c2a307010d92ff5fd27006c4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fa2a5aa7531af47c2a307010d92ff5fd27006c4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fa2a5aa7531af47c2a307010d92ff5fd27006c4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fa2a5aa7531af47c2a307010d92ff5fd27006c4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fa2a5aa7531af47c2a307010d92ff5fd27006c4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fa2a5aa7531af47c2a307010d92ff5fd27006c4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5fa2a5aa7531af47c2a307010d92ff5fd27006c4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.dec18df7.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-5q1eE7u9lo6/QyUHk3hRpC2KorJhERtwNbMTWLlxglinKPRCFAZdeS67cEILlEKW/vV3s3g5YB3/yxj+cc+35Q==","shasum":"2badbd9fee04b05117e8cca59cccb61ea9a13860","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.dec18df7.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLJbrCRA9TVsSAnZWagAAxaEQAIowM6P9sBVokNcjb8Bv\n+pTdGQLtjcz5ZuTGZBbrff9gegCRttHiGsbvkpG7MHEjJTmhnlbXMxZkTuH8\n5l+X8U/71no7JkUiM7Z6ZELmrgMO9EB5N35Vx9BWdhj0e0vID5GTdFPDb5wV\n0G8hJtD65HL9LKp5uMLyic4EzpMw1oAA2QDIs1XYxR1KSagCd7QsMJulIeVc\nziMStUG+2OUZmf1NWkbCzxsRn7iHwwU5liJkwlieEQgC9VgaMeGd5UxoXkoA\n3Gn1lUs16JR2c7A/fhxKw2oiWdVKJIk3WHxEsFFKKNTpAE1zXLgHFD0R2feL\nPZbf8p5Pm/7nPiAwaIfyEZeRca5Fhsl8A5/C2UBm/r5/VY2Ij9UcB/2DU4Hx\nxlj3V2EyjC1iktmFRgobdR5K1iCuUY68wqa2PuNlUDtsQyip5ZKg+TC6tUgp\n7cZQI2QP1NV1UXmLIx0n/F3hoJRH+7z3ptPOKfkWDgb6i+rsqiQzdQhMKb8t\n+i/yoA1Oa5avZpDoakyxSN3oOH8KTCaxIxNlp1T8OWaugn46hmTsj0FDThC0\nee6E+5gaQSd6AkPAHJFvLN8Wksby1h0Z8LeOjZndHXtdSLUBVBcUKqen8KTc\nGfN1tD2wr52Yzg1YtjSiVQUP7jJiKGCIcHavgQAkuECpc8zT0sAqwUyT8lUd\ncY+f\r\n=OSkZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDICOR/rYqlJFjZS/VfGyga06iACfppmUBDfj9jfk0WRAiAK0ktrNWANNgttFrJakELRMN1O1Cby6y+b6Iz46esDRg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.dec18df7.0_1630312171136_0.6949295542411287"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.61fe5b17.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.61fe5b17.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.61fe5b17.0","@material/mwc-textfield":"0.23.0-canary.61fe5b17.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8d712401a1af774c1e4dfbf07ceadfd36aaeb5ff/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.61fe5b17.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-1PazEN8B7Tj8NYgJO5siB4sOFg5LW/xjV6kxqYt1++Qrc1V8Q81Crp6U/HlQOCkGw5vknEvrtbDQF/Z7BKQkSg==","shasum":"75048090e4051aed154ace72f7b3f717ab9a9bcb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.61fe5b17.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLTGLCRA9TVsSAnZWagAAyC8QAKGru9rbZxyhZV873NtZ\nMczayTNFcvzWMSx2Iit3F2IacbiFUGY5t/lzLLXXlC69x3v5qD4tP4Hg667K\nUC5s/qpLZab1VeNGRz02fgtLWVWmpZ4t0uvJgIdRli1zzShaahKrPLx+Re+c\n2dtLfoFZWfUoRUaxuLVKyxI3D2e9jXfZFG1hcTkIC5AbNCLdJdBIwVmQDsUa\n4AUYqOhWHivOaYNuEFQ29NOzjFQafrYls/ErOtCg771hxzEuSZbF2QOkI6Yv\nI2tLceNaV2zOUHrd3dsGqQDC8dwZ3Sym9kjfPop2JHjbsQB5A9eyk+eyO9jc\nf7PDkV2e1BVmcvFcWdjcHTGXCXr/eq5av3DYtLKFd5sKbNXvOf/+MBUoVnye\nU7kfVV0QAYngIxqsu7VLsPp4/PAoJQY4O/Lezbdjw6ELcYcZ8oTX+RteqYVu\nO9eYI7ERkR5X2O3AFi0+cbAh6WuztxtuwJbEB9Czx/WSl4z9se3FCOaP7/cA\n1Ir+voz8OfLf4SilYBQAbit78RBDeTumi7a38BJ28TuoAvhzUzwn5L1NVBjm\ndgY/yksFQLGr5nQufBa/0w1L+sppOtBYqrYsq1nAmT+qs/8EPT02jaNX9rs8\nbgsfqGr7BmXZJ0rhbiw2ftm23FHvTVEnxX58LNEpufMLQ6V2awFcW5SB+Phx\nv4wc\r\n=7JqD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPuiTeZfYMNb3WBrUIwoc4xTwrzeqOMcRL1yF6TrUNhgIgSYi668MO3voLlHLPDCdmT4rip1r/6hnXoQUWRPc7tg4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.61fe5b17.0_1630351755376_0.518146030995634"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.a8c31f54.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.a8c31f54.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.a8c31f54.0","@material/mwc-textfield":"0.23.0-canary.a8c31f54.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7c390fe40361133076f70c076acba4dce24e84bb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c390fe40361133076f70c076acba4dce24e84bb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c390fe40361133076f70c076acba4dce24e84bb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c390fe40361133076f70c076acba4dce24e84bb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c390fe40361133076f70c076acba4dce24e84bb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c390fe40361133076f70c076acba4dce24e84bb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7c390fe40361133076f70c076acba4dce24e84bb/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.a8c31f54.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-xVyHVWyZ68sCJL5rqg+2ulwyJXEChDW2+PL2+aec3MBH+2TU6yuygvcW/advZ+W2JkeTE9G1cVbDish51f2NSg==","shasum":"cf9bdc517ca4fc1408ebdf5f7043ce27a236e633","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.a8c31f54.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLUBDCRA9TVsSAnZWagAAmC8P/3IGMWlwkMcV/R/u1iep\n28nRgN0O1UFy1ZlSJj/Abh+SKRLHENQrDhwD4+F5i4fAYUIbnsLWXNzCU71B\nG2L566mynMmxluuSCmCvj1lufBvFohoJknH6pxfW7xcHHbbYPH5Asz4qGl2P\njC9I0HX91FR34byDFJXR9eXEjI+x/um6mV5RJci6o0Kt5phTqCIsaIGmj5ar\npZgE0WqVvxovqzXmYarw81iQ+YaoN9oO4iwfspFiFOi6oGjGimda1e3+1v6g\n23/GECUvde9SdyZ+rHfv0cs7zx+8auuXr6I+hi6+myzCrW0LTnaR24zjujpf\nUn8wVQ7Z14inOL85vqxTWSOtQDujbHbFrgKgd6uYcpupXLNC75272+mieqd9\nSNusYSNRr4JDDncLZnakL+sZ5hZ4kOwEre2Mg9o/iLR/uOdXbGThFMK74XN9\nxGVL2SQmSOu7Ux8VYWEtiLU9M5gUYfTtvBr+cPyCALyWHBK4JV+WFVfTUzFu\nYoqtFjeUsgUmSPcVa9BPs130gSe5Zk5tcBm4He9uIoKusNk1Ut0FeP/5ejjM\npqsFVJEORbQnzmaFokiakorDxYPY/mcIaeToh98OlA/5GVwnmHXmPMgFoRTD\nDy4C62E8Lz8OyWUA3kHZG2Re2V2h+qVlXPdEgJiMl+T4iXrtQy8H8ocSojp5\n0pBC\r\n=DJzA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiaKkfpubE46laMfYrpPreVeA1b0TwFFdbMI+erPz2dAIgSPSAgslTOi84+f1x/lF2Nb/1beQtyXb5fO54swNvao4="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.a8c31f54.0_1630355523530_0.3564479610361171"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.a096dba8.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.a096dba8.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.a096dba8.0","@material/mwc-textfield":"0.23.0-canary.a096dba8.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0979a05922649d16cee4c4ef15ed0c3c3e9670a6","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0979a05922649d16cee4c4ef15ed0c3c3e9670a6/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0979a05922649d16cee4c4ef15ed0c3c3e9670a6/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0979a05922649d16cee4c4ef15ed0c3c3e9670a6/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0979a05922649d16cee4c4ef15ed0c3c3e9670a6/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0979a05922649d16cee4c4ef15ed0c3c3e9670a6/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0979a05922649d16cee4c4ef15ed0c3c3e9670a6/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.a096dba8.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-zG2yyaVxsljadbza88+BYvZMl5lT788QB8dxEgcBPFjWgkuH+PIkaGE1o5zQNX3dVON42hrFRHyyL/L/Oi1lkQ==","shasum":"aeeabb0b0c641afab6f00e1317c25e5b9816f4ee","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.a096dba8.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLqrvCRA9TVsSAnZWagAAFLIP/ivTR02PhZbBfHNjmv8v\nvAZfJyVFru1JLvQgCcIsOWnYEqO9wB9DzH6nrC+KC4PHcc3Z4z/veL0BWSFZ\n846ZOdR8XCNQZzbydyYWPdzVe38Kg4QYVuByWcQGtd+81BtTFV9G891hlgmH\nPeefg4ob7qow8pFA1/QXBVYsSsJ7j4yV8lmRl70Zj5Q+aTyqpnyEb5LK00WO\n8alc3+bD8MFRZDIGdjiDmcHFP7L+v4JyZ8Buz1VxABKEACVq07wMCZdB8dsm\nOAPTFXlOZCsWLJhQfzfMGgG+dcXCjmZHfGUjzyqy/XRFYyx7QQOggJJYfGxu\n80Kv4c3u2WXOTuyZDaoTx9DFPFdoGrEuLplkEqSS5KdFd5IDVRvvW16dsiHb\nW6TD0rHpbUWFCr8uxWupLc87aUgqPSCKAZQXfPmmJgbeepvYG0x8eygK8/YB\njO00eqlps6V12Aq1A3YJ1D44a2Da3nL5bQqi7EDggMODz88geHj4M6Uf/mmF\nJlbMlcVIP+g+OjUeJGbVe5ue2ApLCorA1l7jhH9PoTexMBSLBLyFnkKwX5fz\nvIpRg5fN/LVW4eiymwMe+ZDeGc14JAifmkbjdwz7LVJwCMLHPc+oacrseoI1\n/M+TconS9uRZNfIdurRa1aVMRva/kBM4I/3rHIq8vy/2cqcmWgV5CwNEQ3rq\nKq+T\r\n=SepF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9Bed0WHwQjb4LeJDWhqKOZVNMAH+97D19gdtRAuzXhwIhAOmyjR6x6D9isBco+X8wWZdcaLzq1ScyIFIaWW4Z0+u7"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.a096dba8.0_1630448367807_0.8477365689706766"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.7ec04d47.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.7ec04d47.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.7ec04d47.0","@material/mwc-textfield":"0.23.0-canary.7ec04d47.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"cc39e72f38b02c8cad467741a3eb549b35590ddf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc39e72f38b02c8cad467741a3eb549b35590ddf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc39e72f38b02c8cad467741a3eb549b35590ddf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc39e72f38b02c8cad467741a3eb549b35590ddf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc39e72f38b02c8cad467741a3eb549b35590ddf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc39e72f38b02c8cad467741a3eb549b35590ddf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cc39e72f38b02c8cad467741a3eb549b35590ddf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.7ec04d47.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-UpNwN0DFV576Lfy5W5EQrmNygjQRYA7SUYqJFq8vzt3RGYMd0sMiaCe62oErMkzzdPXKNYVWYsGxyqgTf573wA==","shasum":"86b80e6c3f1484a9d1a476379d8204c09ae99e7e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.7ec04d47.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMV2GCRA9TVsSAnZWagAACIgP/i7qDBwkaNTTNX0DD3Yn\nvyZpdAsUMR0OXxdkRAtFCrSC8csIr3Rj4UgG/dOe9C/TXaTwjBwxAi9oEaAM\nGhdYLUV1SQwEBetdBh/eEfQ9NXlCBoY041lkqP0ld8vVAk+0cEn5Up6K4tBb\nfdVacm6I8j9Y0Dl+ewOko+cNwp/rKFvQxqijblMd2NBpY3+rN8ORRiDurxU/\n+tcODWvHTNoV4avafgRY1JNSGzCr2tGRuCnaod7KGoF35VMzwneXGd8kiT0o\ng7fY13u1jBrq7kT4EA2opBpGolpEsrvuVVMb3KGH4OysH6miTjM45Lvc95FD\nuBfJod7YXmPLxaUTY1OjGtkofQ/B9Qritqw9f4img5styZGdnsi+Y6/JC+Ip\nrgWaJW4XK0l83cKgw3yCEcqoBH7klb465yknIUDu793e8UX5R29RPRGWsUu1\np1IazV23NsGeFEFmPy9ccIm3ntmoxspuAyr7ZjqWgQa/UjcVOx3Dq2RQuqkb\nMRVUPBizlegqwxMtOFvgQeRX4ulfznYEU7K2eEhVLY4RYt9aha4ABXtqlyzu\nu/pEGmjXjpYHei871OJDFLFGAKzY4Tu4wZxtMl5mNfMrkAZbRXsh8TSWIIzc\n3T8BYVDAAI6QC+E2/qkG2UGSrvXNzEGRcKEauJBk5FeV7aqKU5N/4xLBtWsu\nzS0T\r\n=8CMf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT/O1j4ei13fCyPOPBVs5OW4GP8meeu8B5IFzblKvdIQIgP1ksnzxsDSKhtWxTebbCGYKTysMWnu5xt5Zypcn/+wI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.7ec04d47.0_1630625157919_0.10548628463385956"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.d00b098d.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.d00b098d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.d00b098d.0","@material/mwc-textfield":"0.23.0-canary.d00b098d.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"918e9dc10ef626db369abf76acaf3266d5437d5a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/918e9dc10ef626db369abf76acaf3266d5437d5a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/918e9dc10ef626db369abf76acaf3266d5437d5a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/918e9dc10ef626db369abf76acaf3266d5437d5a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/918e9dc10ef626db369abf76acaf3266d5437d5a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/918e9dc10ef626db369abf76acaf3266d5437d5a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/918e9dc10ef626db369abf76acaf3266d5437d5a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.d00b098d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-QhUMSV3x910sPneRpFY/QDQDK+LoVRAPca4/WIUXCkTcWM3K0bKh1irFbrq7i7gcoJTj5ENgpyEoq7x7wIlqzQ==","shasum":"6bfe1c611efb53d8f06bbdd21a0ea1c7c70028fe","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.d00b098d.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMpMuCRA9TVsSAnZWagAAj0wP/RhJYtyzKncQV1TKy12J\njKAee7qitcfh/l/ofm2wb87YN4NfqESgDAwns7K/lylENoWg4WnyraHxATgt\n6PgpM6Plm2/yqvxdSPhoYAqGD2oPtoO71aT6/lKQ+jRnfI77W8IZeCPWrlwh\nRG2AUGM2s4dP32EtxuqY+d+X9QQCMR7SxsN4O7qtbzVZN1pDs0YbQRrXdupx\n6r3vvUTTJbyuweUaJtI5NmOrCgoh8h1Ii06ej0EXRKWJ8Z6GLDchPlPkvJIg\nqhiaPVlrDmz1PztNI7HhhwffaWDb3xsNLfbFnXYOPipXnr+4E/Q5oDRcY3Fe\n9iDW3OhQ7jUCfOkXRD5fbi3SVdGizd6r+PNbAhHTUkXl2hzSiiJ63wlseZgk\nmuV9Du05khzWgahNMeZrzdmEZKxI+SyK+cllvfy635avqP0zmp3YCJSue39P\nWSoAyBrQFHSTfzP2TtTXHArSYONDS2hqmIavOxbZCd/udya1pPw1f2Noe93r\nU6oRuXg4xruVceETynB2fGKJFJ9nbYzt4dmY7wBmr1uLvzcy7eGXYumHsQs5\nX67Q6+Ol5GDSubzcXdpgRTtDO9lmgrJP9/jA+dMHRpWXUT8ctg5eMfjSzO9s\nfRaNI0AskR/r0teg8pfNhktkPUit8H+FZ6dX6iQgEqWzobu4Pj5cWF0oyM3w\nCiUG\r\n=lV3G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBUD9f6wJGzP7gJUzGFWDxn1CANetVrkDPpJJSACN3pwIhAI4v+2n/iRjTTptg+bvABgXklt3JJVF9XAOREbs0EIb3"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.d00b098d.0_1630704430535_0.3164846684864733"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.f29b3352.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.f29b3352.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.f29b3352.0","@material/mwc-textfield":"0.23.0-canary.f29b3352.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ec2a4fddd95f3099eadde4522a67d49cee8d1515","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec2a4fddd95f3099eadde4522a67d49cee8d1515/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec2a4fddd95f3099eadde4522a67d49cee8d1515/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec2a4fddd95f3099eadde4522a67d49cee8d1515/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec2a4fddd95f3099eadde4522a67d49cee8d1515/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec2a4fddd95f3099eadde4522a67d49cee8d1515/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ec2a4fddd95f3099eadde4522a67d49cee8d1515/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.f29b3352.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-EzEcAOgsIU5BYaP0hauHlZf7E7GWgB225Gmbty2j0dEHm/L7qH4qo4tU81miezy8ZGShGdQEuHOUbyatBKmuzw==","shasum":"a057c2805444c131b39141248bbf064a19cc9967","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.f29b3352.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN6yICRA9TVsSAnZWagAA/E0P/iCYjqBPlhRFUOlPWWI8\n8/BvOEzuNM5JlUtEhx9fFgm24YXNkiNWoJWEw7NXcQwKf8htdjmnZDXrbhpz\nFlkSkdOnn8pjodP/7gXPMIrlvrSXuGbzYvzDPFKJ6rXZ09r1iRHeGrPfb079\nBajAbpSd/OmTkI2ZweU9SNDf9m2Ujz9gimuuVvzgnSWj6V8zLCtkrNxeLSr/\nA2OzAJKpwom8LvX+ra0AV+7fWpRRj5nts4llyFwLjFpH5lvQ3/7GiDvcTByf\nqwRwccUNIbE+RlyRScdfBkCb+zgDYQKV4KoXEUDaF+GhX0oSEoeolZHso1m5\ndwVStcLHPDbYpcBpBI183oyz/YBFvLVkSOPnOV2Kr52HGQTiBX3aeAKBsXt+\nANsgwCqrFYuSOXeE8aVknitEkZjtJeHt5jjlFj3HIkdBkZRv/VUR2FUROUvH\ns0mjl/4EYSdSkKX9hGQS/t20DBdByd4bJi5HHHRFTEAIqIgkJcGm6dV83AY/\nRICdlcgCsMxDiCyVeBGxCSJsmvgPWntExkQypp+6GfLfeCdS5f8cVzMAM5eK\nGnKqALlXHQ1uP4wiY1JRCci+dckSf68SzxD8seeI0Y0pvnhsQMirJQCz4RO8\n1fqN5dv1b9jxAiJD7EKnt57s9mSV+/u43qTlFy+WMBgz329e5aK2qrIy5/p+\nIRVI\r\n=HHWz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICaRelN9j9wXP6Pe2BhiZYLyh3isRxcBVa4KazsEsYrGAiANEscjRLPCe2hqAO414mhtRyGuXRJ3BmBojwEyzTRKcw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.f29b3352.0_1631038600572_0.07466085927479993"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.4962a163.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.4962a163.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.4962a163.0","@material/mwc-textfield":"0.23.0-canary.4962a163.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"4bf68ec0db23b3011a5a8c0777452925411e8552","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4bf68ec0db23b3011a5a8c0777452925411e8552/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4bf68ec0db23b3011a5a8c0777452925411e8552/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4bf68ec0db23b3011a5a8c0777452925411e8552/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4bf68ec0db23b3011a5a8c0777452925411e8552/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4bf68ec0db23b3011a5a8c0777452925411e8552/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4bf68ec0db23b3011a5a8c0777452925411e8552/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.4962a163.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-HsFP5EeLczVcOFyzKQCGH57g72VUW1ajG4WkSoWAQTYCSzVXypNS6yd+4WGdF6MJ3u+aRzxSV2hvS4m+hqeFtw==","shasum":"ce825e2ba1631cd5109a4dbd1608db96a2ce660d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.4962a163.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN/uQCRA9TVsSAnZWagAAmSYQAJP50yKf1ZDTh10u6nQK\nfQx+gFzdhmITYj+3qYYp5w89sz6EEzY8sd3ZRVOK08f19Rk3HKYorcLJMtfs\nXQyzyPRxdcFNZch3MZWIed75V6k7pOR9w5WonyifxRvhpBVCCvRKNWHPgtvH\nKrWlnIHiqHHD+bnBj4u4FRh2/9JWzB8NVJcTwbiSFHS0d6vRmdgsldyKIcGa\nGXEGNTzL9VOrD2Bs7adzvEmN/DIrtM17DYAShiGRcQGSnY2i7WyjLyJivt1R\nm4e7bAqRE3HNE5efzQI9TO7C/RzepSqAYOEh1wWp0zrMoNZg3V069cAvnFRb\nWqGCtdpy/XBODCeB1Q7OSmeIoWvi3DuC8uXP3RFagN+zBmZEKL+jZZUoSPeZ\nSsEcadM1dn5Uf0H5sJ3fEk0LMD0TbORMUNEx11siOCNQnrvOOzdacehRFCLF\nBeTPtTVbKX3CHOSJtfYn6nj/SZeI6bPTFq/1gZq0iTPmVRa5FjJQyCWyJU9K\n8uoIGZijCxRMBlqq4hymS9tApYqpQz8dXcr21EFv0L7VL2/4VanfTevHpmvj\n17Dp+i2TDQA/p+iLdH7LJZ+ho924DaIBf9rbHgjPr2mGJ/Zj3NdkZKzpHAcy\niqv18qsZCwTFnEfGRlun9NOBuKnexshvsXgSv9JoHcXErLdqiVfDUEVGjp/h\n8GUH\r\n=7sDg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0q7i9nVhRsyiVCO9Rz7zVJujjLzdM/P1YoQoQC3yk8AiB3XdsdmlVkVxX0Jv29XhwIC2Hu5lLpzJGw9+od6B2ZOg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.4962a163.0_1631058832438_0.5189811486855955"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.33102bf4.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.33102bf4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.33102bf4.0","@material/mwc-textfield":"0.23.0-canary.33102bf4.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"6445a1dc819d694a36e630269c7d407b8f021e98","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6445a1dc819d694a36e630269c7d407b8f021e98/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6445a1dc819d694a36e630269c7d407b8f021e98/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6445a1dc819d694a36e630269c7d407b8f021e98/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6445a1dc819d694a36e630269c7d407b8f021e98/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6445a1dc819d694a36e630269c7d407b8f021e98/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6445a1dc819d694a36e630269c7d407b8f021e98/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.33102bf4.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-8EZg/AZXepQpCNBxrpttykisrJDWTrzXHelXCygNdSys0vIirkM6dTPPhL4piF5NhiatZDeLt0J0WfPUWL33nA==","shasum":"d514d520d5eeb05331e5952da6ce2b59ef328808","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.33102bf4.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOABLCRA9TVsSAnZWagAA8jEP/jerqjxs01MUzBYsBPq+\n+hE5q9Vcldind9ttNsBXDgpdSpXF9rx7qwBeFY1wuQLEr3qO34m2or4IbeHS\nC6f6yuLcL8ncFVKRs32+4dTncUUUEYOOutFgVr2CFSWAB6X1r+7/RSH+eGq1\nUy5R1iDQ8l2NE1EAtv8CMROrgS0DMiDGxnPGVLz2oBOC5GaTz9JkOy80x7A0\n3P6pkqVZYE7mwxEEueEv++aIizusCJVYaLKm2MMDZRGojGrB2AtnF4Ez9U4c\nE8dN4TDqZv6rhlG5Cq9bZQGzmkAahZj+6B9ZJNDp+EnXn2mOV+QxuU4vNRRe\nf1K0jT10BVZbW+DVXyaOT7rrcDXn3xnDW1Zg+OVsm6mujXmTdxwqx5wkLKty\ncZuHwiuGr15Z7LT3newu9QU0ua3x4TaHHWckiPaWmbfzRCgmOz50VmRLbg9C\nFIwSHw+atJP11U8z2nRee/8cm/ZI6QIESYIX+IE2Ur+CG4calqI5URWAQMuZ\nPuDFsSObJ/aaR/Ki9LCK2+KafHduk9LPx5ZLGBjWTdewQAxy0L+Wi0hwfn87\nzY6+qRO7nax0KRcYO0Lmx1sR1G/8aSCBA6tSXkeY/+dFDsI8TbxXaZOrhmw5\npIyjbByDhp4iWQJbWQ9Rsytc1aG46y5+vB5ej2Ro7d2SFtFnN1qDRsYs/Etl\nqgpP\r\n=0Gau\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwvsr5bgsru6cT1YxDV4O9kg8FdFCzqvZXbK86RBr9DAiEA8WSyOuHxb5B7FjOYBCBcWrmvkXKc+PDtSqfpR+fXydk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.33102bf4.0_1631060043581_0.7285996026078962"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.76c68381.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.76c68381.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.76c68381.0","@material/mwc-textfield":"0.23.0-canary.76c68381.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"66455113b9aece74b59241859cfad64d4519568d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66455113b9aece74b59241859cfad64d4519568d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66455113b9aece74b59241859cfad64d4519568d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66455113b9aece74b59241859cfad64d4519568d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66455113b9aece74b59241859cfad64d4519568d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66455113b9aece74b59241859cfad64d4519568d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/66455113b9aece74b59241859cfad64d4519568d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.76c68381.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-4ebhGqiKtRCotg6R+UX/D50G/uNYrqk1OH0h6ZnIJL/vynfol63b+ahhoYXneIB4ljjRFvrzb+v+Qe2jYYO/Dw==","shasum":"d0aa5068b047ba7f67f5a8b72adf62137f7c0f56","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.76c68381.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhORmYCRA9TVsSAnZWagAAS1YP/AgiB0P9jB3c40ajuxvG\nuXa4FuvvMAlm9SfgQUNCnyuyjSn9TeKb4CbOJ6lpVFM1Sjf+gfHJPJPOPCna\nJ9Zwz5Dd/83/SjOEdT/nDWAqi2MKhU0sT9f2ccFOhVdEpTr7+PRlLCB+7Uci\nzCZsjAU2xnXC/lWCpSvL0Zmpednne95YHHtOKXtUkUeQL04/CBlbG1wlOTGn\nSZqN2ORG3kForUPhHF/mJUAE2T7wqAOtK3UqPrjKelSVi9822m7pHmoA4qe8\nKv+nvc+g2Z1bvMQT8SApNu1Jmot2IyqzYSqYnLRTbzEeBRlIa+TVVNera57r\n2AwMdlWR8JkBd/M17YXy3WzRHLqfW9KVKXCtTpK2Aej+cJ+aUyFSFGsS4gzA\nfdatjiqNABBNox+k7B3m0HF+1znjjhQ5XKgZBZIui4NS+sfaKUSX97clxudC\nzWkFdYA4kIfX0J8wbmdXBw37jCaFt2n0EMecru7+MbOAVaNoFraJvXv2dJll\nou0pJVmagRJ2CIbTQNOK3LMLIxVKNwo9SOiCx+EejYWIEabY6HXRpUlEJEaB\nZFonXJ7FPAqM6TUbmO1OiRm735oOmqFjIfwRl5Aas91+OnVXas8QtBtmT0rv\nBHxBDPAYo1mH+xtzNIBs6kKMT//EwmRVy90MTFjCIdydWL+I++xqAhJ7Rn7y\nQEYH\r\n=wF19\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAbfbQ9c5YNJHcRDQsvYDgQsZYojTYleRaKkiB2Ky/HQIgRrm5EWRTWXMsDv17NJmQgjzXl8nHwEOfYxKL79/zGUk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.76c68381.0_1631132056074_0.6244075605865991"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.17d51f76.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.17d51f76.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.17d51f76.0","@material/mwc-textfield":"0.23.0-canary.17d51f76.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"eac5c1fc9472a1c28736c4d8e0d423e195fe5723","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eac5c1fc9472a1c28736c4d8e0d423e195fe5723/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eac5c1fc9472a1c28736c4d8e0d423e195fe5723/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eac5c1fc9472a1c28736c4d8e0d423e195fe5723/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eac5c1fc9472a1c28736c4d8e0d423e195fe5723/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eac5c1fc9472a1c28736c4d8e0d423e195fe5723/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/eac5c1fc9472a1c28736c4d8e0d423e195fe5723/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.17d51f76.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-aiirF7LnNm3/Rlw015JIAKSbfeh6r5yJFV/rytDIJW5IzlX7hhJBJ2Ze1VuW4RPNxY5GnbvrAkkOKb+5rvjAaw==","shasum":"42e51be28cdc220daedc63237628e82ba2b73c07","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.17d51f76.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOUa5CRA9TVsSAnZWagAAqVEQAIpikYMyseV+dTRgqlk8\npY69OTnLNm4bJSceuDjqIHxgZdpQjt3F+K/pMAhrFbPS1QfhZjr3ZGFpAYX2\n1h3XE3qZQVggDALxX+ruxBFCyUGFc9wSHvuyHcdF+gOffSL96vd/46wNK+Bk\nvIKJhXGznABDX8ZVhxfmfr5LiVxr3/VZEdSbcXKireILZ9fTxPjfCMXLmZx5\nfTqfaTtUAiA40oVVotvRexLnMKk+s7DmuMKOw0Www7k07dDcyqyenFe0OWEy\n4g0ZicUoJt6tpAvE632debYRGWifi0Fry9xjbdPD7pRPdrMBUPLvtdBkkUUD\n7UHuB9Z32cYZilAeZMxBfXZjqg0vc3CJfbCUfWk4rjpHeQTa6cGYfMpxIm9a\nEj4n1R8KgY0Hc6rs7ChEnbipvolRHNkCKhAW+80QZlEn+AM9kvqOeeZq2+lG\n9VrjCzSVaAiiIa0+7gh6zu3gSu8BfA2GH1tqxH0hli9H2+JXcO34j58vj/rf\nj+M7ewR05wdEPSZfEZtjCVDhd7AdjAe3kwA0BZgISlqCIgfq+5qPFxGfCKpf\nRYVsVVbDDcKPjhvKL13svb9nQhtEk19XCYcXUstZFHLAcCgZBKlLqg1kPwel\n62liasiDYPrzLPV3InjxGW5gqqxIVAHnZMf7GUhQpLDU28UtWfEjx05yNYyK\nkDqx\r\n=b8HM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFY9bEqRJ107upbg8zcmbaALJygWciiA9qQ7zMjhrs6IAiBc7C7VIIWWKbxG/JOMFodHu9p1HEaR2IhV/KDyRDrkQw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.17d51f76.0_1631143609317_0.11038066615042719"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.3fae6c2d.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.3fae6c2d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.3fae6c2d.0","@material/mwc-textfield":"0.23.0-canary.3fae6c2d.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5647a60f5efcc7d6235a12c1bcf6c703db6d00a1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5647a60f5efcc7d6235a12c1bcf6c703db6d00a1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5647a60f5efcc7d6235a12c1bcf6c703db6d00a1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5647a60f5efcc7d6235a12c1bcf6c703db6d00a1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5647a60f5efcc7d6235a12c1bcf6c703db6d00a1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5647a60f5efcc7d6235a12c1bcf6c703db6d00a1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5647a60f5efcc7d6235a12c1bcf6c703db6d00a1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.3fae6c2d.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-VbuucSr29DCpInC3T5gu0CTAJTb5+YH56LhaEAq0Wcyvo6A3FbLkB5e9X8eIk2uQ5hY2YjUqj1Z2U/w9RKNpQg==","shasum":"72a78bc2080a5cf133e327441197a97b891da4fc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.3fae6c2d.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhO6T3CRA9TVsSAnZWagAAwAYP/3Rlh6009jNM3TOj9Szv\n17SlQ/M0fvQISyRBLyEKHFeE5yLyqkliT42YvY9tNLAoNVRtwoEcxuC+Eb9D\n70GIFZDXF5c8xk+XeTBcxpJPTiNScFeUwBVv80M3Rb6yycoRz8sRm82wcRwd\nTjx9AowA0DatsxtQHuHOYQwDwmjzd2X8G8QAWU7tpDdPJkQz/LOaBy/CWskU\n7uZk7LCPxj1lrcg95uI0rS0lAGfBYkmlSDiOncjiq9/24viU/1uyya+WIZUu\nKGcv6yncLX+xK6L/wp46jfloQY7p8tG0oY9W1hp5e0pkVE3CW+JjTeoNcSLL\nzSCw9PjP0E12UA30oH/J5OmVtuBkpE7jcBH2S+fNtlb20oV6gWrreEb1cSNx\nM5aXRRrzfgytvUAhkTUuE118AszoXDuS4n8+h3NxvxaDfk+GsXobdIEkXyzg\nh+YZVAXLPw2aEWlnz7q65E/c2Sfs/nCaQJ4uspiid/oXIEU5X6FlOWFwaEEs\n8KnHw4rt5uMarwrGWmP4eb4yfO5u+Epha6ybQPTnKJnwrOPxmH7Ib+3TB1N3\nZU46nwIo4bdIkrghmPcbswVP/Dwp7czD7xQIHy878Xav2hB3mDEqPiSN/1pb\napLgFHJBARJxunQw8kxySRChVlMVJQu+zqYCAifRd0tslxVYN6/cfYqutSI+\nqX96\r\n=w3aI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmyDvNREOTJTXUW7VZYIDIohC2sT7z/sfq3alFuJL7fgIhAJEWOyj497OX6oohMm668CD1lv9QdV7DmEYDwys/LtxS"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.3fae6c2d.0_1631298806847_0.9974583158932155"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.f1958c4b.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.f1958c4b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.f1958c4b.0","@material/mwc-textfield":"0.23.0-canary.f1958c4b.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/e5f5a818f48eaa5a69419b7c2ef2439b4d7fc5be/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.f1958c4b.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-gLKyy/G9WH5AgdyYAl/BBhp6AGOLdgx/PsAWpOTOkz8W9YRIQ9kpn08urN2371S3vpC3FiutEgn9iMMGQZ8P4w==","shasum":"0845af94a4b614155710c0343f231ec05de266f1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.f1958c4b.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP6SlCRA9TVsSAnZWagAAUl0QAKBGiHSaIM3G4WEne0mb\n03YZWoKJvx0q6W2zQ+xAA16sBbkqI3fi02N0JRcksUwHlF899zuQ/CksMEzk\nXgPh97Sr4zeMGQjtI59Q5LFHHr331NXRxbE7Kjk+B2s1GFDfaaD4AJdgO0x0\nh6k1gtloik7z3Uzr5hBA7/4GVOyOX6TCbvzmzmyAXc1IQKy3cJlMbWJGOIR4\ncECt2SReIknICt5LxFV8kIzYFBXTK2xO1kO9fs/wR4GP5M97429EtQNwP6ax\nvj9+0XqtVHHz7XBiL3PnuMXrnPwPtoFFmHK+9N5vce+tejymxcwv/hYUZO66\niFI4FS0Vzm2LKA3iaGCK8YigFfgXVc11afldFJuObeYdKYhEf6QPSQesYONK\nL2nM00L4RC1/LTugTYLqFzZncCT5oLKYVnTNymhlCjXwiYAaLhdGKIs6U1sG\nMI9ajWVPcM+4az01W+Q9f9sw99NhhLb2q/YCpBFQM2p9BZTWnbv80J4cifAU\neMwj0uV8fZ1hlmEETIkiEEUi1vlQOV/KjnBzyuemzegH3wBtzqh0SNoASwg6\nmwVFfUoM96ZpbAyLn80rs4BnGLd3EIK083fz5d67I7bIWtNFuRUVqnbJZ4ob\ntAS/8gnk3fsVKxPKCV2ZEhHdtooKRrYklp8IpW1hsUme/24O40dyJEnzar+g\niqyr\r\n=Rmr+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYbX8OFGuNVm5M5XLXbCD7+a1C1q2/+kl21eWZ1KeLIAiEA82uBHLQrXiykAQmlcGi5yOipoimMSybQk0G2HJv3acg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.f1958c4b.0_1631560869631_0.8105797558486196"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0-canary.78abbd59.0":{"name":"@material/mwc-textarea","version":"0.23.0-canary.78abbd59.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.23.0-canary.78abbd59.0","@material/mwc-textfield":"0.23.0-canary.78abbd59.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"638a51a3b3f96617a9be7f61f87afebe78d24a23","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/638a51a3b3f96617a9be7f61f87afebe78d24a23/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/638a51a3b3f96617a9be7f61f87afebe78d24a23/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/638a51a3b3f96617a9be7f61f87afebe78d24a23/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/638a51a3b3f96617a9be7f61f87afebe78d24a23/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/638a51a3b3f96617a9be7f61f87afebe78d24a23/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/638a51a3b3f96617a9be7f61f87afebe78d24a23/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0-canary.78abbd59.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-oN0iBVIUZL7I6XTvE87p3aPHO2LXsIx3a2jvw7pDWKOHQv7ITAbm7qUcKIDw7FWRTtHtV/Dg5ejIQ8/IL1EKGA==","shasum":"d7232465fb5c4b0cbe168f5967e5bb8cca8e2bf3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0-canary.78abbd59.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP8IaCRA9TVsSAnZWagAAHFIP/2K6WQ1irNOpSvOuTsmT\nAPRx9n1Ka7umEafQgTgY3bVt2KPRJq672GSSdCG9jRoAWTs+XdTMtBgnFoRo\n3gWrmf2qlAjeTWzJ2PoKyg01l2mdX0Fywe9xprh6RLbK+la5K3k1o0YpVgpP\n7xF5Np94zFwMjleFlrk+aDb1MjnpjXocgj9GOMRnClINdqYDiybXNzvtRMs8\nT2r356+HvMJCW/KdCzMjd4uzL800Df+8rs6emahyx6LqEl9ZrHLG345A0tqb\nc8wuCdo/SRCMBiUBFizIa6sVLDvyAVea2PoL9kv7VxxCdOI8CRu2wdY90xLQ\nPe8Khj0dh42xULqc7ZtK+PePeUYaD2CVvYZTIzVZWQZSvc5HLC39Ij3NmnlQ\nTIFbRBdKS3E8uPfqr4uR1hVCBj0csuYlnnOKNT0ZmZ+1eSjid66KDhOrQixN\n2ZaV88n/TYO7j8MmeIfJEJTzK5XSqaAw8UC9jFx81dYztN4kmuiojIU9VkQz\n2C0Hwqwdo09kDNHwtnaibIqdARmJ1RAblQkQzMduYOdc3U7mFefHjPKwAlR3\n7ff73rVSSuF8ry22zkTjLQPFmn+SxLiLOQvLshqYZbQ4/TpHFrTyZ8boPxlT\n9eB2GjR3slLpt9NTHYwKSoXVob6RP/WhOTYx/V0I/ijqqBfNXe5ziO0NxzBT\nBFHf\r\n=NT03\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYP/zXnTQMHBDBpAfGgVng37FMbr4rkOXZojcCsgj7cAiADW31HKaR+GrDXymsZ/cOHdJHVJyom4HDKqPdxJJJJoA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0-canary.78abbd59.0_1631568410185_0.44511411774217824"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.23.0":{"name":"@material/mwc-textarea","version":"0.23.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.23.0","@material/mwc-textfield":"^0.23.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9830d665867dbb440855339d9181b5c323202008","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.23.0","_nodeVersion":"15.10.0","_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","dist":{"integrity":"sha512-UbgHscnBKX/7PINS6MmWe3gsJW5lRHGgUWoopg5K51+Khw2/Pm39lRyGM55PpQYPGqI97foYGvUCvGGczesliw==","shasum":"095967650d58c835bae3eda8df73c86d2f18c406","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.23.0.tgz","fileCount":16,"unpackedSize":41151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP8Q6CRA9TVsSAnZWagAABqcP/0xC/YL+RrOolu9cMeuR\nTwNxBqjRz0qw+ys6g8jbJsaA2rb0a/HT7g7RUDx8GCGbluYKroEWlbMcR79H\n+ZD3XbbSBFOzu45vM4yHyT5T1TyM1FnJnDklfiLfPqdf3FiQ2atmuR4QZlAK\nJJW37v87bBepMTK7UD4Q/7S5ScF8IgUVMjIBn0lm6U1PRP86YrxMCP5qNSSP\nho+F2pmNopJvaEoH4jIoG0JG1YbEJ+XPRzPp/QnCm06uAPBriYywyKTZD4Lw\nMIt1B5UIRqbOfAG7F+t0eTZQABd7GAxKiNPSF7s6sWZYzVU7QU1rfYO0+R1u\nsF8x8AVXIyke+/XWCaNO/MdriGp4TEbbpZesO53EJlfOnyKFEYHXb2oQysVt\nQSDCok/efY6QK7XehZ8K6e2lwtYTzve0t9Ns7PuMvkbnzvAqH0+vzO7Dib73\nib8LaE56dmafOoXP6XRq4a66i6qF+JHEeDXzi9f7YdJy2eFnveFllyLdU6tU\nJUK79DG+oNxaixku93DVJsVuap5ubCmpf/1zMMDBpbDok6/qukrAmflRgiMO\n2875nFE9+pi9MxbvJgUCWzGaE70ko4Qo5/GrGStEz7yuk8hgPYyEXlXv8gHp\njfrsOEeGsuLdgDoA/HD9dJ8hL0+lhS9Jzdi1UTH2Ct+jj+vJsRAiytRNcVHT\nCJ4Y\r\n=UVft\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzEKqUVkeQvVNMSaw75xxq3SBfduCz66z+4fWIJThSLAIhAMPVwAYgFlc+3s2u/XqQYArUNZzG+9ITk75ZJEIB1XU3"}]},"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.23.0_1631568954488_0.8349929666995495"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.9830d665.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.9830d665.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.9830d665.0","@material/mwc-textfield":"0.24.0-canary.9830d665.0","lit-element":"^2.5.1","lit-html":"^1.4.1","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"964716e9985c1d08cbf280a6c7a4093be800c67d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/964716e9985c1d08cbf280a6c7a4093be800c67d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/964716e9985c1d08cbf280a6c7a4093be800c67d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/964716e9985c1d08cbf280a6c7a4093be800c67d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/964716e9985c1d08cbf280a6c7a4093be800c67d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/964716e9985c1d08cbf280a6c7a4093be800c67d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/964716e9985c1d08cbf280a6c7a4093be800c67d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.9830d665.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-p8X1Gxv6lnYS8bW8iVSvnzGrmj5Go7kHVHA/GSW3oBYJbOZd9ZyUkfFZe3dCA4XJFWUaJJH+4lv/OsSWk6J+qQ==","shasum":"c947ea67a0e9f075208ae38aa9459857b7827c65","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.9830d665.0.tgz","fileCount":13,"unpackedSize":39390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP8SdCRA9TVsSAnZWagAA4g8P/2Wj8/1wu7/E39DCuSxX\nktg0ibMBnPIFhKgs6kbyNC1YKYkULj7JbseVbJRGgg1LWN5RpBJymvIfKCer\nl8pdTbZLuCZLAjfriwitaiRCim2y3iUReG6PAZyHHOTA46twWDZJ3bPJUEDZ\nykOrkK0FAOEnVM5oeHVwqwTd+o7GIqJBSMDIX83Xl2IVd98RalAUWeePuMB1\nsFpy4UEr+ebbguUwdMhMN/fLyjRKu/MhUIJo7ToLF2q6HbYk/v/1VaKvjaz1\ncgCyKrCMTgqv5rBMQJzAFuoanwY61xsg20IWoErBgrmIdl9tvD4mv2pHn8sv\nFNciOYb/h9DpNpXxwogdvTOTC6F/Bt0K/s0OiJ3Tha4tlyV1O+bRD/AmGcfh\n+w9RkUCKnV8dRoTXDC+oJAzqVpBB6TWQBYef02fmZHe6Y/dOlTGzXoMxT2AZ\nOBDVJjJhVDWeV4D0/Fqokg7mKJDnrsbJZVwlDvg+ZCloiGDGouDLJozbjCQL\nvn1EoJVeZ7KO72Vx1vgyEpCDuasXQYWkBMVfPQwJFeN5ZdpAI4DMw4sGJgGs\nt3p8jfb+Xde+jEzn2xg/a5sdMPmpTNi17BQ5RSxv/PMQAWuXVCTbobQ1xMTp\nAkayw0hIhcKqMMbWuR7+y3ijnT3qxjHxODJr1Gor5E6tyfAQrqGLXxu+tBgy\nN3a0\r\n=ZWcs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKxdQxPoiirOGM/dko9TL3gpf4xUaNmsvv8plGbCVk9AiEAvWmhrF6UCXAYaXrvVfKgoEe0qxwzUwBC2vXUJacGc2c="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.9830d665.0_1631569053371_0.8513054358763941"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.20e2081c.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.20e2081c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.20e2081c.0","@material/mwc-textfield":"0.24.0-canary.20e2081c.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"4912005504dcbf47a4f5fee3ef7d4b37cfb48606","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4912005504dcbf47a4f5fee3ef7d4b37cfb48606/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4912005504dcbf47a4f5fee3ef7d4b37cfb48606/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4912005504dcbf47a4f5fee3ef7d4b37cfb48606/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4912005504dcbf47a4f5fee3ef7d4b37cfb48606/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4912005504dcbf47a4f5fee3ef7d4b37cfb48606/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/4912005504dcbf47a4f5fee3ef7d4b37cfb48606/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.20e2081c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-nbAGwICtCzgNPuRxrVhyN4EnuvHJLGj9wbHxJEKlQutpPOlMKmS2HlaO5EQDtm3d3QbGFu/klFUS44dBHvTkfw==","shasum":"5d3e11687567d7e7bca5723df24544e6cbe8d24d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.20e2081c.0.tgz","fileCount":13,"unpackedSize":39398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP9+XCRA9TVsSAnZWagAAa1YP/03dMIB5hTR4jl6B402H\nFqXTHU31aUUDNfCSembsHfR43kmEClUsVWaKivRaWMMS2FFJneREblsCmH3z\nOwhhCx13vjqPJ2+8hg2dRUm4AzBrCtXLjuPJEzIt/MTlF5OgF4PifyWPzFQI\nMTGv6WJ7WgVkYh2wAWlExi3Tp8BR7ZXPHNULZi+OIOKP5Pl5To2T9sBbYGZp\nJ+y7xhM1I+wa8hqDt6/64nH9OrkIC0TRQ838Yp2huPf2+cuimdV65P29i+MW\nthBm9naiFd/WcbbA41jZZJkoA4jYMS1WjqwfeEQVbHFJyupizLrCDR2LXRYN\nyobfV5QW+UjbmVWIisYnRL3W6m4tmitfjO/Y+Qb5ZbgD+vL/vkqjaZYVcVzI\n1u/Ke21ATmAty+zP4G+Te8aULUN4veGOfxNK84qyZTbLZHeq/TVPBFU9SWqF\nyW14xCsGULYzWuTY3Zs5orBS19IvgswSGhMIfl1tdWGfVN8oRcZdQeLjMAA2\nAdby5CEUBnmmuxGPS1mb8QSfYy42OU5QBwgN1SRusNqXubBST4T9APOuBmGL\n0pLhJH5Mb1KRk3DFWtVjon+yrtnaryUAU9bmavtbg/OJw2DGrBqWxSRboNHk\nG4o3yr3dKNb+SqTGPhqXJaJFOQQ78gY/V+aVJjoc2GOpr0SxUHohgE1Uon2h\n2nIV\r\n=be42\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDteqq9jJTX89G0k0vxnlkOi6d5tONQyrwnpCavmWZwoQIgKM1aO75GiTGxdd4bQGUQeOCZMbVRDLxY4OVdTjOu5AE="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.20e2081c.0_1631575959006_0.26931788031844506"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.583613a9.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.583613a9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.583613a9.0","@material/mwc-textfield":"0.24.0-canary.583613a9.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"6362ae780108c56957ae78e7b17d5a13a17b286a","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6362ae780108c56957ae78e7b17d5a13a17b286a/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6362ae780108c56957ae78e7b17d5a13a17b286a/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6362ae780108c56957ae78e7b17d5a13a17b286a/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6362ae780108c56957ae78e7b17d5a13a17b286a/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6362ae780108c56957ae78e7b17d5a13a17b286a/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6362ae780108c56957ae78e7b17d5a13a17b286a/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.583613a9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-rV20SgsRvZRvYm/e+bgBPqxSV507M7rXwQCNOqqhjLgdX5GC1bupgGB/7eLfUXpGNUDIe7WOtAt3jwHD9s3R0w==","shasum":"c9c79a7ad302ca28f18d853defb26863de030fcc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.583613a9.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQNQRCRA9TVsSAnZWagAAjXQP/20HfWsZYiy+KH3LoC4y\nln4S5P+2XKaGIUU1UHE/n/LcGl44wg8/MtNqTPmudBQuA8o8UA+XMWTz3mWH\nGUT7pl9v/UuVt9KXUSf0gzj5cCErTzjKS8JPN1ujthvzTvcjY+g0UBkG0AmY\ninHBG7X08lT07IwXb756KqAEUB7DbrYrcGlp/VgzR9NdK9U69J9+VFtlbQQI\ne6cDpsa2AI9FxvPl7qX0hhLGXl/djCkWGWSr5IY+h5J6cCnzNDy9njbqWWHD\n0gcQWbXSRisHSmgg5YKa4V4371Em/IoYD/lg9mbU9QaZHhTmP64TOTQdHZs0\nn+UsCrGbkokBpReI7zT58lNYpKT+HkUXWu6pQQleBqjXSxDBh/2JVA81pURx\nTLzix1UvgjbqtzPyHfPbubB89FVR94HGIDEGbwmD6ITHeLjcRhRKRLP8BdEv\nN2p3RwIBD5Pjuv/CPNF9Aa25meVorpr5EvBN/U7V73/i9sLu+zy5/PyO2mww\nQa8oSvbbEc6SsU9pX/EXgzdu0SaPXP2PWd3TrRElGApD6kW8m7w8gPlnSi/G\nHlC+2geOMsf7dC3clQrkDrQK6HgwVpWRX2enRGbyl+0041el8B9HvfyGAgdT\nAw8TXrKene3M/gDSmMiITA5zBp4WydngNMGBGRLt5Xo1BwWWYKCkDZ1hQetO\n1Jdu\r\n=agee\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHAwsls/3nKsYcy3AE0MvLTSRBfoEgtGAGQ8voKoUSCwAiEA2S9LmZQJ56iELM8QmKp9ysncWDUqLmBoyFOnSSx5/NQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.583613a9.0_1631638545294_0.5278406318083182"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.0e1bd56f.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.0e1bd56f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.0e1bd56f.0","@material/mwc-textfield":"0.24.0-canary.0e1bd56f.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0ac1a8621875726916642015e273dc177d29abc9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ac1a8621875726916642015e273dc177d29abc9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ac1a8621875726916642015e273dc177d29abc9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ac1a8621875726916642015e273dc177d29abc9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ac1a8621875726916642015e273dc177d29abc9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ac1a8621875726916642015e273dc177d29abc9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0ac1a8621875726916642015e273dc177d29abc9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.0e1bd56f.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-q8os/a3qElbTqrLkM2MaaJonWRppqgPmJ5ejHa3J8QI15y3iEDGZBMmp7fO4VgdY/yf9OURGybhg9twyqIW9CA==","shasum":"65dff9a7560f40f07f1169524dd0d62aaa6a11fd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.0e1bd56f.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQNzACRA9TVsSAnZWagAAzyUQAJHQhbc6Mw3dRSunN4lk\nSR1p94DZ7jHEeD4NLVS7qbpRcc9GeRTqrhuHe7BWFow9hQFLT31vsdbmt/Rh\nNoUNVJE3zEKWaYAxmdywnZqj3CYeWF8amToz5kT3H9k9YC3H/0I+r1inJwaW\n0er3ZpjU92C5aGVGcf6dXapx9w6b5eB1f9pxjAf0AbNyVajr44qfqxK9Yn9K\n39RYdORl/juSOVH5VAUSdMWrRWfy6yrpgLwpeJj7pqdi159kAG6e9Zug8UAU\nX3JlkJglxPsuW764BEcS1ZaNCrIXCBCXDvClEP3p5BeocFPadavh0LdmPBBY\n7PQMXSJWbz3BlhuNFTy4jRjaF0MVIQVPcOHsd9cowMAx5wzM5GzdOMQsybfA\n1SqC0E0WhZPl+w02UwBcrr+tU7+1elRYwenry4jTDbg8UXO1clmyqtKemsAZ\nzOSM7UzZLh2Z1Ss0xQKTdzIa7IoPQM2/+AuRP4oAp74ZpJn4wBaVvzq876k+\n8QIjBCi6PKebE4oEQBqZy7mWp7Tje/THZNrUGYETXnU8ie/o9A7xIKijWfay\nSY5dI4kFDBB9VCirRoj7LYp1ZWk9vJrmWB4F9SHyJVylnvOZ8XmMLFtr/rr9\n9WcvKpzvwwXz7hkFJ3DFIiu3OZD/6mSzeIwH/rSR1AMnVLo/gCJmLrZozUzr\nVBwQ\r\n=H6oJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCke+MEv9ONNxGGtUZi5eVIWs6T+E+pgQMvCqISOVt2ZgIhAOXuKcScT33LFo5G/ktMAfmAZ9/EVFErk1AnZIXhNRpJ"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.0e1bd56f.0_1631640767887_0.940828481035054"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.7bb1818e.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.7bb1818e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.7bb1818e.0","@material/mwc-textfield":"0.24.0-canary.7bb1818e.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b34bf652f1b82b80ec01a0ffcec5dbb2dc950485","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34bf652f1b82b80ec01a0ffcec5dbb2dc950485/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34bf652f1b82b80ec01a0ffcec5dbb2dc950485/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34bf652f1b82b80ec01a0ffcec5dbb2dc950485/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34bf652f1b82b80ec01a0ffcec5dbb2dc950485/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34bf652f1b82b80ec01a0ffcec5dbb2dc950485/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b34bf652f1b82b80ec01a0ffcec5dbb2dc950485/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.7bb1818e.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-o5O4FYE15LSZECgV5HVl4uY46O/nGc+XCfi/yF5JbaR1T6fRdkTxvalk73NBDRkySFIxbXrjf4VBexhbwbhFxQ==","shasum":"a128390cfc01de7ba7c021ce0302d36ed7d4d145","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.7bb1818e.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQUAGCRA9TVsSAnZWagAAnkMQAInXdgyONZwNdA5Yc+aN\nVym2yp/Bc1T9wv9/WO0sbDu/kIHmxiI7LYtFrzDh5Hg1BFdf+lA+x3bwJp56\nmjaTyF9dHsKOK3AnvyS0YBjL9W2gIKDq39WYPziPzGz9FB0mayK89fo+tN9H\nd0dmAjYDAUNoU48Aa+WBs+W2D89zqVU5TjTffR4WRpz9C2wtxy+6qaGpfgdK\n8beeQhsILMEZDcDTIXBZ0zCsbwXuojCrJ3n3G3sgcTsmkr2C4xfJWNlnsHYw\nVApEc/gdWvWS83Dx552AOcsudMjx39dvmx7+oLKW8dvf8dGF/APX5Izb9VKL\nD31cVPHlJ/lA2xRvcOSJPF/V7gXsbeRUYIFMaaFpcFVNso+XCl62l4rvbzKv\nDL0LlPtx+1TgGuDx2r+NbfHiM8Q7Ry+RKW1CDiuUVHya0+YK4vbzcrQZkJF0\nmTkJs+K+AgJ3KOrzogO6ibRmfRBk3i5j5WI8oLMFmRFujQET+jRHAuc3tIRn\nVifyW/QpqSgR4LbKWOZwTI8dJQghVfxzbVGrDs+teyr9gEJMtm4gNcYTcXYp\nTv1u78n1i+J/zqp6NhdCMwogV/qEdlpxzE2XxhGt03WRS6Mhkor0aVlMkUQZ\nXG4con4Hag88zpdbnGIX7oc9Bh4LsJGeFjOTSUApdYhxmWarJlCGRbNnDzZn\ne9dO\r\n=YcXo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCc/ONSVs4ydNQE13Z9riaUd3UwCxNptwsRa030LlfCWAIhAKFz78iPb5fWki6iaR4Mwl2ulHfwaq+dMJ26LwaV171R"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.7bb1818e.0_1631666181706_0.3243182704027221"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.b5e665a9.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.b5e665a9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.b5e665a9.0","@material/mwc-textfield":"0.24.0-canary.b5e665a9.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1098b7010fbefe404afd06dfc30b7b30db59b092","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1098b7010fbefe404afd06dfc30b7b30db59b092/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1098b7010fbefe404afd06dfc30b7b30db59b092/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1098b7010fbefe404afd06dfc30b7b30db59b092/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1098b7010fbefe404afd06dfc30b7b30db59b092/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1098b7010fbefe404afd06dfc30b7b30db59b092/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/1098b7010fbefe404afd06dfc30b7b30db59b092/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.b5e665a9.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-yTvv+caOJo7U7toXHKAG4hHbUix0iPRjAe28URaN8hOoaQaQ4HT8Bb4dz8MzbQv+NH5pyEwlcpsO+Ipd9nGysw==","shasum":"3813a64c7187c2f8ddb52127196fc173442587f0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.b5e665a9.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQjfVCRA9TVsSAnZWagAAJ5EQAIa0wlOvcmloPNtXqot/\ngJL0RzhsRPnUZPPVtjNH1FOrM2PVhCYvZttpTP+RZpRtwGUHUQTXcV+jvfmA\nPPwdwxGQslbPaYTjmcEwctedSZGMqhfwRj2OzLsXDt3L7dN9mfGCHVNVLFRP\njT6AN4hBlgZkNVaNVG4cufkrymAq7rKSJKi6S9DJFZcjsLmP9g383qaOIuKj\n9QCMhHiXFTfPyMgNFALiSJ/1CJUHchFWRIP8vEP/oNaxdsq4wRvlXi89jppI\nQZg+xarnGvQsOA3kk37xHmnDyV85n7h7HLzDMdyaiSg1Y/YLh806nf2ONB0/\ntiCTcCORXtYVy3L/wnH5EPatHOYk6wAd2/vzyOM4PgxJraBZxkqsRzy+TZ/n\n/kDAkJ7ajz61MXfz5vLhoRCWgQSjQcNAq1hjFQqYkZhH35XjUodDbm7yAN2h\n7eGYjq93Cv5dcgpbbntF0mEA2DxQeGB32mP18MG1xysuOAQpFcDfgCddGetJ\nBSwp91TOIfPxH2X2Gzd/Z4qSYGXgesbV/9jre5dWNieusthjoZOrF+YlKV8M\nVFZcg2ceK+ACA/NTVNgJe4FYIu19P2+gjWAEY4nAkz/6YsShdk0dCi3HpEEe\nFWkM7C/Cvc/eCNDWPRgqyLepQBdHWUZ13t1K78RfRQbCPmCEF4ScYRcw3zJM\nB+eK\r\n=afCX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDj2hufIO+op6+P87Emt8uo55girgnYMFWPqsnr6uNHLAiEA4ILtz15DMjYax7P7efKPKw1NDai29zJHnTkGyzbU0pk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.b5e665a9.0_1631729621125_0.014824358534508031"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.ab1e177c.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.ab1e177c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.ab1e177c.0","@material/mwc-textfield":"0.24.0-canary.ab1e177c.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"afc26bf1f2c64cbe713e03a55993e7844eac59b4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/afc26bf1f2c64cbe713e03a55993e7844eac59b4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/afc26bf1f2c64cbe713e03a55993e7844eac59b4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/afc26bf1f2c64cbe713e03a55993e7844eac59b4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/afc26bf1f2c64cbe713e03a55993e7844eac59b4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/afc26bf1f2c64cbe713e03a55993e7844eac59b4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/afc26bf1f2c64cbe713e03a55993e7844eac59b4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.ab1e177c.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-CvmuNYdJrfklWYlX6k4MN0ybwzWyOz5KsPAVof1DA9RkBMVRKyrgt6q63VjZxlAOKD+tP/qMsP2GU1d9IyPS8w==","shasum":"d2b05ee71d3ff2e6a67a616cf32ab3e54de87e15","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.ab1e177c.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQj9BCRA9TVsSAnZWagAAb44P/jzeeLlADspHgcLlcUFH\nY3gWRlkwGfcUrr6iY7pQP8qS5GKEix06axXC8MreiLEe80SiGRtnvPYiMzli\nY1SHHCEUTpDRlQCZs7d+kV4h78258v4L53og7OPYH541yX6hhGvBY0+5TjJe\nR89ShC6nd40rdShkT7q4PK06qm3vDN3sRvi9IDqfavWHwNySqTSieYg6MK6W\nx8UPsmR1Zfxz6oSC1CJEP1nE0jd/GZ2ZCurnj6bRvK/i0v44IkzdD1gm0W9b\nds3YA1pNAFFy32s6sZvFYNlEUVr4aITaWgFzG4YmFl13TwbE1tXmkO5Y1iU4\nOs1YHjgCrX/+QCB1RFTv6BOBI04xUG9wfn0dbPSKqHz471MWqYY7yh0P6kCG\nxVWqMpd0Vb83U2hu45wQ2778r7UfDHh1JTC+5a3k98L4VdlJjGX3szLH0I8o\ndqpCLzxOQ/JgMVjkswO0X/9jB91zZbDbLzbtaQv+3ubffQ/9TGmjjAbxmo8q\n/ngxgwd0xn2i4mV0wEvJW64Ht4j8j1hCCdv/I/7AXy0kzoZRKL6Ut8RW3zdJ\nHiBFTZnQ2cOWEOEYBjf7XMlJ1koT9JBoajYgHEJFQupPe9Tk9i/NH3pqUXrN\nPUBEuHs9NBeW43X+C/jFRKPLToNkPSR8OftnyzPh8VOMa3N59tT4ixrExnVi\nR00d\r\n=C2n3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDipA5zLuKCWGaxQL5cBqfrBO9XQKuZrPkitKQqHY8TgAiBCVdPhAShpMvZRU73nk47xMvsXxrUYuIBAalI5X9u38w=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.ab1e177c.0_1631731521359_0.13277014826334854"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.8dff8894.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.8dff8894.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.8dff8894.0","@material/mwc-textfield":"0.24.0-canary.8dff8894.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"bb2f0724a85956f5a92c61a18390b4616e0ce836","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2f0724a85956f5a92c61a18390b4616e0ce836/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2f0724a85956f5a92c61a18390b4616e0ce836/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2f0724a85956f5a92c61a18390b4616e0ce836/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2f0724a85956f5a92c61a18390b4616e0ce836/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2f0724a85956f5a92c61a18390b4616e0ce836/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/bb2f0724a85956f5a92c61a18390b4616e0ce836/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.8dff8894.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-AXYhj+liS4akk7yU45oruQdPrLVnHMJ458ZcE+PTuSFlCQ4yw8aei8b4bX/MR5fTSpqw8KC7fsmfjzaxO664Xw==","shasum":"5f67d159cd4a63b60156b0ff9efe015635ec8c6d","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.8dff8894.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQkTPCRA9TVsSAnZWagAAdiAP/3BzcW88EZc5VKmk7nIi\n/M68quygeRcbF4VB7CtvsysErHIwrnYSM2mpAa/kk+fg0FB2DHwrfIqWsXDa\nfn3XK3jOlwQORS+IJwJQuzfcKpv8388Zi3tPZbFcPP/YIDK5UytbBnJzKdil\nTlE0YBaqwS36usA8jeIv9yr0m2p9aGFAmugjGhR6PmWVmc9cn7sKhtLs6URk\n8PoM0gqISuEK9OtB4eAH4Vn4Eb0p4gb1ZqrFW0recAlPg4V5hB2kqZpYCeKk\nf7MiP64Lpv7hVZ6goLnZ5bBFw1eJKTSQiOkyjpWOZUxo9JX5JM0cb/uF8jOg\ntYOMBpMTbq9KMZC4CgUNUiokLy6aftd1g214UfXTjUg0m7/C1YaD9hXaIZro\nmoEXccAy8NVjP/Dk2in+HdMjG8fQrLt4sfS6PBwQ6JQaXDDdzaBgNHAYYKKC\n7mvg2oUVrUxfecqhS9OsvY7GGMionq1N8IZn4lCI/seyYKyXkLeA6776pUXm\nPHN87XyBpWWA1klTL4q0hwjQq3F3DXAn96Y8OIsupxtcFymg7piwbnSeyDRY\nulcFBmq560V8TIvOyPjoJDM3ohAeifAQ3E/S0JuYFNKHLNLYsbM2oO/ytDuJ\n4QfmbXSbQ5uHdIrsfzqJc06zQMEr1ZrWpnR3HHTnyfhA/g6bttYSMk5PPDqU\nOtPh\r\n=KCxx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoh7PXmqNQzJPfnECbWbaCRQoEfvIjHeHln+1roDDUfAiEAtBtiqe6axGEAWvUcskDqIBkjLz2jdRPesjsfNTeJRO0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.8dff8894.0_1631732943493_0.34112487021135585"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.9cd7e927.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.9cd7e927.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.9cd7e927.0","@material/mwc-textfield":"0.24.0-canary.9cd7e927.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"cdc8741747c55134790f2334cd48c000ef607804","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdc8741747c55134790f2334cd48c000ef607804/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdc8741747c55134790f2334cd48c000ef607804/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdc8741747c55134790f2334cd48c000ef607804/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdc8741747c55134790f2334cd48c000ef607804/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdc8741747c55134790f2334cd48c000ef607804/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cdc8741747c55134790f2334cd48c000ef607804/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.9cd7e927.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-urY2jQVdZZttKLeA8fK9A0B/SZ+DtgXLcTnX/I6DKb3Udt14xQxC3JQRhSn6wArpvqphO44cyY4l79DR3Cu3pA==","shasum":"813e4e4f0a6e169485f8f1c10fe2c68b3c461cba","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.9cd7e927.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQlhsCRA9TVsSAnZWagAAtHUQAJ90TN54heiohx4wGbTE\ns3fKIri+XNLahOmFqKr+aFsGM2sVtf6/2HidPJGHMDM5RZBQtpmEl66uZlhk\nWVnz0FnSwnK3O/m+NOyQTNpF6eLyUGChzqZ6Lygn2GCJN4MKCaqv9TD31mVc\nuMaKVvsTJlZpZGeDXXt330Fykq8FIYwNeMkM1EAwBhDW6gmF19/NVgN7fvhF\nu1VF2DHnpZhdvO77NIDhRJ3br+mSvEUuXR0pDn8JQrsTa5n9mwgqvDRRcqSx\n5zg0hHxODw/ZlE0oTx9vn6jEQgE5nY6XzZ59LN05u0b9rDEEm3Dnymwf+oa4\nOKnu1iCJLHcVtN+2WYTj59jazoV0h950EWNKc/Hv+FJsi7vhtgUwWzkFnL5i\n5cIIsQX3d9SCJ4SHYqB57wNxM618V7K2f8na6FwfNVPfgD8RcFSbiXiBMFgz\npywhljDXOy/vMs2cMDFGvw32VEv8yAnnWuPrGts/gKfJW97b2/VgMiciElBX\n+QyYMQAjP1EP7aiTlR9Y7HADHHv6sdlnPPqPK9jwE2vqlKLIqBQulAuo98dZ\n0qJtCdwrzrHXnXsuKlt0EnnwDWWONGdRbKvvX6yhWkIlSRcPZq9H8Sk4jeu+\ndoOsXQmYe2ACdQ3ENa0HY7of+DYknZAKa/bVJMFgPuK9U8KV2HyEVHd1z2Lq\nZLOS\r\n=Okfn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj32UiKtAsQSdlmX8LC0Ne9JfVyHs9YZikFLrIAziQ9gIgfW7cruedacwincXXvxFmm4NspxVso1LuNCOzJ89YAVg="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.9cd7e927.0_1631737964464_0.4031892933348482"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.a7132082.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.a7132082.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.a7132082.0","@material/mwc-textfield":"0.24.0-canary.a7132082.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"efa498c7c84be94afa4d7c50d5bc525723212e88","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efa498c7c84be94afa4d7c50d5bc525723212e88/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efa498c7c84be94afa4d7c50d5bc525723212e88/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efa498c7c84be94afa4d7c50d5bc525723212e88/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efa498c7c84be94afa4d7c50d5bc525723212e88/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efa498c7c84be94afa4d7c50d5bc525723212e88/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/efa498c7c84be94afa4d7c50d5bc525723212e88/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.a7132082.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-6jzf8wuvHUVOJIXtWXhcEnp+Kmt/pMAH6Cr/xeG9+H8QoUpfDYrXLSioxW0Nu8uH7qxJNkGgDWLPI32I0mBfrQ==","shasum":"eea4d33f5250ef06de3312de9c1b6773c5b7035b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.a7132082.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQmmjCRA9TVsSAnZWagAAFdkP/AgvedBrxnfJF+cKyx6y\nWq4cTtwZkS6pwoTrzSdB1ZehNTZwSdRosFvrdIh0SzcM4KOkCWZPr55vzx4m\nU0c0Gqx4IV/83hHK5wHHVPJkchmIpbdM7LQYS7fHjpwM912vSv51KTEl7R6E\nbXoKskJXHxlz4IAG2RL7LGmSa5bmHxOuIZ9qvgaBxb+bEKOLAy10mFeBQ8jY\nOFJUrHfQ+07Fx5R6k14u8KjErztm6kITaPfjzCN5fY+L084Cbw0K6fpcvXkD\nmK5S5dp345zIgb6WaZotDNUn80n6d0C+6yjewejgcPyFV4K4GIYNBNdZYXSu\nzkKwvJxmDHc7JYulNFVzX5CeQrj8DMLuqREDrfZoRKddGiuklPGqWe4npQ7m\nWz+GdEmZwOMuiaJKmBIyPXipjAu5ql5ajxPB1EAL0UbRgZ0kYdCOLcDSWRjy\n1IVAW4JKTieBqHhn+7lqlB/AxFVMqF1ARFWFTwM35oudFNUwCb9kGcQevQ5/\nfzOlVJfa3J9CtNbcXtDBHz7EEGKDhtNIkRfc8Rl76kiNbdFn1RWUDqCv3F7O\nh2M5PtY4ckhRP2vEQVU+2VzBR4EyAeBSE5FeDBV+B5xqxlluT2hOZ6DUmiac\nBeueJj5qJ8dkSIBhyXq7YUBMhuqK8NeJ42H/ZKJVdtHdRMV3JOZPrrnnMq9k\nPKnw\r\n=mLA9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5XwVsz3MY2ybZCZYGNYxONKCkn8ssEvELk2BE5og1NAiEAxukk4mhEdcNzNWvHpduw8cqlGDUh2Sq80WJom+XkAwU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.a7132082.0_1631742371122_0.7814503331744944"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.cd9110cd.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.cd9110cd.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.cd9110cd.0","@material/mwc-textfield":"0.24.0-canary.cd9110cd.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"fe7dab0d93d6598d6a6c08de182cb7e3245f26b4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe7dab0d93d6598d6a6c08de182cb7e3245f26b4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe7dab0d93d6598d6a6c08de182cb7e3245f26b4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe7dab0d93d6598d6a6c08de182cb7e3245f26b4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe7dab0d93d6598d6a6c08de182cb7e3245f26b4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe7dab0d93d6598d6a6c08de182cb7e3245f26b4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/fe7dab0d93d6598d6a6c08de182cb7e3245f26b4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.cd9110cd.0","_nodeVersion":"10.24.1","_npmVersion":"lerna/3.22.1/node@v10.24.1+x64 (linux)","dist":{"integrity":"sha512-W2X2TD4TyxQyjHGDdbuH7zMcpR/vLJ8Q0sEWNDKtI3z0ltHqWPwclUdezDP7W2t1U6X3HwRHaD1zsCIJwcgfcQ==","shasum":"d65c05679c2e261ebc25cb69943507c92cbc8cef","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.cd9110cd.0.tgz","fileCount":13,"unpackedSize":39416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQ4LcCRA9TVsSAnZWagAAbfcQAKDBS3LKNxAQ5Lsd/WVP\nZI5jLKu8z+vYk370TNQYo9yXj8T7IaJdnBaq4CzyOHop5fS54FnS2LXnMhtq\n086SOs96vV/EUHOP07MWdg8fxu/dhTGvzaS0SU/HtgoXNB+BuQMpWCRKnSJc\ngcfIiYnSyJph/XwuyOsSh7sWAPdtXHsQ0HQQL6JOeJ5KP6KuU3fjFNVtSEbQ\nKWu4PzakgdlQ2n9Sds+CoPaL6XUIWfCWOWFrUb38I+vjg0wdSl1FHM9fdIkL\nyZOa1DPbPYC53Om7OkDd1DIk1N/4N36MbafJZyrlT3A6iO/+Urt/EGkNVqac\n/nBxI+GIjWjWu2fqMjFt39ZaFCfdsbmYRI7zrGuzyRhw8Rf7UJpGEtOw2eZV\nBbhg7Rhn7bDqWFqwLC313DzpuXXHG5jIFl1TgM+x8i0VK/p5in+RLBzZ813Y\ndV4BaNsgLdB5Zn4LvlQqgaxdnJ9WmN6MCIBRfFwy/Qnzz96ZnGoFuhR55c5O\npVP1jwYD8C0BabD0Dij2Vzs5x3Kzv5MaJ8q8j0Ce6DvNuroawYJqOIpaSA3h\nQvQ/btg+J9Jniv9ojLa+9gYeXpfQ3u1qoKiHTXTL9D8u+t7sCXxcXFK2FD1J\nUhGfg2YbrzhlnPr65QJB8X/SjPmWmybBn3rEDSaxbM2N2VtyVybvrX7u84OS\nrkdQ\r\n=VLt4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCi5A/Uq2YZIj9qExIHahOZSLgTuftUSa0KjOe9iJYoKgIhAO0OUIOyP0Ian0LWvSNCGRjvGLkRbgmgj012bMdEXfbk"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.cd9110cd.0_1631814364327_0.9772105244862612"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.1e5a9883.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.1e5a9883.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.1e5a9883.0","@material/mwc-textfield":"0.24.0-canary.1e5a9883.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5b1cd8120da2d6449203e71bb01079f709aa19bd","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b1cd8120da2d6449203e71bb01079f709aa19bd/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b1cd8120da2d6449203e71bb01079f709aa19bd/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b1cd8120da2d6449203e71bb01079f709aa19bd/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b1cd8120da2d6449203e71bb01079f709aa19bd/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b1cd8120da2d6449203e71bb01079f709aa19bd/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5b1cd8120da2d6449203e71bb01079f709aa19bd/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.1e5a9883.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-gdUF/2SJ0Nwjri2WhGdfCgYzxChrjRUAFhDVxbfzEsl5haS6EclB3KiYMiaxyxO5PoPpup18jVMPb+i19K0D7g==","shasum":"e10a2c929c64498c1027e863e998a3b23147e7ff","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.1e5a9883.0.tgz","fileCount":13,"unpackedSize":39416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJUnLORazB25sTJV42lQCwHS5Pk4rrwt+N56czCh9VZAiA8ksi7av4R/1w2iDj8LedMuDWIr7g+65Q1ENzDgLOdlQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.1e5a9883.0_1631911164642_0.70817407295601"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.32c830ee.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.32c830ee.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.32c830ee.0","@material/mwc-textfield":"0.24.0-canary.32c830ee.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"72f380d7ef6cb00e8a03c42048cbf0cc09820ae9","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72f380d7ef6cb00e8a03c42048cbf0cc09820ae9/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72f380d7ef6cb00e8a03c42048cbf0cc09820ae9/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72f380d7ef6cb00e8a03c42048cbf0cc09820ae9/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72f380d7ef6cb00e8a03c42048cbf0cc09820ae9/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72f380d7ef6cb00e8a03c42048cbf0cc09820ae9/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/72f380d7ef6cb00e8a03c42048cbf0cc09820ae9/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.32c830ee.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-TtFKAKbSBGIvTM0GMMhGpAHlHa0D39lcXsEmR8G4/9P7psocoMP1bDSLuu9jM3V0tL1pcZ+xwUoIRzEu4COpgg==","shasum":"25146d092d26ba3d1b0e558ef5d63bd947975f92","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.32c830ee.0.tgz","fileCount":13,"unpackedSize":39416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChL/Gpw3v8Fp7bae0+Rm08ZtjD8AO1iSIdoaXciCc/pAIgVhQnrZpdZr1/NvNsKehXTHbHEfZhmPXgpUhNSOuoQ1Q="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.32c830ee.0_1631920143768_0.02794856114146671"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.1de87bb7.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.1de87bb7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.1de87bb7.0","@material/mwc-textfield":"0.24.0-canary.1de87bb7.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"a3215ff82b8bd0ba323b98cc29ed77fca57b8643","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a3215ff82b8bd0ba323b98cc29ed77fca57b8643/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a3215ff82b8bd0ba323b98cc29ed77fca57b8643/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a3215ff82b8bd0ba323b98cc29ed77fca57b8643/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a3215ff82b8bd0ba323b98cc29ed77fca57b8643/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a3215ff82b8bd0ba323b98cc29ed77fca57b8643/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a3215ff82b8bd0ba323b98cc29ed77fca57b8643/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.1de87bb7.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-ynhxN7KMONBftaNz23iRyxjyPw7SUV2yrXXtlPpxXREhCXeCRuCfA+jRtmuC2/5mkKnf7kqAL/eiLp48adk2FA==","shasum":"c1e8880e9df5e71fa09d976d9ed7b1a32113b84b","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.1de87bb7.0.tgz","fileCount":13,"unpackedSize":39416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEPxvFf2xEGrQGRWeGWSV/EelviDcywVLKaJoIwsF8sAIhAK4J02Halg+MoDjrxhY4XWTiN+lUZEbPqrMvMHBSgu0J"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.1de87bb7.0_1631991146701_0.6792633548697817"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.f2ea80c4.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.f2ea80c4.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.f2ea80c4.0","@material/mwc-textfield":"0.24.0-canary.f2ea80c4.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"be75dd39a03705b3cc24c5614f2c7f2be7c3c93e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be75dd39a03705b3cc24c5614f2c7f2be7c3c93e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be75dd39a03705b3cc24c5614f2c7f2be7c3c93e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be75dd39a03705b3cc24c5614f2c7f2be7c3c93e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be75dd39a03705b3cc24c5614f2c7f2be7c3c93e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be75dd39a03705b3cc24c5614f2c7f2be7c3c93e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/be75dd39a03705b3cc24c5614f2c7f2be7c3c93e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.f2ea80c4.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-XXWMJZNCb23kTlfYriVlhj3iQX8ISWZJ/8LZipi3E/YYB6eSJvO64fW3Jsyi+d65n1ZqjcQ5tS3UMI/lh3sZ9g==","shasum":"9ad3118883d7d4001d48abff8676a82319b0cc27","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.f2ea80c4.0.tgz","fileCount":13,"unpackedSize":39416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBg6AMnxymcbaF6lqRAfI4KezAfedRnJZwBrozaAuOZmAiBy1hGW1xFD6BYeBfCjHIV7S4TmcEc2D2mLTn5EqcvZNQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.f2ea80c4.0_1632160512402_0.4101489141744872"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.569d739f.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.569d739f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.569d739f.0","@material/mwc-textfield":"0.24.0-canary.569d739f.0","lit-element":"3.0.0-rc.4","lit-html":"2.0.0-rc.5","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c2e841aead340c043b080dc4718873a82f109450","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2e841aead340c043b080dc4718873a82f109450/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2e841aead340c043b080dc4718873a82f109450/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2e841aead340c043b080dc4718873a82f109450/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2e841aead340c043b080dc4718873a82f109450/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2e841aead340c043b080dc4718873a82f109450/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c2e841aead340c043b080dc4718873a82f109450/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.569d739f.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-REu94a6b/4dpZhPFFbz/ZKXHUa2fsO0pEfes5hCfU1hOYjTGBiU4iqVy6/gOpWPd0gSWdTob4pWeC0DpzFQa4Q==","shasum":"32ef6df6634ea17d151b3fad4c33313f63ed73c8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.569d739f.0.tgz","fileCount":13,"unpackedSize":39416,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEERuMzS1A6h2rrtsomJtYoowRcCip/1/S+XaBonxdD8AiBFEiZBzfPV5Wv6vsJ+hLFmf6hjLPlJWQyrINYMyM7jAQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.569d739f.0_1632173051880_0.022487387031572936"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.24.0-canary.5a434a50.0":{"name":"@material/mwc-textarea","version":"0.24.0-canary.5a434a50.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.24.0-canary.5a434a50.0","@material/mwc-textfield":"0.24.0-canary.5a434a50.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7f2821932d60f65ba8b79446374be9a66f009858","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7f2821932d60f65ba8b79446374be9a66f009858/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7f2821932d60f65ba8b79446374be9a66f009858/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7f2821932d60f65ba8b79446374be9a66f009858/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7f2821932d60f65ba8b79446374be9a66f009858/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7f2821932d60f65ba8b79446374be9a66f009858/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7f2821932d60f65ba8b79446374be9a66f009858/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.24.0-canary.5a434a50.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-ePNMsOAiK0uZmI7GOQ7kHWLFNPe6+5cCUrnO3aIGnL/KW8Qmfz1VfbPIig7uDcBRD0RucfEwZTZTY4W0U3+X1Q==","shasum":"350ed0fe8a83f23ea79ed17d44dd024dc76eed00","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.24.0-canary.5a434a50.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHvXdbGkC047Zp51+B5OFPYVyBN7OzRvCeteRneHBYLAiEAppLa8kzk+MmSXeTbCN2YDYBDW6r8BTM/jANDPQXgm5c="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.24.0-canary.5a434a50.0_1632189667214_0.19707277763885056"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.b1c1ab52.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.b1c1ab52.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.b1c1ab52.0","@material/mwc-textfield":"0.26.0-canary.b1c1ab52.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"320a093b73bd45cc5fa68abda305913c26c72310","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/320a093b73bd45cc5fa68abda305913c26c72310/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/320a093b73bd45cc5fa68abda305913c26c72310/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/320a093b73bd45cc5fa68abda305913c26c72310/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/320a093b73bd45cc5fa68abda305913c26c72310/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/320a093b73bd45cc5fa68abda305913c26c72310/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/320a093b73bd45cc5fa68abda305913c26c72310/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.b1c1ab52.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-10fjU4v8jj3NPyVt8mcfiyqdZkDin7hR+jjKx3eAajvsmkskf0xEnbR06dRCmGk79oYTE1oz52dFJPbhV4dWsA==","shasum":"d25a02d5acc1f67dbd27cf5317ded4e419dda8ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.b1c1ab52.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKXXaW0PAiYTgfMeIvmlybkyoLMqlHbgxuNUHI89FohAiBXpbqw6JzcLaEkBnKUOCcU4h5ag4PN1rKSBt8t4/SmGg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.b1c1ab52.0_1632193948084_0.10335852620479136"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.25.1":{"name":"@material/mwc-textarea","version":"0.25.1","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.25.1","@material/mwc-textfield":"^0.25.1","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b1c1ab5230f56f6bce405387b9c75cc7111cacc2","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.25.1","_nodeVersion":"16.9.1","_npmVersion":"lerna/3.22.1/node@v16.9.1+x64 (darwin)","dist":{"integrity":"sha512-Vs1X+peqeaFX79KoFAylyFWwRM0a4r11Ab1Zgz2Sd5jKjX/LVqeqKTY5TDmeSoYaYX4d+x6ShcG8n157FCjCng==","shasum":"db10400b6f1b68a1f81138cd9e171566bfecb90e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.25.1.tgz","fileCount":16,"unpackedSize":41169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBK0a+9JrgMQDKYs2x4Dt78m4KTmIuufMD5MP4cFjv63AiEAuQi2PRVrOZlBFgrVut24H4kMkUej7Fy3Y09kei1HeFU="}]},"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.25.1_1632193968197_0.5250619201403675"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.ae060177.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.ae060177.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.ae060177.0","@material/mwc-textfield":"0.26.0-canary.ae060177.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b919ae5340a9ffc926d328999cc5fe5704922e40","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b919ae5340a9ffc926d328999cc5fe5704922e40/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b919ae5340a9ffc926d328999cc5fe5704922e40/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b919ae5340a9ffc926d328999cc5fe5704922e40/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b919ae5340a9ffc926d328999cc5fe5704922e40/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b919ae5340a9ffc926d328999cc5fe5704922e40/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b919ae5340a9ffc926d328999cc5fe5704922e40/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.ae060177.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-kablMgCb54E7Hrmiz2O73OepkmQCWabdbWiiR45lPPznP//vzast/ryhU3OJPR6lu/+4MmpPlbxXwvnt4zRxpA==","shasum":"13e493414e03e210b0605912199c576598f866f9","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.ae060177.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoD6jdabYxGfMtQkMcr2UtVqGxjMKkNMo2gvbq6/zyPwIhANLZYo+J7T6sfaw6K9vIxfefuaIk357u3RJTk0t5PtCV"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.ae060177.0_1632235106299_0.2734023610418914"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.b6fe2a12.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.b6fe2a12.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.b6fe2a12.0","@material/mwc-textfield":"0.26.0-canary.b6fe2a12.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"06feede8e75d655952f3a43b5c971276c26fe92e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06feede8e75d655952f3a43b5c971276c26fe92e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06feede8e75d655952f3a43b5c971276c26fe92e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06feede8e75d655952f3a43b5c971276c26fe92e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06feede8e75d655952f3a43b5c971276c26fe92e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06feede8e75d655952f3a43b5c971276c26fe92e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/06feede8e75d655952f3a43b5c971276c26fe92e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.b6fe2a12.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-syRYRLHUsfRc9wVjY+68xxYaLqvoOO9gFUbNos3D2Qgikn2Fhdm02ayWfBV94141xZjmf8XYuwg+CLJpH4afEQ==","shasum":"832884d8898d54704edb0631b86f7c5751710508","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.b6fe2a12.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDE2cb9lGX3+1I4iROpomeqlk8WXBcE2oUlhlC+AdL4pAiBiJFgheJ+zDfJt26d5NZ7KMCMRt5qe4d3nPubLHPH4Cw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.b6fe2a12.0_1632341795649_0.6912621067339169"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.07e91417.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.07e91417.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.07e91417.0","@material/mwc-textfield":"0.26.0-canary.07e91417.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9fcacc1890992ebd650dca508478ea3a276a1ebe","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9fcacc1890992ebd650dca508478ea3a276a1ebe/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9fcacc1890992ebd650dca508478ea3a276a1ebe/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9fcacc1890992ebd650dca508478ea3a276a1ebe/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9fcacc1890992ebd650dca508478ea3a276a1ebe/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9fcacc1890992ebd650dca508478ea3a276a1ebe/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9fcacc1890992ebd650dca508478ea3a276a1ebe/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.07e91417.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-i3ui2kLNdYqPNYjtvkz2X7z9whJIK7f8PGdIC8xn0WOw2+6Bp89vMgeG+4xn0+7AlNvJznkGML5ue5JQce/Wtw==","shasum":"6a42000a7b7c8481f258393efe55055cc4523eea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.07e91417.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1YkOfZO3JtdAE0F0Xpnypr4exl0yJnsfI/Tzu4hwdCAiB0JkOBf4EIGGemn+LUpo8elNoMT9ubjJd+rpgdgNGWCQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.07e91417.0_1632344765992_0.4536534077887897"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.e2203ffa.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.e2203ffa.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.e2203ffa.0","@material/mwc-textfield":"0.26.0-canary.e2203ffa.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"dccbe3e93b2694b3336adcf33188115ced04a52e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dccbe3e93b2694b3336adcf33188115ced04a52e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dccbe3e93b2694b3336adcf33188115ced04a52e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dccbe3e93b2694b3336adcf33188115ced04a52e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dccbe3e93b2694b3336adcf33188115ced04a52e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dccbe3e93b2694b3336adcf33188115ced04a52e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/dccbe3e93b2694b3336adcf33188115ced04a52e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.e2203ffa.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-8cSqXQg4Auxr3iHeJUYr6h8EHHiwvghPE0NkXbMNg/Kl8tNqd7zdlJQfxDMJLPXhw2dM8rwfuIWh/AMVYRabsg==","shasum":"3d873ebb4359827f2e3de7a54cb42444131b17d2","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.e2203ffa.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG1NYw5mjXWGJR0ZaPTwtfRSgQ4mEzIELuA98Bmuj9LQAiBcj6U5tZ/D3ldLld+47p+mmZm7TY+I0lzhRAiVIxfPcQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.e2203ffa.0_1632421675973_0.14215049734385987"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.4abe237e.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.4abe237e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.4abe237e.0","@material/mwc-textfield":"0.26.0-canary.4abe237e.0","lit-element":"^3.0.0","lit-html":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c0c828f0240aea9472d319d4a1bb77871c960873","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c0c828f0240aea9472d319d4a1bb77871c960873/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c0c828f0240aea9472d319d4a1bb77871c960873/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c0c828f0240aea9472d319d4a1bb77871c960873/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c0c828f0240aea9472d319d4a1bb77871c960873/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c0c828f0240aea9472d319d4a1bb77871c960873/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c0c828f0240aea9472d319d4a1bb77871c960873/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.4abe237e.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-B1ZgPOiieJiXOBHEuX4hVG3ziw+VzG+0MzLTxeDwezWou4BGMwXEI4uMfLS122nJxuoXWlKU9D/vTB/BDrEi4A==","shasum":"4eaf4c08b7cd7027ffc6e8dce79a9f3570e94388","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.4abe237e.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEOkgmzhI/LCzfFNASnR+C04RP/OlgxMVAqUxh5Z9hHAIgf4XDExwq+wlxJvFYq0PUENQejPKT63AJ5PiW+5Jnt7Y="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.4abe237e.0_1632504686680_0.9456618754995392"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.6278ee5d.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.6278ee5d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.6278ee5d.0","@material/mwc-textfield":"0.26.0-canary.6278ee5d.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"85137ac5f9a59dd64512524f380c65b268a2344f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85137ac5f9a59dd64512524f380c65b268a2344f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85137ac5f9a59dd64512524f380c65b268a2344f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85137ac5f9a59dd64512524f380c65b268a2344f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85137ac5f9a59dd64512524f380c65b268a2344f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85137ac5f9a59dd64512524f380c65b268a2344f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/85137ac5f9a59dd64512524f380c65b268a2344f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.6278ee5d.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-s5DXOu5edNnueBUDSP9gv4WVtgflB0ycCbz20Xb8DoQGhahR4IDFMnnLRF5PI8GndTT0B65g5pIBZdESfiGnrQ==","shasum":"4fc818044203ed858cdfc8b0e3a866e0013feac6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.6278ee5d.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6EdglWnmW+2Cfa+YJK1O8ZG9lbKbsmDsaZ26PSde7jgIhAL07M/XXSbStfqSDkqrsZwU5Xu3Xl+3p/4cTRW4Y4iUv"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.6278ee5d.0_1632767500060_0.6215903907254094"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.3a5d5f34.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.3a5d5f34.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.3a5d5f34.0","@material/mwc-textfield":"0.26.0-canary.3a5d5f34.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0708ad010478b6186d6be52d3494f33bd4d40e17","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0708ad010478b6186d6be52d3494f33bd4d40e17/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0708ad010478b6186d6be52d3494f33bd4d40e17/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0708ad010478b6186d6be52d3494f33bd4d40e17/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0708ad010478b6186d6be52d3494f33bd4d40e17/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0708ad010478b6186d6be52d3494f33bd4d40e17/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0708ad010478b6186d6be52d3494f33bd4d40e17/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.3a5d5f34.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-IICeGujQ5+ejwISnd4XQaXqotGHOlO+hEpvP/tsJY1/cS3RMYUkXA2hfu7CI6dkQ/gY7YvE5Ys1CE0nYOFohww==","shasum":"94fcaee2d6e6253a64137c25d7340845123c4481","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.3a5d5f34.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9LbGbNXIdpP/y37u4fZ2PDvJOdIWVA24sOExhC4CIfQIgKQ91RZTUpSLWeFlrkqOOjaQBsySmkCBkxsfiQr/Zsik="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.3a5d5f34.0_1632782508403_0.02002857880961506"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.143ed3c8.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.143ed3c8.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.143ed3c8.0","@material/mwc-textfield":"0.26.0-canary.143ed3c8.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"d25beb586046dd7cd30a302cdbcf1114a66b7770","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d25beb586046dd7cd30a302cdbcf1114a66b7770/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d25beb586046dd7cd30a302cdbcf1114a66b7770/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d25beb586046dd7cd30a302cdbcf1114a66b7770/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d25beb586046dd7cd30a302cdbcf1114a66b7770/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d25beb586046dd7cd30a302cdbcf1114a66b7770/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d25beb586046dd7cd30a302cdbcf1114a66b7770/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.143ed3c8.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-MdtRBvjiX+fueoAiKIMHXitwSn94TPdLpTMbdJyKn1lYOBLezt6G18hFCS7j17N/GkZ2iqtOcEVLQTt7QPf9ag==","shasum":"da698edc22f2fc809012ce52f7ebe84c9a7cc837","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.143ed3c8.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEN12IYoAWUD/qj/r+m+/vZqhXh5ozU73F6erDHICSAQIhAKjxyV+Ebxq3psDyDCl5sb2HLNk+YGWmGOChdrQXmvTL"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.143ed3c8.0_1632880268466_0.8984528126510516"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.e5923d68.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.e5923d68.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.e5923d68.0","@material/mwc-textfield":"0.26.0-canary.e5923d68.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"41f6e947d4028d5479ec62a20cbf1e1fce3c3a27","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/41f6e947d4028d5479ec62a20cbf1e1fce3c3a27/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/41f6e947d4028d5479ec62a20cbf1e1fce3c3a27/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/41f6e947d4028d5479ec62a20cbf1e1fce3c3a27/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/41f6e947d4028d5479ec62a20cbf1e1fce3c3a27/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/41f6e947d4028d5479ec62a20cbf1e1fce3c3a27/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/41f6e947d4028d5479ec62a20cbf1e1fce3c3a27/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.e5923d68.0","_nodeVersion":"14.17.6","_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","dist":{"integrity":"sha512-to4xLho9A9DjyGAb2ftTdDJ8Wm+KA8WP+obRCs/Pfm/8UqQq4hyRfEZ/eXx1z1z74aJEzRuoZBYHde0mqQyZow==","shasum":"327740c0bc10ca77d97042e4c79a069159d253cd","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.e5923d68.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVP/jRw5ilebBjqDzUzvBjYN3Kwf4hLmgL9zYQT0MHnAiEAjOM9V+QzAMFRIJKYdRBRk+S304UE/E40kRbrtc5Vigk="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.e5923d68.0_1632960368565_0.43977947720622756"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.d8ed5109.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.d8ed5109.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.d8ed5109.0","@material/mwc-textfield":"0.26.0-canary.d8ed5109.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7cb638711a37e4d716e9aecb64598a665d377e7c","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb638711a37e4d716e9aecb64598a665d377e7c/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb638711a37e4d716e9aecb64598a665d377e7c/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb638711a37e4d716e9aecb64598a665d377e7c/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb638711a37e4d716e9aecb64598a665d377e7c/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb638711a37e4d716e9aecb64598a665d377e7c/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7cb638711a37e4d716e9aecb64598a665d377e7c/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.d8ed5109.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-rSE4UZ664Q1k3ZI+/6/rozKqoQy4XguHVURxW4bh8NL/wxupXnoUD9KJj+ALpCoQlRnw3CAKCJLrVVopL0o7vQ==","shasum":"28c0a4698f748e9ea3888c0cb311c488f9f343f8","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.d8ed5109.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEMlQt14m2dtTIpw2D5/DbGb2hAILdGIb2jGgbUHLMrwIhAINI+qKH768nbsiscbcD64MZjnOkZQUuEGt6Xowv9ZyY"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.d8ed5109.0_1633044851236_0.048723012654161346"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.0efb9c2c.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.0efb9c2c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.0efb9c2c.0","@material/mwc-textfield":"0.26.0-canary.0efb9c2c.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"878935c40ce21b0cfddbf2aab964ba07d23dbb94","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/878935c40ce21b0cfddbf2aab964ba07d23dbb94/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/878935c40ce21b0cfddbf2aab964ba07d23dbb94/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/878935c40ce21b0cfddbf2aab964ba07d23dbb94/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/878935c40ce21b0cfddbf2aab964ba07d23dbb94/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/878935c40ce21b0cfddbf2aab964ba07d23dbb94/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/878935c40ce21b0cfddbf2aab964ba07d23dbb94/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.0efb9c2c.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-D1HUlgW35ZYTSc8c7ZHNAR+LgWP9uhFAiiov2o0K6xJRIrqfu6HFg1xeM7z1P121sZAjgWwltP+1GV5gSPC2kw==","shasum":"5fed35c2255e388418b09b7d567c848da3ffc51f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.0efb9c2c.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCGgmZA/33FdF3afDUhtreKVx735y1J90hG26EqNdNQQIgMis+SFlciI+GBkarADmoZ7MyAyB75lzUQaOrerbmLhY="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.0efb9c2c.0_1633140513385_0.31815198731787797"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.1c9adcb3.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.1c9adcb3.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.1c9adcb3.0","@material/mwc-textfield":"0.26.0-canary.1c9adcb3.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"432b66e41cc474278a452cfd5bd850754fd8b9f3","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/432b66e41cc474278a452cfd5bd850754fd8b9f3/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/432b66e41cc474278a452cfd5bd850754fd8b9f3/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/432b66e41cc474278a452cfd5bd850754fd8b9f3/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/432b66e41cc474278a452cfd5bd850754fd8b9f3/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/432b66e41cc474278a452cfd5bd850754fd8b9f3/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/432b66e41cc474278a452cfd5bd850754fd8b9f3/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.1c9adcb3.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-Z+vMsSjvYh3DJfTJTuUfIYcGD076XEtg0T//DbyqujppFoOUA1eKeAeKW3NkxznzFdly21sjzeUcVvom3OKa3g==","shasum":"43eb8f0e28b3463caae954468ac33844bc77fa98","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.1c9adcb3.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoLgmeCSzOE+ZxcnSCBTU3pVtxQ5H/2n1g8XYdzlndDwIhAKBf98qID6edspYc4QmQXh3EtY5DLt8i6GPaOPVsMuow"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.1c9adcb3.0_1633368832049_0.8349466453102017"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.dfc00d60.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.dfc00d60.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.dfc00d60.0","@material/mwc-textfield":"0.26.0-canary.dfc00d60.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3edf5d72f0c17bcf7c2e7377e2c0b4579168d2b0/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.dfc00d60.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-O39O0q/uHAfHm8MVSQRZ+cLb5mr4zmUudk41rXM6Cym/lhlh087LLb8aipQ6vCv3utE0R79sfad2OfBNIc6Zig==","shasum":"2875c07ac252d48321bc2860622478dac3782357","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.dfc00d60.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK56N9qnSYepXeHK7ZDFS6AYEP1wGjUGZdEELjlAAq8wIhANMYJ2Y64FvW8nCbc8TREBVX5Ia8lgzOhp9PGAhCpYmD"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.dfc00d60.0_1633741056801_0.29027587840092806"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.c3aa844c.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.c3aa844c.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.c3aa844c.0","@material/mwc-textfield":"0.26.0-canary.c3aa844c.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"a792c732afb00bf097879fdcd7a1ac2a0c5d9506","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a792c732afb00bf097879fdcd7a1ac2a0c5d9506/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a792c732afb00bf097879fdcd7a1ac2a0c5d9506/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a792c732afb00bf097879fdcd7a1ac2a0c5d9506/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a792c732afb00bf097879fdcd7a1ac2a0c5d9506/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a792c732afb00bf097879fdcd7a1ac2a0c5d9506/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a792c732afb00bf097879fdcd7a1ac2a0c5d9506/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.c3aa844c.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-OXpJqefDoziaGi6TZ8/UkwhkAD9WAexNDtcFMeBGqfbn1r+Rivv4XrSldQzAiLCdQSObHoGHPZnDZRSogUogxg==","shasum":"b2c4aeb72781c1f5e5881beb16f407762329b26a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.c3aa844c.0.tgz","fileCount":13,"unpackedSize":39432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTVVHYF3366Hgo9pxP61y53ZrXNz2akRPiJXQdslzTkAiEA3W4V23GpD4cX93DfZVpsJxd/a3ycR0CTfHww8Tzo5AI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.c3aa844c.0_1633994078389_0.46251115294935885"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.25.2":{"name":"@material/mwc-textarea","version":"0.25.2","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.25.2","@material/mwc-textfield":"^0.25.2","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c3aa844c2a09ff9868820ce946f25f9df7714560","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.25.2","_nodeVersion":"12.22.5","_npmVersion":"lerna/3.22.1/node@v12.22.5+x64 (linux)","dist":{"integrity":"sha512-OH64dxPVfSWma3OCaN7rOZ01a4OV5hAfWExmGBfzxPHiaFotabjPWwqh1yrBEzwdCnG/6ljJFdCwXAYJcqkKsw==","shasum":"535151101a61b83054e763609159b313405a04ea","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.25.2.tgz","fileCount":13,"unpackedSize":39380,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG9zkxVduG5QyPREPSpEp8Fe30smRlNj8saHvgR3+TB7AiBdteH5n766JchjyfsAe8fgDfoVwOleFTVtoAgY92tN3w=="}]},"_npmUser":{"name":"taylorv","email":"brian.t.vann@gmail.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.25.2_1633994318490_0.10280080776177769"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.406d6fe1.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.406d6fe1.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.406d6fe1.0","@material/mwc-textfield":"0.26.0-canary.406d6fe1.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"d1410f3120b13ff08ccd731739c038b9fb14af78","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1410f3120b13ff08ccd731739c038b9fb14af78/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1410f3120b13ff08ccd731739c038b9fb14af78/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1410f3120b13ff08ccd731739c038b9fb14af78/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1410f3120b13ff08ccd731739c038b9fb14af78/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1410f3120b13ff08ccd731739c038b9fb14af78/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/d1410f3120b13ff08ccd731739c038b9fb14af78/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.406d6fe1.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-jOsMkgAhk4/F+N07SkpFGE/FTSEeToLGHG6/yy1Uc6y5d42vbwth4IonJvwpwipwcXUCs/OhdjX6pmyX/sh6mQ==","shasum":"fa22c0d9f64cfe17114c08372326311dbff9ab47","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.406d6fe1.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1FuYfdu5PCfWALiy1Kc0KskpK8gu6bA1s/9lwUnrmbAiAvEnBn8pvv5PqAcoLIPEskcRk6KTm+IYPCiNXAr7r5Yg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.406d6fe1.0_1634158785687_0.7979881039683645"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.ca0a674f.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.ca0a674f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.ca0a674f.0","@material/mwc-textfield":"0.26.0-canary.ca0a674f.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b8e99d19dfc1b6d5062ada3345d461e9a77f18f1","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b8e99d19dfc1b6d5062ada3345d461e9a77f18f1/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b8e99d19dfc1b6d5062ada3345d461e9a77f18f1/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b8e99d19dfc1b6d5062ada3345d461e9a77f18f1/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b8e99d19dfc1b6d5062ada3345d461e9a77f18f1/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b8e99d19dfc1b6d5062ada3345d461e9a77f18f1/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b8e99d19dfc1b6d5062ada3345d461e9a77f18f1/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.ca0a674f.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-Pb+NLvJ8ExEUy8qvG6P2lmaeBZ+eQg7Tc8u6CjyqfHLlm8l1USoMQiFB0X6Lpr1bu+hN034DW57mOvfFwGpeFw==","shasum":"92b43908b5c40cd99a0280930dcae6eb2d4fccc0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.ca0a674f.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFDIYejtSpVGTP439YltMQY6rNPQTG7hgHJrHglIgcqAiBZwkSFf+acwG4BZqgHs+s5tpZO/bmPDmoD/hkRmrXmrQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.ca0a674f.0_1634593033906_0.0894364156647296"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.eefcf660.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.eefcf660.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.eefcf660.0","@material/mwc-textfield":"0.26.0-canary.eefcf660.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"70552d8e831f6542ab42f41bb5d338adcff0500e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/70552d8e831f6542ab42f41bb5d338adcff0500e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/70552d8e831f6542ab42f41bb5d338adcff0500e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/70552d8e831f6542ab42f41bb5d338adcff0500e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/70552d8e831f6542ab42f41bb5d338adcff0500e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/70552d8e831f6542ab42f41bb5d338adcff0500e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/70552d8e831f6542ab42f41bb5d338adcff0500e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.eefcf660.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-XcDZVUJ12D/KDHFXIV4rpWMILg7epU/Cc7GPNr+qxgBmLPgyh0cECHm4XkEveO+u2wNHOwuT9jrTVmpaFdaxjw==","shasum":"09dbf88f82afe7225cb810066818459f4fa238fb","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.eefcf660.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtOh2eMpJ2tM4UmnS6SYuC/p+X/vpl/Kqpg5HiEJr/0wIhANs5S7k+Rtt/+WKMzDOiMde/9QTyz4SckTd4g+DvUa9D"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.eefcf660.0_1634765033886_0.10751036297855876"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.d21acc8f.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.d21acc8f.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.d21acc8f.0","@material/mwc-textfield":"0.26.0-canary.d21acc8f.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"13f43aef10317d911611c572ecc044445a012a2f","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13f43aef10317d911611c572ecc044445a012a2f/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13f43aef10317d911611c572ecc044445a012a2f/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13f43aef10317d911611c572ecc044445a012a2f/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13f43aef10317d911611c572ecc044445a012a2f/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13f43aef10317d911611c572ecc044445a012a2f/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/13f43aef10317d911611c572ecc044445a012a2f/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.d21acc8f.0","_nodeVersion":"14.18.0","_npmVersion":"lerna/3.22.1/node@v14.18.0+x64 (linux)","dist":{"integrity":"sha512-uHhuAOWFVHFYd765dWloVFS5cnuVGzY4QVWnuE2R5UTsLVnBEU4sM2qUnmq9040nF/62ZNPfVHQGw9tql2F7ug==","shasum":"18b9e4868be70415c719e4194873ac73349826dc","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.d21acc8f.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQC8UPhxy6Ovz5qgPUwSC6+lpwOnCLE1jNc/PTaimJoDigIfUqwZs22deqAS1WJgYf+rCGeyhFhbc+L0JCuhkmCRPg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.d21acc8f.0_1634769167665_0.6972084719746077"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.25.3":{"name":"@material/mwc-textarea","version":"0.25.3","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.25.3","@material/mwc-textfield":"^0.25.3","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"1f19804bea995fc84ab35feb67668d9874ff10f9","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.25.3","_nodeVersion":"12.22.5","_npmVersion":"lerna/3.22.1/node@v12.22.5+x64 (linux)","dist":{"integrity":"sha512-u3PkwAL6+2DGr4rxrDAqBPBCwFX40lM8/ZKgQ9mg7xLB6Rhz/5n3Sf5MtMwGSJO0ZU5CGqU3qY9x21S4tM/Xhw==","shasum":"0d2e136affcdc4d0a33775ded2ae8cfd43f79f63","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.25.3.tgz","fileCount":13,"unpackedSize":39356,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4P9+MDarr7ceeCZZ4F8DsXIyGcexNvRQONzmTkdOsCQIgApmI9KjiU6naweHPEwnu8iEcoIpd74ymz5jBkZ8RV4A="}]},"_npmUser":{"name":"taylorv","email":"brian.t.vann@gmail.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.25.3_1634838952149_0.4851194969950141"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.60449b7b.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.60449b7b.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.60449b7b.0","@material/mwc-textfield":"0.26.0-canary.60449b7b.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"cb5b8ebecb046df6d10001a163b69a26954c94bf","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb5b8ebecb046df6d10001a163b69a26954c94bf/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb5b8ebecb046df6d10001a163b69a26954c94bf/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb5b8ebecb046df6d10001a163b69a26954c94bf/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb5b8ebecb046df6d10001a163b69a26954c94bf/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb5b8ebecb046df6d10001a163b69a26954c94bf/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/cb5b8ebecb046df6d10001a163b69a26954c94bf/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.60449b7b.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-5dmVe7QK1YKVXr9V1E/GtOgInTO7AQ7DcT/kDW9wxdmvjqOqx49RF1uQLKCueTXWx648r8wnQee7M8LL9IIghg==","shasum":"bcd01f05d00ce7fd0c1fc543aae3b0b1d8389de1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.60449b7b.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEEJ+7HCs6LVbbfcbD4r/foaj7Z020NaFzl+in0P/nXeAiAWvD5EBrPXe8UTzv7yJlKE46oYjzMa/+mjsbJWuifFgA=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.60449b7b.0_1634840269373_0.18758748201676956"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.0d8084ed.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.0d8084ed.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.0d8084ed.0","@material/mwc-textfield":"0.26.0-canary.0d8084ed.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ca8c4979ee49843dba32b345040faa8c1e8a22a4","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ca8c4979ee49843dba32b345040faa8c1e8a22a4/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ca8c4979ee49843dba32b345040faa8c1e8a22a4/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ca8c4979ee49843dba32b345040faa8c1e8a22a4/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ca8c4979ee49843dba32b345040faa8c1e8a22a4/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ca8c4979ee49843dba32b345040faa8c1e8a22a4/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ca8c4979ee49843dba32b345040faa8c1e8a22a4/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.0d8084ed.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-SYK1DB/F6lsil5dFQhZ/V4Phu5qi36TfZej5OLLUSWwXrqDumOP5sf3A4sPfOa6OQCDmJDwOrISHTqu/rgRaIA==","shasum":"d1cbffd1ff72463a050cd40472b55baaa85bf0b0","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.0d8084ed.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPZMVz2HWO4tjzkT+xWwObYO80iRtFG0WGTgqYoZNtQQIgCw31nus/hQSN6vAD0voHmohYmqUf4pWJ/tIsZbB/dNs="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.0d8084ed.0_1635443113014_0.5559731847435208"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.232327ee.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.232327ee.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.232327ee.0","@material/mwc-textfield":"0.26.0-canary.232327ee.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"0645d0b4b0eac5799fc20a3bd279788eb66a7564","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0645d0b4b0eac5799fc20a3bd279788eb66a7564/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0645d0b4b0eac5799fc20a3bd279788eb66a7564/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0645d0b4b0eac5799fc20a3bd279788eb66a7564/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0645d0b4b0eac5799fc20a3bd279788eb66a7564/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0645d0b4b0eac5799fc20a3bd279788eb66a7564/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/0645d0b4b0eac5799fc20a3bd279788eb66a7564/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.232327ee.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-agMpfBuMuPpkuhZYSNc5iGUPqLYUMtNcpqy5hn51+Bn9bYaM1WdNR4FfuxzacWYgpew3G5RhRiz1omWdNHOm3A==","shasum":"258c432b078d2cf787e8ed9ed118a9111f2a88d1","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.232327ee.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHhWD8rx70vEhOMe7CYB6+N/DG8PmDVkE1aXZ3qvrP8gIhAPOGp/gv+KiXbf1gUX6VviG+ghZlVpVB9L6WLawGyQjM"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.232327ee.0_1635797766522_0.5996541612140993"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.0a492ae8.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.0a492ae8.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.0a492ae8.0","@material/mwc-textfield":"0.26.0-canary.0a492ae8.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9f520a49648fd39a7140df761448008fe0fbb492","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9f520a49648fd39a7140df761448008fe0fbb492/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9f520a49648fd39a7140df761448008fe0fbb492/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9f520a49648fd39a7140df761448008fe0fbb492/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9f520a49648fd39a7140df761448008fe0fbb492/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9f520a49648fd39a7140df761448008fe0fbb492/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9f520a49648fd39a7140df761448008fe0fbb492/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.0a492ae8.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-RCanwab4yCnrsHR3vz5rXfzmfPYPXHv7E4B5Q895CzxPGp6e0BjvsrP+b3NCnkdcJc04pLtAmLRsrpXSyy/cIw==","shasum":"5291f74ecaf30dbe881a17105fc403316ee7086e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.0a492ae8.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqPBOAj+L5H1g8FjKGFkEc+fpvu0uHsmnwqhxt1xTpZAiBL0n+FkaYP17IvAJvDapflBzwJkgK2co05dfM26dkbKg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.0a492ae8.0_1635847242256_0.6300159281530977"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.0aa18745.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.0aa18745.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.0aa18745.0","@material/mwc-textfield":"0.26.0-canary.0aa18745.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"5345838b7f3a3ec41bf4ef997759be6aae3cd340","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5345838b7f3a3ec41bf4ef997759be6aae3cd340/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5345838b7f3a3ec41bf4ef997759be6aae3cd340/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5345838b7f3a3ec41bf4ef997759be6aae3cd340/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5345838b7f3a3ec41bf4ef997759be6aae3cd340/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5345838b7f3a3ec41bf4ef997759be6aae3cd340/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/5345838b7f3a3ec41bf4ef997759be6aae3cd340/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.0aa18745.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-F1oGYkzFLK6TJLpO/SRJQjBoThlqBJlm1+bI05vYSZNMbpv/+WiwoVBUxqZ2dunI1+dArN+llmhWI7SxAsUwfg==","shasum":"161bc04be79641b5b3d0640b7f7e3db52ffe905a","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.0aa18745.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+oD2uKOQ+INJcutvFXBsGDQodEw95kGNx96mwvzZ/6AIgHDW5m1/qFeGoLPrhqiAO9DZIbPWKMjQm5YgVEvWyywI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.0aa18745.0_1635876490308_0.5317629904213808"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.f3e28323.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.f3e28323.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.f3e28323.0","@material/mwc-textfield":"0.26.0-canary.f3e28323.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"ebbbec0b1b0e29da237ec87bebd889c3af847f1b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebbbec0b1b0e29da237ec87bebd889c3af847f1b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebbbec0b1b0e29da237ec87bebd889c3af847f1b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebbbec0b1b0e29da237ec87bebd889c3af847f1b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebbbec0b1b0e29da237ec87bebd889c3af847f1b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebbbec0b1b0e29da237ec87bebd889c3af847f1b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/ebbbec0b1b0e29da237ec87bebd889c3af847f1b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.f3e28323.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-0vA/IstQVvGQoYx2ASHrqnyW31xyDcMlpLrSmb3ggQF3pzX3f2H0g9+l45gNLY2rCYJNfYsACvKE3L+djx5H5Q==","shasum":"ced554fdc5e209dfa9337c6224b71efd5d64206f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.f3e28323.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0pWUgrQfu1d5JHm9imA29zjY5qIEIl2nTHMl7kACPWAiEAmmdJHIim6vwtEo6QrbPlwtwnbVnqFXErt+COmpIzzzU="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.f3e28323.0_1635879592339_0.8789496791030793"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.27e05c5d.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.27e05c5d.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.27e05c5d.0","@material/mwc-textfield":"0.26.0-canary.27e05c5d.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c052b0acfe9f929e6bae475576f23f8349bde578","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c052b0acfe9f929e6bae475576f23f8349bde578/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c052b0acfe9f929e6bae475576f23f8349bde578/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c052b0acfe9f929e6bae475576f23f8349bde578/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c052b0acfe9f929e6bae475576f23f8349bde578/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c052b0acfe9f929e6bae475576f23f8349bde578/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/c052b0acfe9f929e6bae475576f23f8349bde578/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.27e05c5d.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-qPvTweyEiw6M/aFdoW3L+P3MDsA74eyYvT9xP3fFrZSAsdiTWLpIArxPCGXGl9i6m55/THxQQoNaZzcpNxFQvw==","shasum":"c5896f78b55967d5fce464bf4f909c9c81d9ac83","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.27e05c5d.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHIzfMmccNCXQ2NvM9VU7I2emMOepAbiF+ZAKlnwTd6VAiEA+UViUNyF0bzZPjILIrQtTDrQvRJXtLlA+FH1jEwQT3g="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.27e05c5d.0_1635965117987_0.17153226235657204"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.b9e44af7.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.b9e44af7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.b9e44af7.0","@material/mwc-textfield":"0.26.0-canary.b9e44af7.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"93bbd63ef108db911df936720517c5068ef30dcb","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/93bbd63ef108db911df936720517c5068ef30dcb/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/93bbd63ef108db911df936720517c5068ef30dcb/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/93bbd63ef108db911df936720517c5068ef30dcb/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/93bbd63ef108db911df936720517c5068ef30dcb/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/93bbd63ef108db911df936720517c5068ef30dcb/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/93bbd63ef108db911df936720517c5068ef30dcb/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.b9e44af7.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-EKOBIWgnQ9UYWnPf0OwBWK4xf/qwQoyssPSAWvGb5vfEvg76WK48iKbLBCutQJ4XSwt0ZMIMjFL2Q1eV00WUow==","shasum":"6e7a28934554f94121b4d267dd97f3ebc0fc9309","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.b9e44af7.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlibG/NpX/NS2G1D6ZqPz9YWjLrTFxz5z+L5azBSM2BAIhAPCzfIKdyx0iLeuXPBknftmUZjTOsrYQeUF8+O5IO129"}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.b9e44af7.0_1635966259861_0.8489212337010761"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.448f6cb9.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.448f6cb9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.448f6cb9.0","@material/mwc-textfield":"0.26.0-canary.448f6cb9.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"b9833961f155dca92373d3a6f0476bc8cef934a2","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9833961f155dca92373d3a6f0476bc8cef934a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9833961f155dca92373d3a6f0476bc8cef934a2/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9833961f155dca92373d3a6f0476bc8cef934a2/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9833961f155dca92373d3a6f0476bc8cef934a2/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9833961f155dca92373d3a6f0476bc8cef934a2/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/b9833961f155dca92373d3a6f0476bc8cef934a2/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.448f6cb9.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-Ly/8Z36JJ/FSKps5NzCu4pBbTR4Ivk7rNlMCXSSdpbKq8AdKl/g8dwLDrohWvTyazaSTULRIDHHxlwaCfiSpXA==","shasum":"fb33616edd2ad1b25729db8188f4a8bba88d361c","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.448f6cb9.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhHfQX44DASn2yp5L1cyPoKklUU0GmfMt4MuzvTJQkRAiEAxqI2eyFcKGI+b13xPsy291VASrUIv/zrfpVuZr1JAWM="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.448f6cb9.0_1636049292510_0.9157658124439552"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.8067ce28.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.8067ce28.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.8067ce28.0","@material/mwc-textfield":"0.26.0-canary.8067ce28.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"a4d0d35b15bd6e7a29375f11c520886e5b9d168e","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a4d0d35b15bd6e7a29375f11c520886e5b9d168e/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a4d0d35b15bd6e7a29375f11c520886e5b9d168e/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a4d0d35b15bd6e7a29375f11c520886e5b9d168e/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a4d0d35b15bd6e7a29375f11c520886e5b9d168e/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a4d0d35b15bd6e7a29375f11c520886e5b9d168e/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a4d0d35b15bd6e7a29375f11c520886e5b9d168e/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.8067ce28.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-W8ShFNOmpfaOV0capPtRb+/ie4T+NntO6zJPcowEeeFoa4YYd1eppcWwBXwKbNqqzovUanW9AUcHSGiSv7c6Kg==","shasum":"0ff62ee8a5a517b3eb00d837037d3b2b8e172de6","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.8067ce28.0.tgz","fileCount":13,"unpackedSize":39408,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6SC32BAZQ7JCVvcznXwgDpmt1cDkbuOBU81Gy+5/o3AIgA6+1EJK+fxY3ndEP3bU38UDH5fRdXXKND0Ug94OrEVQ="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.8067ce28.0_1636064565134_0.4448958186809209"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.345c2bb9.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.345c2bb9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.345c2bb9.0","@material/mwc-textfield":"0.26.0-canary.345c2bb9.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"3e7898316da6adc11d19b54d685e52bc4bb79733","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3e7898316da6adc11d19b54d685e52bc4bb79733/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3e7898316da6adc11d19b54d685e52bc4bb79733/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3e7898316da6adc11d19b54d685e52bc4bb79733/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3e7898316da6adc11d19b54d685e52bc4bb79733/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3e7898316da6adc11d19b54d685e52bc4bb79733/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3e7898316da6adc11d19b54d685e52bc4bb79733/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.345c2bb9.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-caRCznRmRfcL1lO8eGXapDCdHl12J0vy6EynllE8vYBCzOYC2TjNFoOx85cWZf0P6F2kdhkBMVLKv3k0/oT52A==","shasum":"e0792fe1350caa0f6d7cd6a964ef04de760f2027","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.345c2bb9.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqP4OCRA9TVsSAnZWagAAPXYP/0XcPzuoETut6hgnkAeD\nadhIcOcVFW3ZMgsD2jHFt+oM2cSCmUIjKFmt1wjtBcRzQEhVGWjpETjX5G/0\nBiKHIDOubMJNHq9R8Bf7Upt6ul3HWfTDKe8wkeuKTdEhSO8rlQ2bPBKPb4K3\nm4KrC8SaP5G2YfLubl5Qdq/I2kmV1+/+FpQLt+oIZYt5ruhdQIRW+lskqBWJ\n9D99OJ1V5dZaheMIGkY48L2Wxju6Xh8BX9aN61B0q6+OX9eVgyXXXJKsrnGh\nVsdMEZI3MxGlr3sMQCvrejEzjnq/xYc+9mSXkcsXplt2Q0Sl2W7FzMREz6lo\nxssd7aPcj2aA0TTkiqg1UUkhtB4g6yvYkp9Eux8y+BLW3aThzGdjMoo2y2MF\nWy4gOXSGOiG/XGkBq+YKp426X41M/yIgilGPHYRpa9MPRpzZ7UGBCSW21opa\nm3hfi30kyD0BGRvc7tI3IKPGguc5WUj+5d6hnX/wxBKzs4+bojYTKqyk0Idt\nljVu/R6Ei2maEspTV48LNz8K1SPWMMTuJN5rWRz2frGbC6760DUL0mLgB5PX\nVuODTYSjLxaMuONXt3IpDO4LsUivb9T10mDa6Ds7+OR1UU6u+jJ730RVsjgT\nNDaiCp9evDLcW8dCXL3pbd3JuwB8lacs8iQtpD32eVl6WcdONlH38SIyBsb8\nbpj4\r\n=Nx1i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqlUu7D9aMPS+dzNPqjQVNfwSnB/tg+VW6uD0wcG0aRgIgblXXBlEiirEIRKr9EbEUtEwipEroN1gkPNzB5pXgjT0="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.345c2bb9.0_1638465038374_0.9653793755760347"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.0547aeeb.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.0547aeeb.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.0547aeeb.0","@material/mwc-textfield":"0.26.0-canary.0547aeeb.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"2115410a9593d1f2c95099961aed3e6e61255f88","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2115410a9593d1f2c95099961aed3e6e61255f88/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2115410a9593d1f2c95099961aed3e6e61255f88/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2115410a9593d1f2c95099961aed3e6e61255f88/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2115410a9593d1f2c95099961aed3e6e61255f88/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2115410a9593d1f2c95099961aed3e6e61255f88/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/2115410a9593d1f2c95099961aed3e6e61255f88/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.0547aeeb.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-xW0czKvPvD466MvKvtuqZWk/fEM9i06VUezGBvgW+kljum22l8h1LUg84x9vZAnfY/EEGkNtJ9LcFRZfdu1yhw==","shasum":"e3c0f56416439b86ba534aceb3e222b511281b9f","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.0547aeeb.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrjwVCRA9TVsSAnZWagAADLcP/2MmwR2GD8mkW1/iEvnS\nohnHSC2BPehB2FCdO7ptWkob4IUGxNk5oJtoxj6yfBiQpoTQL87pGSnVEG3f\nzw7NNpIo0xlIFZPl7RRQMPxfjd2Z206aQ2xG9LgIMUFpp3yORG57FBEamL0J\nRPGtdSbBOqFYGFTypfbYdHuB3JVsNWGnJdW0F+FCYboZXTa19iubm6LQv+5o\nfj5Y49Dir+z2prtETFGNnF5hVPupn5wYr4uWqM/g1o2LTiWFwkuznQu/4sHW\nwULa25zsdb9ADyFGgA3I4Qfa1C5f4ApcAcaEX38FvFlCE6DWCBeEr3ct+eP9\nRJAdDLkQltAYRhN3Y3d5bXhOR7Rv0Pe09FeP3lTknTyrIhFoSsmJryYXPwFh\nbTIPxsPtZvNnnKWGL4BQXWvfsm6wNOV1p6SS+sEA0HWGz1G4PpS3RRA1uYmn\nxMFu8bAksptCO6nHYQNd+LetkpNomdZY2KsgGUmhSD+7z1VZdXXjyQACp5pb\n3Jy4mnZM3jrRF91Q2BE88tdTTjlqjJx9I91nuw8NW6rRE5zRHViNcr5Er8vU\nI/+/JSaonk5iOgx96syDkubf3rwfp6mE4rqaYs3VO9IdCSf6hDz8p66WOaf/\nAXrkz3ydwpdSheNdnfQGHODm1EvCAXc65r+2Lhs4HK5i+PE0SFIoqJjJImOB\nlWMd\r\n=qNva\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQDqt0+6gB9NoDOjRHmgGo/RfOw/Tg3oHG9Yo/1VZXuAIgWfV1uEfy1M7Z6z+/2R0NJTUQlRvombwU2ryfX9qEank="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.0547aeeb.0_1638808597130_0.5975761840864224"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.3b2452cc.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.3b2452cc.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.3b2452cc.0","@material/mwc-textfield":"0.26.0-canary.3b2452cc.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/a95f7a1cbf5dd38cd64c9bb8e02e76d0b8927f1d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.3b2452cc.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-nOXWTjq52MBfzSy2FmF71KAhtUInY19q4CdMq8eyoUxgI8mZc/Y5a5zCG4tBGrOQsgU32q8cDLm5zp2GQOoswg==","shasum":"16164244c9749876d1ff498a386fa05325739484","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.3b2452cc.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsUhvCRA9TVsSAnZWagAAPAMP/2qHTdf4oUscZJ+yuzS9\n5lDWwJnBuuShBmv1IKj4g580WONQznnLPGO8fW1mekkq6TtVrGUueojN6XA3\n5tpoUNKzRAnGHZ2lAPqhPDImyjQoPTkZwtDXqcKihGPolm9FJRXa4P+8zXvW\nc8HdMaHkhQoMnEACgbsGeGc0YsblbQMLASCaukys9rJ9MSa0aNR9q+tk3vKS\nOmn6AWScbNcFHYXxNEaiiYqG0ydPveULJ3IqUjc/N0Kwlt7xr2VDuJt2oNyZ\n2oKRtk1b+oAG6//945NhaU7Uutui66JxZwzqueunMAg6EExd8qf5iPFmc/QP\nAUiKhl7KFLJUDnpSgTtGwyztU+L3StPonHIwwNGcxUWgCCKLuSSjMxnE8Pqt\n15Yw0rEc5ZZOSBLmwe06drRnE2T0TF4IuIopK9hNOvGq+09pa8abevJ1m6Sy\nE8mXKA/qdOl0ESRV6Vb+GZNJHo7TBNQIZtBht2DuclGgNIRB/XB94ZG8vrDS\nOh49XpX83ubJcPHra7iKnoGUJd4cRLfGg5vvpRk6z6PTmexRHEtM7TBX5a0T\nX1hF6oXqPz75MHvG8JVO/XjuqQs5LTxZWEtofaJk4/sQ7Y36IwCP6adQsy0v\nryGH7vLdJ+zSognIkXeAQdcJg0OeGyLzgPWkUrk0iZVk2pzWyj2uqMCfM0xY\nsDmT\r\n=xcVk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI/DdBrHuP0xVq3YWR3VzDEdlTXWHulH/FXrdSdlpxJQIgNOoTH/dG386wagEbNI6+jMmGCo1qGyBhUbDp4eSac00="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.3b2452cc.0_1639008367506_0.9221815818035093"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.cf7ba5a9.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.cf7ba5a9.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.cf7ba5a9.0","@material/mwc-textfield":"0.26.0-canary.cf7ba5a9.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"7e92aaee33b1c30269a52ec2c26232d0690d3d58","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7e92aaee33b1c30269a52ec2c26232d0690d3d58/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7e92aaee33b1c30269a52ec2c26232d0690d3d58/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7e92aaee33b1c30269a52ec2c26232d0690d3d58/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7e92aaee33b1c30269a52ec2c26232d0690d3d58/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7e92aaee33b1c30269a52ec2c26232d0690d3d58/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/7e92aaee33b1c30269a52ec2c26232d0690d3d58/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.cf7ba5a9.0","_nodeVersion":"14.18.1","_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (linux)","dist":{"integrity":"sha512-QtvXsN6fq+W3dXM/DZcFEjyeQ3sC4LDOSGKIfxkeeCkSIbrs9KbhwoAJxVPTqpoZ0ubuyD2VUCPn1E1AIFymDw==","shasum":"2934591fcaa41d44a38e125f986d294d6916f3e7","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.cf7ba5a9.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs6VtCRA9TVsSAnZWagAAWK8P/R+JYkuYSpQIjTLuoGcU\nolImpHnJp24EvxWaCqBToFWvflBAMQHQ4tHYU15SNy2gBvIEM5L8+21tPqry\nZs3DM+SZAcJaiHJiEE1IdQSY8O5gu7O9TRLb/OZoZ/jPwRSHYkfp9EnxCAW+\nvDJZBRz/9at8MWmKyN+PHSPifsPEefPRJwSnLfMNWctMYrcYMUfvKAcEiy+N\nybbzqqANt29Pd9u2xB48iMYY9p7cd8mzCfCucfjiSGLNIqozxPGvTtuuCIp3\nOM+Epu5cn0eMbp9CTbJp/H5yEZZeJBJS84zzWQE+CoiF8fOpEay34lU77cWr\nd3K3A71fMDfxApzU5VZfTYh4+qN+0aYn7qRaW6amSGyPe1t4hjLGVImI0RWy\nncjs8NpqrLboxPDIKZeZuiZwnR8gDE5kcCBVi5VkRSUFE/BcTRn+fsrdo7r5\nFN7kjtII5lS58Z4z1dGhNWynAxoM1fvxtRAo/M4ETgK/NbDRUYw8ExowLv4U\nR9UrFGQE5ClC+zCQOlJtWBG86XcNa6egJDXYwF1oM+B4xqDEJNmyKmGsyFeY\nm8AITrz4nsPufAwLyTNybtPjrdXoj8wNlKdTNXjPMDNgnmMEXIdQkIf+c8k9\nw0GoQeBc72MxjpXPynPb4T7/q6zJswoKt72HMN6daUVqXgt4msvhefdp1hhc\n3yxe\r\n=sTlR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBCNUwA1UrNT4/o7yKnCqJ5qtfTUTrIi2Ba9PYpNHNDXAiBrdfHTovivrPquiadw1S/N4RiM7JheMVcS14RpE5nZDg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.cf7ba5a9.0_1639163245809_0.1854958112387166"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.e1bcf14e.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.e1bcf14e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.e1bcf14e.0","@material/mwc-textfield":"0.26.0-canary.e1bcf14e.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"3cb6bc85426db9ac617c732735c808fd66cd1572","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3cb6bc85426db9ac617c732735c808fd66cd1572/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3cb6bc85426db9ac617c732735c808fd66cd1572/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3cb6bc85426db9ac617c732735c808fd66cd1572/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3cb6bc85426db9ac617c732735c808fd66cd1572/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3cb6bc85426db9ac617c732735c808fd66cd1572/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/3cb6bc85426db9ac617c732735c808fd66cd1572/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.e1bcf14e.0","_nodeVersion":"14.18.2","_npmVersion":"lerna/3.22.1/node@v14.18.2+x64 (linux)","dist":{"integrity":"sha512-i/0S7DzMnwk2an2t7OUdLup14yr1UR1Cdv7QS3rTzC8HuxyhVz8JJqdfsDPu3TOa0ZQuZyRT8ftZlwPnAohTIw==","shasum":"f0cd5c9114680db5b5c9980dcb0bbffce3b56931","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.e1bcf14e.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhy3eLCRA9TVsSAnZWagAAcuUQAJmcKChgRnUZdXgcwaZe\njTwHWxBHilDQ2cL/ZURn4urmDfYHHsvpjF501eSgdepD9BvkNWP8t6fMzLHx\nAmUxiLEnvQlfTcB30zLoDNUhRqjKPmLKuzHxxjNBLe4G3+bViui/7QPt+ye2\nMoSsAAXxZA9qCyC/oh3wLfLLFPgKypgUa+2Pu6cNcESlMWfN9TGEIiK5RdT+\n16dBBiH5co0OeJqYO6ZpnjOjlQMS4Z/VNRVPz42YD8zuQyxYCFmPpMocWvsw\nErVSy5wts8apL8DEKLyr6Svfw5FgpGloeAuBUwOxQX6qKbnACl2gvNUYJjie\n4DmbAKlB6NOMELZWsqSjzx9HqeaBwH0ZlBN78temYvTUq2xqh+Z2YbN5S+BC\nH8W34U7+SJdBCHHlTH5el6642eq8hqnUCCS28AmRvi7+8CSuDbi3n3BqfTve\nU8GkufBfTUM9qrgLkAFfICzfPM/II2kaVRDN4muHrrtMWqM+q1SC/RYeesJ9\nw+/w80udQZgGZpjDs/lZS3FtH17Z+s2rhyIoVInIS1tK5IjDfYEtMZk9e5Sj\nxYlYt7XNufdfyA/8LuC5U8ZgAukTlkhulN175WcCc7QgGEWA+von2Xa1O1j5\nE+LJCumpqstdLBqrOuoMXAkkWh4tyhwjZTw+YO8A4eE6Qmfk1W/6aTynQ/wH\nlvoC\r\n=jsj0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwBlvjjRHOjVKkMqH3oP9A3ZmsV815FkdXwdV5fesFqAiBSluo34+5gIWF596tajn29ldyCNClONzeykyeRnSbWiw=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.e1bcf14e.0_1640724363112_0.015238439070888399"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.b9d35b69.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.b9d35b69.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.b9d35b69.0","@material/mwc-textfield":"0.26.0-canary.b9d35b69.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"8ee41fe865471367787d08d3f94d1800c5712d3b","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8ee41fe865471367787d08d3f94d1800c5712d3b/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8ee41fe865471367787d08d3f94d1800c5712d3b/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8ee41fe865471367787d08d3f94d1800c5712d3b/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8ee41fe865471367787d08d3f94d1800c5712d3b/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8ee41fe865471367787d08d3f94d1800c5712d3b/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/8ee41fe865471367787d08d3f94d1800c5712d3b/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.b9d35b69.0","_nodeVersion":"14.18.2","_npmVersion":"lerna/3.22.1/node@v14.18.2+x64 (linux)","dist":{"integrity":"sha512-Iyo1X4fq8VmWJYjc+/qCtApy1Dn916nlieDOeAnquh3SDscmLRaAijlPWnmkNmyv4Ai3X/hJxRotrCuVeU13XQ==","shasum":"9d53fb56be3cee5ff551c8c61ab1897381afa3d4","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.b9d35b69.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1eMaCRA9TVsSAnZWagAA/4IP/jbr+BIgfMroFrQWh+6G\nz73KajufZ2Ht8QWMdR1tHREHuCpts6z7u2VmeaSe3smT8E8iQeWH9xrCywee\n7LvyUyxvFlgIO/9v+wSmOFCkz/yqpLp1+ZlMs/eFEgn7VKCr5MoJczhbvPRt\nj/es2bFszuh932/wpT0XFlqkLd2Kq70Hwxlr/Ppif7u84rrEWbNk/2Xnr647\nNM1Ac2mtMFKoX6bLi3vlrtMcScywM3pVxf6JRg3MA6Xyl1+4cEc/TJ2QvQ8s\n5yNd7HJyUGJczWKpBt3Vs7duSMwxsTkFeRjvPQhkZOuvlvbeqiRiWEZQY2lK\nUJcmiY6zJ6dN36ow6RTFqvLgK2nKFbjVKIjdVTwioRa+ewzzEr7M/Gna6f4k\ndiw8q0aDfPVPJMpdh+JC8FVShaVmtkeRAK21gnpcWxzm/dqqeB2ooitvOrPb\nnpIRaO7hYRKU+uwUUmPtEEEiHVEDNhDkgmR0sdxyGMSGEyb+dPBrODHJf1yX\nRA4o+uJya6tnO4oTOnGoQQHcDs96Ej/HTA6PLH+OfYf0vnahdaOKIS/V/wlX\nHhtPPHe8mG66QoCXPO3I6D01DXQ023i5bTXbkcBpGVytiX/V4iCYSx07R2W7\nXwz7/4t/8dfsoWa2is0nVc3dhn6HcSM6HqayBH2UiOqFepiQa5N7TdVS9NiQ\n3L8T\r\n=4y/w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4vRegzueJ8tmzl/UL6jMkky0mSlPeUxPmM7EhfNEEIAiA3Ous+1SfHITpGC53JhOysT34zh1rtVOV8PPlIWcJOnQ=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.b9d35b69.0_1641407258167_0.34927623277772346"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.2afff08e.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.2afff08e.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.2afff08e.0","@material/mwc-textfield":"0.26.0-canary.2afff08e.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"9bada09943cf93e3b0b697ef81fb87cc7b781379","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9bada09943cf93e3b0b697ef81fb87cc7b781379/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9bada09943cf93e3b0b697ef81fb87cc7b781379/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9bada09943cf93e3b0b697ef81fb87cc7b781379/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9bada09943cf93e3b0b697ef81fb87cc7b781379/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9bada09943cf93e3b0b697ef81fb87cc7b781379/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/9bada09943cf93e3b0b697ef81fb87cc7b781379/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.2afff08e.0","_nodeVersion":"14.18.2","_npmVersion":"lerna/3.22.1/node@v14.18.2+x64 (linux)","dist":{"integrity":"sha512-+W4yj++GwVg4bzN9CCEv6nSrC12exMieWGmq/M8y3tSQT/4Y/7O3LCI5zE8vf2+UpGjsDhZtgX9iyxs2mrfxcg==","shasum":"0ddb13d2bae0c91a1f3be8f8e8899d27af8e9ae3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.2afff08e.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh12vWCRA9TVsSAnZWagAA8LYP/3SeUFNRDYIKILBJOMnU\nPKgxjhssrlffHxmr6+fZK2DGI/fSArYe6jqQF1owNEHoE2VFOp2rTc42qV8L\nF9DMJL4eJPni74fihDF4fqAgXUYCj9hahG3C9BzFahMWG1qXx4eSM/MRbFzy\nUMp4ddmxAVT+dOxjfmf5nqHkdfd3NFlK8MV7ujYzQIQeXB0n88pooAanZGBY\nwzOKMz4tbVwM23vl/Y1KOARmsy6+jjbXu5th+oEcW17zKFPhE1zqRguo7R/7\n/bqhQVT2Hp1yQoSLZezDCgIgC9wyAvTy08ss+VSvHEOVi59ccetXhx51CBDu\nVOa9LL52wcVl8uF1pLhsSQBcse9y7J+kMQQz7x9YPfiyWtM/MvF2X67O+gz1\nKlVHb99neRhiaXI+nMtXEtoVjrOhaIGuh5A3nNs0OUTJG+dHjP3NhTIvLNIs\naKQVmWoymJxBqBIdTUe9SLCBqJNhZ1NJ63wF7qUg9BEmr9RGl/H3dYQB5woT\n6PR5l2E2uE9T4iYwxng8fhx8+r+vmgTLMIK2IGW7YJZhk5W+ay/YqZ3XbF0k\neLLhq/J/J3vw8rg69Yya5+XT3z7KFSPyfGDRBfK4Ghy60/sguy+HOpZV7zeJ\nkXowEmcWcKvW+yTS4AV9hr2IdTDozq2WjHCI5MpJsbo3YBf0N8bS9YUMxjgI\noC6q\r\n=3JPV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvF+hvmUI0EMjMI9jzHgvlI0bv7vWE7k3Lti3UkJUhvAiBF+JMGwJ0nMYi3ouWeg2vOqZdCtozeWP5Zw92Rg6PEjg=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.2afff08e.0_1641507798775_0.9762608011658833"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.893fc857.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.893fc857.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.893fc857.0","@material/mwc-textfield":"0.26.0-canary.893fc857.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"6cbd6b098ea6e47fddfd2a5875df6d41262b532d","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cbd6b098ea6e47fddfd2a5875df6d41262b532d/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cbd6b098ea6e47fddfd2a5875df6d41262b532d/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cbd6b098ea6e47fddfd2a5875df6d41262b532d/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cbd6b098ea6e47fddfd2a5875df6d41262b532d/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cbd6b098ea6e47fddfd2a5875df6d41262b532d/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6cbd6b098ea6e47fddfd2a5875df6d41262b532d/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.893fc857.0","_nodeVersion":"14.18.2","_npmVersion":"lerna/3.22.1/node@v14.18.2+x64 (linux)","dist":{"integrity":"sha512-Csknb1DgbJHGlFN/+732ZSGhr3LevpXSDjp0SKkGElobfFidBXZIZu17F3Xolua9Xa4czMnMElIUUksu/LZ9iA==","shasum":"504526f08cd6ff99a4b9809c5aa2b0c94b0e0100","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.893fc857.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2IxbCRA9TVsSAnZWagAAGqUP+gOS3cRk7ThB5qVATziN\nm9UUJcr6+o8IJB8NBpODQMAQ661t4zJwgVFALeE8cBK+wJMg/Wp0kOH8m3yV\npS1n0osqQ/Ph/JY5F6VJG1ydSzvcTM4EFZMTwUZFMnWevi2W7yhEFjk0Fs1S\nmfSwU3Jwgry2x/yH6bES4fWlFaxxrkB/sBMze9IzfZylLBZbcESqDaY/mR/Q\n1oaSeAM1tw0phXYRTB1+EYiwJ1UJdTcl+8NeroonTJXC93atcQIMajzFwSEX\nnutZW8kYOKhTW0NCIo0PPDMipS1D0Dwf4TiMymoF1YCXyGRydkVc8cz/0t0U\ntm7n2QLUmY6N9mfCnJuI/3uDZ3nXtOtPXq1JoAx2avIOKu/jC4Ug0em4kPoN\nsjQeAnThXa1pHRUXXUh5DzRUMGsvq9h0raWQW/mUNdzaZ98egcYfJzh1HAfZ\na/yONHWTQ64X3b31VghABbCzpWoaEgJL0ohDVYeHLvG7HsvTQhpaN2PedU0Z\nTy9MhaBlvhYrU0M/u8rrgcpXkvvwEN/p3dvCtp5XE+1iWlwIqy/APT2NwJ0z\nYB52eUqRGV7yAI3Ope7MhtJGPc9mGV4gXcJExw18T9xzI9jxTbJ84XmXh8Sh\nwAYuKz5xGfgumq3z6xptdhm5U7C0Ko58Dz4rYlwXZ3VrGP+Cdd6BPULv6T/j\nI/R2\r\n=mVko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHIi+SZ7w3zlpxFpN27fRLWU6V5mYBhcKob34zNadUHeAiEAxsQ6L/PoSEeuVGYccV7Ys6QCdCZtr1qQbAJik0CXtDI="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.893fc857.0_1641581659205_0.21895251151628248"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.69ba13b7.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.69ba13b7.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.69ba13b7.0","@material/mwc-textfield":"0.26.0-canary.69ba13b7.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"776b813e379c8d90abf2a0ded57168c12f62adff","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/776b813e379c8d90abf2a0ded57168c12f62adff/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/776b813e379c8d90abf2a0ded57168c12f62adff/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/776b813e379c8d90abf2a0ded57168c12f62adff/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/776b813e379c8d90abf2a0ded57168c12f62adff/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/776b813e379c8d90abf2a0ded57168c12f62adff/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/776b813e379c8d90abf2a0ded57168c12f62adff/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.69ba13b7.0","_nodeVersion":"14.18.3","_npmVersion":"lerna/3.22.1/node@v14.18.3+x64 (linux)","dist":{"integrity":"sha512-D7HJUhLT5e95UrTZBFXiGA9Vxtb7u+ewoE/lQaSBi5EDfbRzWeUo5HYKZqs0x9WPi9tDwWnyn4qSx4HN6GcWkQ==","shasum":"c6b49225cec83c2c14d4a7983612f4df17fedd33","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.69ba13b7.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6I+SCRA9TVsSAnZWagAAOCAQAKPp8PfBukokl97egrNb\nZ28Xp44mIld8Qwk2+IIMOkNax5wo6yJVypQhPjK+cx7p0QulW/D3w3xYd2ox\n8U74yrv5/Pyhh5/xyP3CSZ2o4KKVeV0yAb+utDjXB9SkRuo1Leo2ikc7ZYTN\nMXfwE5YeWPYWmNjYNrd2dUllXq+YkeKhOSxt8VbGQe3N2zeAYXrZnkMhA3sx\noR8ew3anALjdiclLe/dgN2f01rwSON9kYd56WV+5dZUbDqEcbVZ1S/PmHlN+\njQhBZdH8OVWAEoBhiCwiCtsb/NgUYSUS5zbAeB0T6GXBxF6pYXv+q9WPvJbA\nA/HZzbhqUQ4fV2rIgHXiYkVbawQRF/ZirvwFovCK3J3lGK7W7dohXKDYye5i\nearOJ+R1sHDgG/kwu+Kphs2BYMofBbb4boVe3QZAW8uLim+O53U3RZTH+k0T\nduh62syehTlZttFNg5ms9m7BzAH79FuoXBjnOwkVd5+AX1re3BkwXXYi0cnM\nfn0iJJwtmk3n7FIc9R8JoahuymIJ0cHUjbU1a/cOW34nax0mDto4lNlOwqgp\njs6Maxp2d9Pnw5vIjdPeE0Oa9xOpC8XlvwqCA3/yxvmyCF6X67gTXLEtrN84\nnMSQdXAe7+0O/o3W5zjAj8wmtGtEuVhi8lEw4XMZ8pK8H89gA4LVQSO3pCQw\nBCaZ\r\n=48iu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTTw5toSx7vB7Y9VpjhqOWUtsuwJYViYt2OX3ot9prPAiB/U10Haxz2aU6fbN9+alk+lIcX5gAnVReED4dblPJK/Q=="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.69ba13b7.0_1642631057783_0.5186029995523178"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0-canary.0af8ade5.0":{"name":"@material/mwc-textarea","version":"0.26.0-canary.0af8ade5.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"0.26.0-canary.0af8ade5.0","@material/mwc-textfield":"0.26.0-canary.0af8ade5.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"64bb121cb77aee6a854395ad838fce32a6051337","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/64bb121cb77aee6a854395ad838fce32a6051337/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/64bb121cb77aee6a854395ad838fce32a6051337/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/64bb121cb77aee6a854395ad838fce32a6051337/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/64bb121cb77aee6a854395ad838fce32a6051337/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/64bb121cb77aee6a854395ad838fce32a6051337/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/64bb121cb77aee6a854395ad838fce32a6051337/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0-canary.0af8ade5.0","_nodeVersion":"14.18.3","_npmVersion":"lerna/3.22.1/node@v14.18.3+x64 (linux)","dist":{"integrity":"sha512-lnW7I1oSpX22tLmBiPiZ/bI2TRlNRdZBQnZf7jzRdv4y5FO4S3rbJMk8kLXCHgZWNQft+FKGEP0VJli9+2H8Ug==","shasum":"6c1f30973c14bc7df95c56ffc1d23f507d79f147","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0-canary.0af8ade5.0.tgz","fileCount":13,"unpackedSize":39408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAZewCRA9TVsSAnZWagAAjlwP/2+NEhAbgW60zek0Hy5y\nPY5Nuvk6M7Wvj3AgFffLpT0UM4m0Km8OnUbSOCLRdMKRp5XqURrqLE4vUSd8\nYrifikJ+Wy/etlTGKCHsYCegOSjmGr6RKEli1jJMoMWO29rSzOq+gqnQNYge\n7MGm3PeVNGoy8ozgXqECaJCpBnYJgiqF8LNrUeGhzpYETSCrOTg8tUX0/pUK\nN2S0/bWRBV0mF7ZYijQ1iBGFyKGChXb2qLuc5iFfty5CxFO4ieyQcoCCk8wd\nOx6uAxpFaNaz+ulDAYvvF+BtU1cs+DPt+KbX+P17LUZk40vgee/tICItGTlN\nzk5EJMZledQ7LUP/HMjxqt/Z1O1437LxF07rqXXn1Ww6JNwzyw6wMFD217aD\nkkDj4oDMNY9HF4B3b5udww+Umg8yadmux1XkEMF2kW4T9BXEQPdLBq9xeiAb\ng+Q/KOQxB98odqwoMDmHhGrdzF/dr6v8OTf1gFin67gxwwVTCF0zmG10wNrj\nmir5BblnlxIov5S3inO6gZUpt5ykc+eikWmz3f54BNtBUSSC8pjVgpLpQijs\noaytJ3DHx02VtCrUDbmopQDdNiSIJig2pY/jU4iSLShPx3ScqUQGV7ue8NFB\nHFoG3FuV8V8UpZ+ln+VaXR05LpcKS9gi+i7ky9WeHsr+0zRx6QckH8l9OiZH\nihUY\r\n=hYDb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3/d9QBDlMtvyGXggFq21mgzESpHwzr9VRye6q/EctXAiEAmHIb2VwYhIZH7JXCbHOITTOintYPB2JkEWihu7kHc6k="}]},"_npmUser":{"name":"material-admin","email":"aprigogin+npm@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0-canary.0af8ade5.0_1644271536767_0.059443130536257716"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.0":{"name":"@material/mwc-textarea","version":"0.26.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.26.0","@material/mwc-textfield":"^0.26.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"056b3ceffbe2fe3408dbdbb319932da85637e779","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.0","_nodeVersion":"16.14.2","_npmVersion":"lerna/3.22.1/node@v16.14.2+x64 (darwin)","dist":{"integrity":"sha512-amuLbZQERDIpMcxq5cVDB2+m3pN6nFFLlUvO/qqGSkw7SahEqV4a3FTJwo6k9k8trQNcP/43nZW6bkpoJKgUBg==","shasum":"157aa1bea48f058957294e13a9df46c818b7c3fa","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.0.tgz","fileCount":13,"unpackedSize":39326,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbLvbPQdLKxPsu2ybmneSwyRP+SCDFpiaC12wbos4vqwIgLvk+8jZW9bm/ZUPWMZt7b9LA8dILvFG5QcGjbc3OrDc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicWbAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMbg/9FUWslCks0BKoLeQBFBwUlvKuHUnZW0IWc58rSV31BX/SflhZ\r\nQ/JtymVfxViAwv2Dx7871lsgyKdS5tba2aI618lPFpDssbycqpIBOy+Pc9eX\r\nVWseLzogYIvjJcR1PJnAXGIQHpJqyf46HOPpKhevk8/L7dTEE2AuPQw5ZN1G\r\nFaHrOpO8fxM70pcalSfwKUmvOnU5bqdxd9PQXhKOgxw3deWrvYe+LgKYA/qe\r\nMQ9DumjEGZAKF+zBAEl8LcKsRWPbyUktR+3+mucvJSCsGglzCYWHKIhIXQFO\r\n4Hx6yI+bK4oeORwgyTzHZBbAbzawBuQIUOtnzd8CAtijj9n8KhM3l6LSzAn/\r\nVVM8zqHHgnB4zP8D0bYve+sjEobkDvrM79KQ97pGYq33Q7CRyd27KxAdhvgH\r\niEYB87cO7Yv7e2SF1UoqxAEp2ZmApFuCfLkkPXjuZs5VNo3TMzBuPn0Enr4d\r\nPjdPJjAu8FLqXyXxpNh6Uqni9C1zCH/32AakYoSEqmxcOAmfoNCcXcMGZvCc\r\n0HmrA1N5ikNLi5uUJGH/wjrlv2SGWlc6NlVI+FkA2/XW8eOOn1J+uPVFs8l3\r\ndEG9gIt2MVjaDgtQdnDrxfobGovIWlbh5AypqRNrqSoJ8p5gmiN2Nb3deasT\r\nHLkjksK4h8amQXrGxshm6pVbZOt21lQq8i8=\r\n=13au\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.0_1651599039875_0.6605134554393615"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.26.1":{"name":"@material/mwc-textarea","version":"0.26.1","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.26.1","@material/mwc-textfield":"^0.26.1","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"06b516b7f91867acd0cbe5676767aea8f490cbee","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.26.1","_nodeVersion":"16.14.2","_npmVersion":"lerna/3.22.1/node@v16.14.2+x64 (darwin)","dist":{"integrity":"sha512-N2VkEFJV9RCXQS2Nx/qnb22MfhsoA47SLD1wOZNbrGhK1h01TKFH5TYmmej799NHE4ZNLaGbZwpNfVu8LmZdkw==","shasum":"b82c1ddcff5b03811481bc8c13e62093df7ca34e","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.26.1.tgz","fileCount":13,"unpackedSize":39402,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG8tSfNfvLhRiyMcyrPj4VLWKtvk20RwI2QofD9YPYygIgJ9jC2AGiJ/kjxhPbMB963KlbpgNXrfnRz6/UpQta4Qo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieXo9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFNBAAjyCK+mBiTz79IckQxsyO60TDVlXraurj85O13T2qRblO6Nzq\r\n63XRm8e2lOrTEAnZeWfOCO0UJLUMjtD+mIEGZLrrn6krSK13R27WPI2b/jD3\r\nnv37wpx4RpPwOWDh8r84xpNHxBi1IeeBqC3aIOF4X/HeOcGkFWGVSnJyEG3Y\r\nY7s5rhGIcAWCwAvQMPOJ/oEKfk+1VRcgAIh1E0Oih+UEY0WclAS7GB0dM6rB\r\nvbYIfynHRv6pJPgXKbucCDMJEg9HkFquNYKEahT4PXp303P1eoFBK85Ght/0\r\nmSbfx6LbeuG2I7XTVoy0HwQAd8pTyRY8pMn9F5NJD1aq8XJCMPZzTu4Xvys6\r\njjaBadiIg744xILDP6nIAcVgavj6fb0c5gaJ7Q/jzvD7RfNFnpyaSDFqCPN4\r\n/kKW3D2/GPBby0xekbYYi2CULX8QjTpOHMRb47Wlktg1rwEzdf7Ef90jjtLR\r\nD3Rd2LNw3nIYxJE08/Y2D/aS0x7r3JmzJunlQcCS3L0jEQoRbVd8lyzskfTT\r\n91Exqy0pED6Q4ZRm1djXPCeR95eplTbLI+gTxOxjsERTfRS0jTqe7rUtFn1K\r\nR+8GlPEheZSamk0bkeM4ajIY+KX0XrOci64whKkJRT59trtxgASnxCZnXpYu\r\nwNJlCRdz/dIuxTJzK205LBLr6mQ6Fn5Kulg=\r\n=z2qr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asyncliz","email":"asyncliz@gmail.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.26.1_1652128317322_0.0471870905408347"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"},"0.27.0":{"name":"@material/mwc-textarea","version":"0.27.0","description":"Material Design textarea web component","keywords":["material design","web components","textarea"],"main":"mwc-textarea.js","module":"mwc-textarea.js","repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"license":"Apache-2.0","dependencies":{"@material/mwc-base":"^0.27.0","@material/mwc-textfield":"^0.27.0","lit":"^2.0.0","tslib":"^2.0.1"},"scripts":{"build:style":"node ../../scripts/sass-to-lit-css/index.js mwc-textarea.scss"},"publishConfig":{"access":"public"},"gitHead":"c1e876a15bc028034781984538ea803ba67dbed3","bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"},"homepage":"https://github.com/material-components/material-components-web-components#readme","_id":"@material/mwc-textarea@0.27.0","_nodeVersion":"18.6.0","_npmVersion":"lerna/3.22.1/node@v18.6.0+arm64 (darwin)","dist":{"integrity":"sha512-4srpZ+//Ce0A+OZ3NVjv/YIDDxnpStmpZwTGICMCGsQzQqHyGDX17NhL5mGP8xGguma/ZIgcY6gm7+UQWaTx4g==","shasum":"1aa0aabee0cc857935e981602ebfab15372e4ce3","tarball":"https://registry.npmjs.org/@material/mwc-textarea/-/mwc-textarea-0.27.0.tgz","fileCount":13,"unpackedSize":39402,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1WCj8CZe5zfwQ744/2aBLnd78DYbOHFG+HrFmcUTT0wIhAKLKKHD9GqA6AvXetjBFvSeq1kR9pfipNwEUXBK10dyz"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9qYOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLCg/8Df7Km0y0dhPosEYLlQqwsDOt0DCfsh0Eo9oWOlQ3cbAlS2l/\r\nYEB9hToqw4Akljxp6KOvgpkodqptUoEclXMNMMRI5bT0mRhplQKO7NCqye2F\r\ny0iSlew4SvW5lG8C3sT7vJqJAfWGf7synxrAyj2ClOQr4v21iYwGob79V+Tj\r\nCkBBLO7eBOJD1E5EKJuN4jDooU4r8lLNsFT8QnKfxV2xT2Kdjb24zhpudu0n\r\n+fVxk/zpF1ElXyRD5w3IoyN81AFWicA5TKz5MGCtgOkKvcWqzkdTHnmj5hW9\r\nW5HPmO8Ed4sIU1Q91P+KrzUVCMqUW+ZsC1gLYtKO8q3DrSTvJx/M4ikYynFC\r\nBlrlAx2El+KTFSuAvZBoFhLGUbH3Qj/2Lz/zgrrpWqWVyjZcPNVw4oFb1LgD\r\nomh3PEkncFI01vOd39fiuSzNFnmLswFDxiJZPuE7MomO21DjscB+VxR73Zvz\r\nJ5/yb5UwPIf6I42GSZrnZ1zpYIgVYvEhz2Rp4MK6dDFFvC+AELRmvvSKsryg\r\nDbE9dcXLjopiPtFCcSqkcpy9i+ITmSMTzdu+nLlOQWU764IZNbpERt1jd3Sy\r\nXy4v9xErND/oVAMFIed1Sn16hNSNk0kalpAha8voaSDjamJI0Y4v50v/D702\r\nn/QnM0Byle/pUjBexY2VMbsUboxrbLC5uO4=\r\n=bas1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"emarquez","email":"emarquez@google.com"},"directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mwc-textarea_0.27.0_1660331534000_0.4633740649530571"},"_hasShrinkwrap":false,"deprecated":"MWC beta is longer supported. Please upgrade to @material/web"}},"time":{"created":"2019-08-27T21:23:57.228Z","0.7.0":"2019-08-27T21:23:57.607Z","modified":"2024-04-04T18:59:11.287Z","0.7.1":"2019-08-28T02:54:39.082Z","0.8.0":"2019-09-04T00:04:45.934Z","0.9.0":"2019-09-27T01:36:23.797Z","0.9.1":"2019-09-30T21:05:16.724Z","0.10.0":"2019-10-11T23:28:27.162Z","0.11.0":"2019-11-26T21:49:42.415Z","0.11.1":"2019-11-27T00:26:44.230Z","0.12.0":"2019-12-17T23:47:59.219Z","0.13.0":"2020-02-04T04:46:43.917Z","0.14.0-canary.f790f713.0":"2020-02-28T02:28:38.610Z","0.14.0-canary.c759cfbc.0":"2020-02-29T00:05:14.762Z","0.14.0-canary.97ef53d8.0":"2020-02-29T00:18:38.509Z","0.14.0-canary.24f5fa6e.0":"2020-02-29T01:09:02.329Z","0.14.0-canary.960e214f.0":"2020-02-29T03:09:23.055Z","0.14.0-canary.a2f046f5.0":"2020-03-03T00:56:58.979Z","0.14.0-canary.024f371a.0":"2020-03-03T01:29:15.653Z","0.14.0-canary.2f164110.0":"2020-03-03T21:34:06.796Z","0.14.0-canary.edd465cd.0":"2020-03-04T00:11:02.237Z","0.14.0-canary.2b02d017.0":"2020-03-04T20:19:31.462Z","0.14.0-canary.cbdfe453.0":"2020-03-04T21:44:58.122Z","0.14.0-canary.02aa8a98.0":"2020-03-06T22:53:43.883Z","0.14.0-canary.7cd5aad6.0":"2020-03-09T23:20:30.981Z","0.14.0-canary.3a79dfa6.0":"2020-03-10T02:56:34.516Z","0.14.0-canary.22e0f5c9.0":"2020-03-10T03:00:35.038Z","0.14.0-canary.f23a1d1b.0":"2020-03-10T20:56:52.640Z","0.14.0-canary.34b2d69a.0":"2020-03-10T21:15:05.670Z","0.14.0-canary.dc04abe1.0":"2020-03-10T22:02:37.674Z","0.14.0-canary.04ccbc88.0":"2020-03-11T00:35:12.034Z","0.14.0-canary.55338c25.0":"2020-03-11T06:31:47.889Z","0.14.0-canary.b7e388f3.0":"2020-03-11T20:20:04.721Z","0.14.0-canary.b3211481.0":"2020-03-11T20:24:15.318Z","0.14.0-canary.0b5c7f23.0":"2020-03-11T21:54:10.210Z","0.14.0-canary.6c0f0b27.0":"2020-03-12T21:17:31.485Z","0.14.0-canary.b6c53425.0":"2020-03-13T16:55:38.391Z","0.14.0-canary.306cabed.0":"2020-03-17T21:18:01.525Z","0.14.0-canary.4e250cbc.0":"2020-03-17T21:24:13.735Z","0.14.0-canary.ff82d9ec.0":"2020-03-18T18:19:58.671Z","0.14.0-canary.f50f48ef.0":"2020-03-19T18:55:40.466Z","0.14.0-canary.134cf877.0":"2020-03-19T20:39:32.163Z","0.14.0":"2020-03-19T21:28:45.533Z","0.15.0-canary.2c1a4913.0":"2020-03-19T23:01:10.695Z","0.15.0-canary.3a6e481a.0":"2020-03-20T18:13:27.733Z","0.15.0-canary.603d6eb3.0":"2020-03-20T21:36:11.511Z","0.15.0-canary.05c6a93c.0":"2020-03-23T16:36:46.534Z","0.14.1":"2020-03-23T17:57:47.344Z","0.15.0-canary.4e6be3f4.0":"2020-03-24T20:59:09.410Z","0.15.0-canary.c29a683d.0":"2020-03-24T21:16:53.947Z","0.15.0-canary.fca3dd9d.0":"2020-03-24T23:43:23.361Z","0.15.0-canary.1e73da49.0":"2020-03-25T21:30:16.245Z","0.15.0-canary.bb6dfc5a.0":"2020-03-27T01:23:21.592Z","0.15.0-canary.1884603d.0":"2020-03-27T19:55:45.590Z","0.15.0-canary.aff73cab.0":"2020-03-27T21:14:33.469Z","0.15.0-canary.63168f61.0":"2020-03-31T18:12:44.339Z","0.15.0-canary.9fb79b3e.0":"2020-03-31T21:20:30.850Z","0.15.0-canary.9bd3e9e2.0":"2020-04-01T00:16:31.339Z","0.15.0-canary.072084ab.0":"2020-04-01T18:40:08.591Z","0.15.0-canary.4dec04af.0":"2020-04-03T20:30:04.525Z","0.15.0-canary.9b676354.0":"2020-04-03T20:30:20.732Z","0.15.0-canary.6b946095.0":"2020-04-03T21:24:32.281Z","0.15.0-canary.5ccbfaa2.0":"2020-04-03T21:30:10.034Z","0.15.0-canary.a0ab8772.0":"2020-04-07T20:09:13.437Z","0.15.0-canary.8d352305.0":"2020-04-07T21:42:22.055Z","0.15.0-canary.31eac79f.0":"2020-04-07T21:57:40.434Z","0.15.0-canary.ba05565e.0":"2020-04-08T17:32:50.380Z","0.15.0-canary.25099f79.0":"2020-04-08T21:30:54.959Z","0.15.0-canary.447e31c6.0":"2020-04-09T01:16:48.671Z","0.15.0-canary.d6dd84f7.0":"2020-04-09T01:25:25.946Z","0.15.0-canary.9b03ee68.0":"2020-04-09T20:03:08.914Z","0.15.0-canary.bbc25b10.0":"2020-04-10T22:45:57.056Z","0.15.0-canary.339cbfd4.0":"2020-04-15T17:38:58.994Z","0.15.0-canary.b74ff19f.0":"2020-04-15T20:04:43.377Z","0.15.0-canary.aaa16853.0":"2020-04-15T22:41:17.917Z","0.15.0-canary.826b23e7.0":"2020-04-16T18:57:24.465Z","0.15.0-canary.e1ad2b2f.0":"2020-04-17T23:01:46.873Z","0.15.0-canary.bade5580.0":"2020-04-17T23:19:32.562Z","0.15.0-canary.dae38247.0":"2020-04-18T00:16:26.349Z","0.15.0-canary.a04c0b82.0":"2020-04-18T00:34:34.698Z","0.15.0-canary.715decfe.0":"2020-04-20T18:35:37.926Z","0.15.0-canary.c862cd04.0":"2020-04-20T21:34:33.872Z","0.15.0-canary.e9b01b35.0":"2020-04-20T23:29:42.411Z","0.15.0-canary.ee7e8989.0":"2020-04-21T00:51:34.120Z","0.15.0-canary.9bf47ffa.0":"2020-04-21T18:38:30.897Z","0.15.0-canary.078dbd98.0":"2020-04-21T21:12:35.436Z","0.15.0-canary.953015d6.0":"2020-04-21T21:35:57.396Z","0.15.0-canary.c360ec63.0":"2020-04-21T21:59:19.406Z","0.15.0-canary.d71b65aa.0":"2020-04-21T22:37:58.881Z","0.15.0-canary.58d51135.0":"2020-04-23T00:45:09.106Z","0.15.0-canary.d0af8ba3.0":"2020-04-23T18:10:23.727Z","0.15.0-canary.8872b17b.0":"2020-04-23T20:41:18.027Z","0.15.0-canary.eca1a610.0":"2020-04-23T21:43:17.327Z","0.15.0-canary.baaf529e.0":"2020-04-23T22:44:35.750Z","0.15.0-canary.7a7992a8.0":"2020-04-23T23:14:39.186Z","0.15.0-canary.1150d64d.0":"2020-04-24T00:18:54.904Z","0.15.0-canary.dad3f828.0":"2020-04-25T00:43:01.797Z","0.15.0-canary.1bcdb47e.0":"2020-04-28T01:13:04.790Z","0.15.0-canary.86ff1b9f.0":"2020-04-28T02:56:00.837Z","0.15.0-canary.54a86b20.0":"2020-04-28T03:18:18.012Z","0.15.0-canary.938fd24b.0":"2020-04-30T01:27:30.867Z","0.15.0-canary.39e9a008.0":"2020-04-30T02:13:51.304Z","0.15.0-canary.f3b365de.0":"2020-04-30T08:27:38.779Z","0.15.0-canary.cdbdf807.0":"2020-05-01T00:15:04.778Z","0.15.0-canary.9995ae17.0":"2020-05-01T18:45:28.347Z","0.15.0-canary.457bf035.0":"2020-05-01T20:51:07.870Z","0.15.0-canary.2381fd02.0":"2020-05-01T21:25:54.386Z","0.15.0-canary.b2ca9b57.0":"2020-05-01T21:36:37.908Z","0.15.0-canary.b2b088e7.0":"2020-05-01T22:33:56.359Z","0.15.0-canary.fdd8f69e.0":"2020-05-02T00:16:48.769Z","0.15.0-canary.730f45a8.0":"2020-05-03T20:45:12.329Z","0.15.0-canary.4219bd20.0":"2020-05-04T23:32:27.227Z","0.15.0-canary.1d83cf6d.0":"2020-05-05T17:12:25.551Z","0.15.0-canary.3bfc63aa.0":"2020-05-05T18:14:03.758Z","0.15.0":"2020-05-05T22:36:22.789Z","0.16.0-canary.1f4e3d1c.0":"2020-05-06T22:04:44.495Z","0.16.0-canary.bc8759d5.0":"2020-05-07T23:15:03.133Z","0.16.0-canary.d1379acf.0":"2020-05-08T17:41:38.228Z","0.16.0-canary.58d51fc0.0":"2020-05-08T19:17:49.086Z","0.16.0-canary.588062d7.0":"2020-05-08T21:24:04.413Z","0.16.0-canary.fa21f639.0":"2020-05-11T17:30:23.179Z","0.16.0-canary.2772c509.0":"2020-05-11T18:36:56.792Z","0.16.0-canary.fc4796d5.0":"2020-05-11T20:05:35.316Z","0.16.0-canary.0d1c5f2c.0":"2020-05-11T21:20:06.174Z","0.16.0-canary.d083d93a.0":"2020-05-12T00:18:31.349Z","0.16.0-canary.c95d429c.0":"2020-05-12T21:37:13.816Z","0.16.0-canary.0c1ad726.0":"2020-05-13T00:34:33.006Z","0.16.0-canary.8b6a4700.0":"2020-05-13T17:19:42.414Z","0.16.0-canary.3270effb.0":"2020-05-13T21:24:52.423Z","0.16.0-canary.832e64f7.0":"2020-05-14T00:52:28.644Z","0.16.0-canary.472fc4fc.0":"2020-05-14T03:36:37.144Z","0.16.0-canary.4dcd7dd5.0":"2020-05-14T16:25:25.179Z","0.16.0-canary.bcd3400d.0":"2020-05-15T22:50:08.425Z","0.16.0-canary.91f63179.0":"2020-05-16T00:34:47.990Z","0.16.0-canary.b8aafb56.0":"2020-05-18T18:31:58.107Z","0.16.0-canary.a564b194.0":"2020-05-18T23:03:51.090Z","0.16.0-canary.ef56465b.0":"2020-05-19T03:48:22.362Z","0.16.0-canary.c22dcd71.0":"2020-05-19T17:24:36.721Z","0.16.0-canary.6eb62388.0":"2020-05-19T20:38:39.607Z","0.16.0-canary.9bc3230c.0":"2020-05-19T21:39:08.399Z","0.16.0-canary.421a6856.0":"2020-05-20T05:24:31.278Z","0.16.0-canary.761aa6f2.0":"2020-05-20T21:31:14.656Z","0.16.0-canary.f8654c40.0":"2020-05-20T21:40:39.159Z","0.16.0-canary.05f3853e.0":"2020-05-21T17:33:32.765Z","0.16.0-canary.5fe61f4e.0":"2020-05-21T23:07:57.272Z","0.16.0-canary.17d33745.0":"2020-05-26T16:14:05.246Z","0.16.0-canary.e8b52f5b.0":"2020-05-26T18:43:07.605Z","0.16.0-canary.09afa0a9.0":"2020-05-26T21:44:24.861Z","0.16.0-canary.58bc9166.0":"2020-05-27T00:30:36.054Z","0.16.0-canary.43bde144.0":"2020-05-27T18:29:30.986Z","0.16.0-canary.51067bbc.0":"2020-05-27T20:03:28.170Z","0.16.0-canary.92751ffa.0":"2020-05-27T21:36:47.082Z","0.16.0-canary.aa2b40bb.0":"2020-05-28T19:15:18.635Z","0.16.0-canary.1a870a01.0":"2020-05-28T21:18:53.423Z","0.16.0-canary.ad57d086.0":"2020-05-29T23:49:26.401Z","0.16.0-canary.3bf2b4d5.0":"2020-05-30T00:36:56.932Z","0.16.0-canary.ac05f090.0":"2020-05-30T02:50:04.702Z","0.16.0-canary.0ba7b095.0":"2020-05-30T02:56:44.582Z","0.16.0-canary.5eaa9bac.0":"2020-06-01T23:29:10.602Z","0.16.0-canary.5677ac20.0":"2020-06-01T23:57:28.289Z","0.16.0-canary.7ac6bff4.0":"2020-06-02T00:15:54.629Z","0.16.0-canary.d45622aa.0":"2020-06-02T23:46:10.505Z","0.16.0-canary.dc26c709.0":"2020-06-05T20:21:17.165Z","0.16.0-canary.b9baf6db.0":"2020-06-05T20:22:41.468Z","0.16.0-canary.e0b8c9d0.0":"2020-06-05T23:05:11.218Z","0.16.0-canary.51552859.0":"2020-06-10T00:08:22.751Z","0.16.0-canary.2e269285.0":"2020-06-10T01:35:57.758Z","0.16.0-canary.be138b01.0":"2020-06-10T20:49:20.994Z","0.16.0-canary.04bccf5a.0":"2020-06-16T00:59:13.353Z","0.16.0-canary.b44dea36.0":"2020-06-16T20:58:04.367Z","0.16.0-canary.e2577e87.0":"2020-06-16T21:08:57.345Z","0.16.0-canary.58b73343.0":"2020-06-16T21:23:57.091Z","0.16.0-canary.f155c058.0":"2020-06-18T18:08:06.708Z","0.16.0-canary.309779d2.0":"2020-06-18T23:58:54.437Z","0.16.0-canary.e7649968.0":"2020-06-19T21:41:00.410Z","0.16.0-canary.8e21c78b.0":"2020-06-22T10:37:58.203Z","0.16.0-canary.6db76faf.0":"2020-06-22T21:13:08.899Z","0.16.0-canary.c4dd9684.0":"2020-06-23T15:15:18.584Z","0.16.0-canary.b3e53981.0":"2020-06-24T00:39:33.198Z","0.16.0-canary.b9468f77.0":"2020-06-24T21:54:39.922Z","0.16.0-canary.eb790e49.0":"2020-06-25T21:19:11.460Z","0.16.0-canary.9aa1a5c5.0":"2020-06-26T17:05:32.096Z","0.16.0-canary.d36e9861.0":"2020-06-26T17:36:42.032Z","0.16.0-canary.155c2f85.0":"2020-06-26T23:30:23.502Z","0.16.0-canary.340c9c40.0":"2020-06-26T23:38:33.044Z","0.16.0-canary.a3384d2d.0":"2020-06-30T21:00:43.585Z","0.17.0-canary.6d056c96.0":"2020-06-30T21:10:04.143Z","0.16.1":"2020-06-30T21:14:59.153Z","0.17.0-canary.f7e37607.0":"2020-06-30T21:44:32.172Z","0.17.0":"2020-07-01T19:44:32.986Z","0.18.0-canary.0afbfef2.0":"2020-07-01T19:44:44.299Z","0.18.0-canary.fd970958.0":"2020-07-01T23:33:45.346Z","0.18.0-canary.fd44be19.0":"2020-07-02T05:48:48.140Z","0.17.2":"2020-07-02T05:58:30.284Z","0.18.0-canary.ca6fc6de.0":"2020-07-02T05:59:39.859Z","0.18.0-canary.79f1ec2a.0":"2020-07-07T17:32:55.598Z","0.18.0-canary.a7bc45ae.0":"2020-07-09T17:23:34.488Z","0.18.0-canary.b184bc1c.0":"2020-07-09T17:32:45.635Z","0.18.0-canary.b39fde62.0":"2020-07-09T17:37:59.458Z","0.18.0-canary.dfdd8d6c.0":"2020-07-09T18:26:04.301Z","0.18.0-canary.11cf2694.0":"2020-07-09T20:43:49.107Z","0.18.0-canary.436d66e9.0":"2020-07-09T20:48:37.230Z","0.18.0-canary.3a44d36b.0":"2020-07-10T00:37:38.409Z","0.18.0-canary.ec11ae6e.0":"2020-07-10T17:53:24.322Z","0.18.0-canary.17f6cf27.0":"2020-07-10T18:33:04.994Z","0.18.0-canary.efdfbc21.0":"2020-07-10T18:44:53.942Z","0.18.0-canary.bae4339a.0":"2020-07-14T16:42:15.866Z","0.18.0-canary.28eac13b.0":"2020-07-14T22:23:43.948Z","0.18.0-canary.44966b65.0":"2020-07-15T18:05:13.006Z","0.18.0-canary.3ef0ef60.0":"2020-07-16T16:55:04.130Z","0.18.0-canary.fcebf9e6.0":"2020-07-20T18:46:21.021Z","0.18.0-canary.b6a772df.0":"2020-07-20T22:46:48.851Z","0.18.0-canary.f6a6ca38.0":"2020-07-21T16:41:09.182Z","0.18.0-canary.647dd6b7.0":"2020-07-21T18:44:38.724Z","0.18.0-canary.3cb7406f.0":"2020-07-22T18:57:49.460Z","0.18.0-canary.5717a5a1.0":"2020-07-22T21:40:11.358Z","0.18.0-canary.d84cd4b2.0":"2020-07-22T21:42:14.482Z","0.18.0-canary.f279e7fc.0":"2020-07-22T22:01:06.851Z","0.18.0-canary.f181e3bc.0":"2020-07-22T22:02:59.931Z","0.18.0-canary.346a622a.0":"2020-07-22T23:40:16.665Z","0.18.0-canary.c9e8a848.0":"2020-07-23T01:10:43.012Z","0.18.0-canary.718c385c.0":"2020-07-23T20:06:47.873Z","0.18.0-canary.cd516a27.0":"2020-07-24T19:11:08.878Z","0.18.0-canary.1f082191.0":"2020-07-24T19:16:29.406Z","0.18.0-canary.ea3e82dc.0":"2020-07-24T19:21:38.583Z","0.18.0-canary.94987b64.0":"2020-07-24T20:26:50.043Z","0.18.0-canary.ff49b7e2.0":"2020-07-27T19:05:08.726Z","0.18.0-canary.3d334ccc.0":"2020-07-28T16:15:33.167Z","0.18.0-canary.82ac569e.0":"2020-07-28T18:42:43.857Z","0.18.0-canary.99df7397.0":"2020-07-29T02:40:53.720Z","0.18.0-canary.45493e05.0":"2020-07-29T17:16:56.431Z","0.18.0-canary.f2ab0a95.0":"2020-07-29T17:21:48.869Z","0.18.0-canary.45f9eddc.0":"2020-07-30T00:55:09.979Z","0.18.0-canary.b64663ea.0":"2020-07-30T17:43:39.804Z","0.18.0-canary.9a1a4d2d.0":"2020-07-30T21:04:36.535Z","0.18.0-canary.887c2848.0":"2020-07-30T22:05:56.548Z","0.18.0-canary.354eb695.0":"2020-07-30T23:58:13.281Z","0.18.0-canary.7beb236c.0":"2020-07-31T17:40:51.208Z","0.18.0-canary.c44acc0c.0":"2020-07-31T21:11:28.737Z","0.18.0-canary.779853ff.0":"2020-08-03T17:23:46.799Z","0.18.0-canary.8aaf270b.0":"2020-08-03T18:41:07.585Z","0.18.0-canary.5cde9f12.0":"2020-08-03T19:01:28.607Z","0.18.0-canary.1607ec53.0":"2020-08-03T19:47:02.221Z","0.18.0-canary.678b30e3.0":"2020-08-03T19:50:56.163Z","0.18.0-canary.21c55569.0":"2020-08-03T19:56:59.345Z","0.19.0-canary.907d4d7d.0":"2020-08-03T21:22:48.506Z","0.18.0":"2020-08-03T21:24:35.822Z","0.19.0-canary.f7958e4a.0":"2020-08-04T02:07:10.905Z","0.19.0-canary.f8ceaf79.0":"2020-08-04T19:18:28.339Z","0.19.0-canary.6b9e385a.0":"2020-08-04T21:30:12.720Z","0.19.0-canary.9a7e6d2a.0":"2020-08-05T03:46:17.916Z","0.19.0-canary.188f3f1c.0":"2020-08-05T18:13:45.300Z","0.19.0-canary.b6106add.0":"2020-08-05T20:49:42.301Z","0.19.0-canary.ebb4c667.0":"2020-08-06T00:19:05.742Z","0.19.0-canary.aa44289e.0":"2020-08-06T18:27:44.040Z","0.19.0-canary.e6b0816b.0":"2020-08-07T18:44:07.636Z","0.19.0-canary.96d15938.0":"2020-08-07T20:29:15.958Z","0.19.0-canary.9d991c8c.0":"2020-08-07T22:08:47.468Z","0.19.0-canary.13bfbd72.0":"2020-08-10T19:27:43.293Z","0.19.0-canary.30b1b258.0":"2020-08-10T20:07:18.345Z","0.19.0-canary.1583e263.0":"2020-08-11T23:11:06.789Z","0.19.0-canary.fefb1a93.0":"2020-08-12T00:25:32.485Z","0.19.0-canary.1ac5b9d4.0":"2020-08-12T18:27:45.762Z","0.19.0-canary.f17f5052.0":"2020-08-13T17:14:49.799Z","0.19.0-canary.80b5d20d.0":"2020-08-13T18:17:38.511Z","0.19.0-canary.758635ed.0":"2020-08-14T17:17:07.521Z","0.19.0-canary.18d6b808.0":"2020-08-14T23:08:26.114Z","0.19.0-canary.5f8ffbd1.0":"2020-08-17T22:15:58.893Z","0.19.0-canary.8604d59e.0":"2020-08-18T01:02:58.372Z","0.19.0-canary.1d7d5e34.0":"2020-08-18T01:09:21.340Z","0.19.0-canary.9cc95c07.0":"2020-08-18T01:16:59.243Z","0.19.0-canary.9f65ced3.0":"2020-08-18T20:16:33.138Z","0.19.0-canary.5962b365.0":"2020-08-19T20:29:25.566Z","0.19.0-canary.9c9ec756.0":"2020-08-20T18:56:13.692Z","0.19.0-canary.fa0ad66a.0":"2020-08-20T20:35:19.358Z","0.19.0-canary.06ecdd6b.0":"2020-08-20T21:34:18.480Z","0.19.0-canary.2bca2318.0":"2020-08-21T17:52:46.740Z","0.19.0-canary.6aa47265.0":"2020-08-21T18:16:32.282Z","0.19.0-canary.e7202a07.0":"2020-08-21T19:24:00.491Z","0.19.0-canary.f208201e.0":"2020-08-24T19:03:33.411Z","0.19.0-canary.14a172db.0":"2020-08-25T19:48:18.150Z","0.19.0-canary.e6c1038d.0":"2020-08-27T19:37:26.745Z","0.19.0-canary.34012082.0":"2020-08-27T19:48:45.828Z","0.19.0-canary.c073f7b8.0":"2020-08-28T17:12:30.830Z","0.19.0-canary.b7ae68ff.0":"2020-08-29T01:27:26.977Z","0.19.0-canary.697e3879.0":"2020-09-02T00:13:40.950Z","0.19.0-canary.eafb7991.0":"2020-09-02T02:18:41.437Z","0.19.0-canary.606642ec.0":"2020-09-02T21:36:06.489Z","0.19.0-canary.ddf05c42.0":"2020-09-03T13:53:29.420Z","0.19.0-canary.b889e6dc.0":"2020-09-03T14:11:44.951Z","0.19.0-canary.aabeceb0.0":"2020-09-03T19:57:59.455Z","0.19.0-canary.d8cca3a6.0":"2020-09-03T21:31:58.756Z","0.19.0-canary.26d34b2e.0":"2020-09-03T21:57:14.426Z","0.19.0-canary.a1c44494.0":"2020-09-09T22:07:59.765Z","0.19.0-canary.be1cd1e9.0":"2020-09-10T16:41:28.052Z","0.19.0-canary.f094c0ce.0":"2020-09-10T17:36:39.491Z","0.19.0-canary.c1261e7d.0":"2020-09-11T02:26:48.044Z","0.19.0-canary.9b39ed1e.0":"2020-09-11T02:27:36.073Z","0.19.0-canary.e67214b3.0":"2020-09-11T02:31:59.711Z","0.19.0-canary.36f5da28.0":"2020-09-11T02:34:40.364Z","0.19.0-canary.3babab12.0":"2020-09-11T02:37:44.653Z","0.19.0-canary.a4481e6f.0":"2020-09-11T02:49:42.057Z","0.19.0-canary.a9177836.0":"2020-09-11T17:47:55.846Z","0.19.0-canary.b102a3c8.0":"2020-09-14T20:13:45.486Z","0.19.0-canary.a7fbc707.0":"2020-09-15T16:06:05.788Z","0.19.0-canary.ed6b8660.0":"2020-09-15T17:25:28.985Z","0.19.0-canary.9c2331f5.0":"2020-09-15T17:49:46.949Z","0.19.0-canary.63a5f088.0":"2020-09-16T21:38:22.892Z","0.19.0-canary.b7995e49.0":"2020-09-16T23:26:56.291Z","0.19.0-canary.0da3ec97.0":"2020-09-21T22:09:16.860Z","0.19.0-canary.a0793c96.0":"2020-09-22T17:04:59.185Z","0.19.0-canary.06998a3e.0":"2020-09-22T18:26:12.937Z","0.19.0-canary.3484a90d.0":"2020-09-22T22:04:34.549Z","0.19.0-canary.3f99af40.0":"2020-09-24T23:21:54.155Z","0.19.0-canary.72aa1129.0":"2020-09-25T21:07:44.851Z","0.19.0-canary.394fd3f6.0":"2020-09-28T14:12:59.287Z","0.19.0-canary.347110f1.0":"2020-09-28T16:50:45.030Z","0.19.0-canary.5e330bb9.0":"2020-09-30T22:01:36.871Z","0.19.0-canary.30b9e3a9.0":"2020-09-30T22:38:37.528Z","0.19.0-canary.7bb04b9a.0":"2020-10-01T23:23:31.918Z","0.19.0-canary.615d861d.0":"2020-10-02T01:33:46.565Z","0.19.0-canary.af110e86.0":"2020-10-02T23:50:22.381Z","0.19.0-canary.89d27ca5.0":"2020-10-06T01:27:27.124Z","0.19.0-canary.9ef2e7c2.0":"2020-10-07T00:14:43.051Z","0.19.0-canary.96c8bdc1.0":"2020-10-07T20:08:06.809Z","0.20.0-canary.6c21f034.0":"2020-10-07T22:30:55.789Z","0.19.0":"2020-10-07T22:33:35.044Z","0.20.0-canary.1f026aaa.0":"2020-10-08T22:54:02.396Z","0.19.1":"2020-10-08T23:06:07.105Z","0.20.0-canary.5f6894b1.0":"2020-10-08T23:07:38.042Z","0.20.0-canary.f6260d06.0":"2020-10-12T22:34:39.508Z","0.20.0-canary.2d1b08aa.0":"2020-10-13T19:22:37.026Z","0.20.0-canary.5bd58844.0":"2020-10-13T23:46:40.729Z","0.20.0-canary.bc846b29.0":"2020-10-14T18:16:12.201Z","0.20.0-canary.3280b686.0":"2020-10-16T00:05:07.721Z","0.20.0-canary.9e94cd38.0":"2020-10-16T21:14:49.961Z","0.20.0-canary.4773c773.0":"2020-10-16T22:34:35.355Z","0.20.0-canary.65787913.0":"2020-10-19T18:51:24.899Z","0.20.0-canary.5485fba3.0":"2020-10-19T21:24:52.440Z","0.20.0-canary.a39d0a92.0":"2020-10-23T21:24:20.810Z","0.20.0-canary.4eafcbc1.0":"2020-10-27T01:21:23.700Z","0.20.0-canary.32961593.0":"2020-10-28T00:39:52.933Z","0.20.0-canary.8e3a0601.0":"2020-10-29T21:37:23.112Z","0.20.0-canary.178c25b4.0":"2020-10-29T21:51:03.977Z","0.20.0-canary.124beb49.0":"2020-10-31T00:06:57.162Z","0.20.0-canary.5937f468.0":"2020-11-04T21:06:32.490Z","0.20.0-canary.a9bafaee.0":"2020-11-05T22:31:15.014Z","0.20.0-canary.184861ee.0":"2020-11-07T00:38:05.382Z","0.20.0-canary.6c6ae2d6.0":"2020-11-09T13:06:16.056Z","0.20.0-canary.ea2aa477.0":"2020-11-09T23:58:36.931Z","0.20.0-canary.a2c088dc.0":"2020-11-10T14:24:28.152Z","0.20.0-canary.b04d71d4.0":"2020-11-12T10:42:22.817Z","0.20.0-canary.2c553352.0":"2020-11-12T22:43:10.150Z","0.20.0-canary.6560d19a.0":"2020-11-13T20:48:47.967Z","0.20.0-canary.a28d5ec3.0":"2020-11-17T15:24:27.521Z","0.20.0-canary.03e7e778.0":"2020-11-17T19:26:40.708Z","0.20.0-canary.ac8ed597.0":"2020-11-17T22:12:16.417Z","0.20.0-canary.b6a60f60.0":"2020-11-17T22:52:33.971Z","0.20.0-canary.71cc24fb.0":"2020-11-17T23:17:08.751Z","0.20.0-canary.761027ff.0":"2020-11-18T22:14:34.303Z","0.20.0-canary.dc93d04c.0":"2020-11-18T22:20:17.889Z","0.20.0-canary.4a5d4eeb.0":"2020-11-19T11:31:04.079Z","0.20.0-canary.bd176a15.0":"2020-11-19T19:10:50.082Z","0.20.0-canary.e85aa60d.0":"2020-11-23T22:25:11.345Z","0.20.0-canary.72092360.0":"2020-11-24T04:18:32.613Z","0.20.0-canary.baf9d39f.0":"2020-11-25T21:48:59.173Z","0.20.0-canary.51aab0ad.0":"2020-12-01T01:05:39.943Z","0.20.0-canary.8fd4af5b.0":"2020-12-03T00:27:35.249Z","0.20.0-canary.26d14d2f.0":"2020-12-03T00:56:19.193Z","0.20.0-canary.1663d7e4.0":"2020-12-03T01:16:49.569Z","0.20.0-canary.cbe9fc12.0":"2020-12-03T19:07:38.132Z","0.20.0-canary.9755be10.0":"2020-12-03T19:25:41.129Z","0.20.0-canary.3f64270c.0":"2020-12-03T21:50:14.746Z","0.21.0-canary.d893b14a.0":"2020-12-03T22:26:23.625Z","0.20.0":"2020-12-03T22:29:02.868Z","0.21.0-canary.47c7d7e5.0":"2020-12-11T19:57:16.761Z","0.21.0-canary.b304a78b.0":"2020-12-15T20:04:30.797Z","0.21.0-canary.777c5fa4.0":"2020-12-16T21:54:21.520Z","0.21.0-canary.635c7996.0":"2020-12-17T23:32:15.488Z","0.21.0-canary.20b0045f.0":"2020-12-17T23:49:18.867Z","0.21.0-canary.41f77000.0":"2020-12-18T00:35:39.897Z","0.21.0-canary.afe4079a.0":"2020-12-22T17:40:11.476Z","0.21.0-canary.407ef8f9.0":"2020-12-30T23:03:00.201Z","0.21.0-canary.2e26e137.0":"2021-01-05T18:49:56.986Z","0.21.0-canary.9009f6c1.0":"2021-01-08T19:54:44.704Z","0.21.0-canary.ee99b646.0":"2021-01-11T23:08:31.964Z","0.21.0-canary.740ed33b.0":"2021-01-12T18:04:28.456Z","0.21.0-canary.c5c541b1.0":"2021-01-12T18:45:52.280Z","0.21.0-canary.06fe9d90.0":"2021-01-12T20:55:25.428Z","0.21.0-canary.269eed01.0":"2021-01-13T21:45:35.990Z","0.21.0-canary.8c075f35.0":"2021-01-13T23:07:35.453Z","0.21.0-canary.3cda381b.0":"2021-01-14T00:04:57.891Z","0.21.0-canary.bc113605.0":"2021-01-14T00:45:59.355Z","0.21.0-canary.0c1d6ff9.0":"2021-01-15T20:09:38.674Z","0.21.0-canary.b4332e00.0":"2021-01-15T22:07:46.506Z","0.21.0-canary.2899691d.0":"2021-01-16T01:44:57.545Z","0.21.0-canary.fe73953b.0":"2021-01-19T19:21:44.033Z","0.21.0-canary.d3a16455.0":"2021-01-19T19:52:41.100Z","0.21.0-canary.597ca1b6.0":"2021-01-20T01:00:33.507Z","0.21.0-canary.3c195efe.0":"2021-01-20T02:01:49.267Z","0.21.0-canary.f7b8755f.0":"2021-01-20T20:38:03.764Z","0.21.0-canary.f60de7df.0":"2021-01-20T23:36:57.665Z","0.21.0-canary.664a2927.0":"2021-01-21T19:18:55.158Z","0.21.0-canary.a6d312e5.0":"2021-01-21T21:47:54.622Z","0.21.0-canary.027365eb.0":"2021-01-22T21:07:55.117Z","0.21.0-canary.7e72b66d.0":"2021-01-22T23:27:09.863Z","0.21.0-canary.a6d6a1e7.0":"2021-01-22T23:33:10.690Z","0.21.0-canary.b95fe100.0":"2021-01-22T23:52:14.680Z","0.21.0-canary.c8797192.0":"2021-01-23T00:07:35.248Z","0.21.0-canary.946f5563.0":"2021-01-23T00:43:52.540Z","0.21.0-canary.43664f0e.0":"2021-01-25T22:40:30.603Z","0.21.0-canary.2e769e3c.0":"2021-01-26T00:06:41.848Z","0.21.0-canary.14e01610.0":"2021-01-27T19:51:52.780Z","0.21.0-canary.5de00c1b.0":"2021-01-27T20:17:30.773Z","0.21.0-canary.5a328336.0":"2021-01-28T19:55:09.424Z","0.21.0-canary.533b1251.0":"2021-01-29T15:12:05.438Z","0.21.0-canary.ab5c0a10.0":"2021-02-02T20:17:48.375Z","0.21.0-canary.b7a40b27.0":"2021-02-03T15:04:11.808Z","0.21.0-canary.0fdee204.0":"2021-02-03T18:34:28.699Z","0.21.0-canary.5160e548.0":"2021-02-05T23:51:39.168Z","0.21.0-canary.4fa2daec.0":"2021-02-09T00:19:29.742Z","0.21.0-canary.67f285fb.0":"2021-02-09T00:51:32.398Z","0.21.0-canary.58cd5a70.0":"2021-02-11T20:45:30.613Z","0.21.0-canary.8107ca43.0":"2021-02-11T23:29:24.914Z","0.21.0-canary.d35d64ef.0":"2021-02-11T23:43:34.630Z","0.21.0-canary.78bcf058.0":"2021-02-12T00:48:48.604Z","0.21.0-canary.0c6908fd.0":"2021-02-12T01:25:15.055Z","0.21.0-canary.f1f34ee0.0":"2021-02-12T20:18:26.758Z","0.21.0-canary.d84df029.0":"2021-02-16T19:08:54.061Z","0.21.0-canary.c525f471.0":"2021-02-17T20:53:55.802Z","0.21.0-canary.ba7a1b35.0":"2021-02-19T00:14:20.816Z","0.21.0-canary.9a566dda.0":"2021-02-19T18:38:30.161Z","0.21.0-canary.55addb8c.0":"2021-02-19T22:02:44.437Z","0.21.0-canary.85dd5e9b.0":"2021-02-23T02:19:46.480Z","0.21.0-canary.aa3e078e.0":"2021-02-23T17:15:48.607Z","0.21.0-canary.dccd254e.0":"2021-02-26T21:10:56.619Z","0.21.0-canary.7dd1a27d.0":"2021-03-01T22:01:31.406Z","0.21.0-canary.12574572.0":"2021-03-02T20:29:50.325Z","0.21.0-canary.1109a3d3.0":"2021-03-02T20:35:08.653Z","0.21.0-canary.b9cd8739.0":"2021-03-03T17:48:19.583Z","0.21.0-canary.71ee796a.0":"2021-03-03T20:11:35.971Z","0.21.0-canary.2be191ed.0":"2021-03-03T21:52:02.710Z","0.21.0-canary.6dc7b06f.0":"2021-03-05T00:22:47.639Z","0.21.0-canary.24fe7ba6.0":"2021-03-05T17:27:31.140Z","0.21.0-canary.12c477d1.0":"2021-03-08T22:24:00.221Z","0.21.0-canary.4c38f801.0":"2021-03-08T23:25:01.693Z","0.21.0-canary.8795b83f.0":"2021-03-09T18:27:55.719Z","0.21.0-canary.12b84cb7.0":"2021-03-10T00:41:37.031Z","0.21.0-canary.6ac6784b.0":"2021-03-10T00:52:02.618Z","0.21.0-canary.b6d92934.0":"2021-03-10T22:01:22.268Z","0.21.0-canary.99a55b9e.0":"2021-03-10T22:52:10.225Z","0.21.0-canary.bb14efb7.0":"2021-03-10T23:37:44.085Z","0.21.0-canary.9ecf3bdd.0":"2021-03-11T00:24:05.664Z","0.21.0-canary.7c0e02fd.0":"2021-03-11T01:47:04.376Z","0.21.0-canary.2d6d59cc.0":"2021-03-11T18:29:58.243Z","0.21.0-canary.0138863c.0":"2021-03-11T18:37:21.909Z","0.21.0-canary.926f5bad.0":"2021-03-11T20:19:09.508Z","0.21.0-canary.520290a9.0":"2021-03-11T22:28:22.019Z","0.21.0-canary.9ec431d1.0":"2021-03-11T22:32:52.769Z","0.21.0-canary.4246c082.0":"2021-03-11T22:39:46.623Z","0.21.0-canary.2d736253.0":"2021-03-15T22:36:19.373Z","0.21.0-canary.7033124d.0":"2021-03-16T18:38:07.279Z","0.21.0-canary.6c0ee901.0":"2021-03-16T22:39:34.416Z","0.21.0-canary.7f0d605e.0":"2021-03-17T18:05:11.580Z","0.21.0-canary.572107b5.0":"2021-03-18T23:54:41.960Z","0.21.0-canary.b7b220b1.0":"2021-03-19T00:20:32.100Z","0.21.0-canary.233b2de7.0":"2021-03-19T18:30:33.864Z","0.21.0-canary.0c1a2d97.0":"2021-03-19T21:21:47.699Z","0.21.0-canary.57ca2e73.0":"2021-03-19T22:41:18.093Z","0.21.0-canary.5c058f4b.0":"2021-03-23T23:08:54.837Z","0.21.0-canary.e27ef7cd.0":"2021-03-30T20:11:49.035Z","0.21.0-canary.15c09e74.0":"2021-03-31T16:48:12.558Z","0.21.0-canary.4dc32be3.0":"2021-03-31T23:48:40.650Z","0.21.0-canary.4b717f65.0":"2021-04-01T18:15:05.351Z","0.21.0-canary.c6870f20.0":"2021-04-01T23:42:31.442Z","0.21.0-canary.852f873c.0":"2021-04-02T05:22:34.628Z","0.21.0-canary.4a674a1d.0":"2021-04-02T14:44:45.897Z","0.21.0-canary.c5b29ff1.0":"2021-04-05T17:50:26.803Z","0.21.0-canary.583644a6.0":"2021-04-05T17:51:32.364Z","0.21.0-canary.02ac1e6b.0":"2021-04-06T18:36:50.731Z","0.21.0-canary.5ac5856e.0":"2021-04-06T18:43:15.076Z","0.21.0-canary.bb23dbc4.0":"2021-04-07T21:24:18.707Z","0.21.0-canary.e539904c.0":"2021-04-08T18:02:22.679Z","0.21.0-canary.a93ae333.0":"2021-04-09T20:12:01.669Z","0.21.0-canary.e142c144.0":"2021-04-12T14:51:06.113Z","0.21.0-canary.382d7eb0.0":"2021-04-12T22:05:50.892Z","0.21.0-canary.b16c7885.0":"2021-04-12T22:39:31.408Z","0.21.0-canary.0e92782b.0":"2021-04-13T14:42:21.509Z","0.21.0-canary.70b3a072.0":"2021-04-14T22:26:39.129Z","0.21.0-canary.ff79b092.0":"2021-04-15T19:00:26.948Z","0.21.0-canary.f35b2fd7.0":"2021-04-15T19:10:43.711Z","0.21.0-canary.11977cac.0":"2021-04-16T00:58:23.595Z","0.21.0-canary.018ff45e.0":"2021-04-22T22:51:24.774Z","0.21.0-canary.c99d1fa5.0":"2021-04-26T19:47:00.804Z","0.21.0-canary.eea9b304.0":"2021-04-27T22:53:31.045Z","0.21.0-canary.5dd85d0c.0":"2021-04-28T00:09:50.108Z","0.21.0-canary.cc813cff.0":"2021-04-30T21:19:39.636Z","0.21.0-canary.0875e898.0":"2021-04-30T21:27:48.212Z","0.21.0":"2021-04-30T23:58:18.643Z","0.22.0-canary.8f1e7e1b.0":"2021-05-01T00:05:37.070Z","0.22.0-canary.deb0e792.0":"2021-05-03T21:34:37.682Z","0.22.0-canary.a3ff615f.0":"2021-05-03T22:34:02.825Z","0.22.0-canary.948ccfb5.0":"2021-05-04T00:10:59.766Z","0.22.0-canary.9f8337d7.0":"2021-05-04T18:37:19.821Z","0.22.0-canary.5813480a.0":"2021-05-05T18:25:49.404Z","0.22.0-canary.ab7fc1bf.0":"2021-05-06T17:59:46.368Z","0.22.0-canary.25693d60.0":"2021-05-07T21:56:22.660Z","0.22.0-canary.c497962b.0":"2021-05-07T22:20:14.150Z","0.22.0-canary.e300688e.0":"2021-05-07T22:24:44.123Z","0.22.0-canary.d70287f2.0":"2021-05-10T19:29:43.743Z","0.22.0-canary.02e841b2.0":"2021-05-10T20:34:54.297Z","0.22.0-canary.badda2f0.0":"2021-05-11T00:35:00.507Z","0.22.0-canary.004aca62.0":"2021-05-11T18:06:40.985Z","0.22.0-canary.4af17446.0":"2021-05-11T18:46:31.746Z","0.22.0-canary.b94d7187.0":"2021-05-11T18:52:00.665Z","0.22.0-canary.4021b2f9.0":"2021-05-12T22:00:57.707Z","0.22.0-canary.6a5956a3.0":"2021-05-12T22:17:46.959Z","0.22.0-canary.b6e8a74b.0":"2021-05-12T23:03:43.880Z","0.22.0-canary.c94e1030.0":"2021-05-12T23:09:37.271Z","0.22.0-canary.40a34e35.0":"2021-05-12T23:58:45.656Z","0.22.0-canary.1be14d2c.0":"2021-05-13T17:50:29.953Z","0.22.0-canary.87dbd64f.0":"2021-05-14T20:58:47.930Z","0.22.0-canary.c452e4da.0":"2021-05-17T23:32:22.988Z","0.22.0-canary.2212691a.0":"2021-05-17T23:53:03.380Z","0.22.0-canary.f748ff2f.0":"2021-05-18T00:22:57.321Z","0.22.0-canary.cc04657a.0":"2021-05-18T01:21:35.236Z","0.22.0-canary.3a3114fa.0":"2021-05-19T23:40:36.231Z","0.22.0-canary.b46bdf83.0":"2021-05-20T01:51:26.298Z","0.22.0-canary.b401a081.0":"2021-05-21T23:23:28.555Z","0.22.0-canary.012c8dc0.0":"2021-05-22T00:16:46.862Z","0.22.0-canary.e01a1731.0":"2021-05-24T16:03:12.964Z","0.22.0-canary.59174b9f.0":"2021-05-25T18:02:43.905Z","0.22.0-canary.c96cb2e0.0":"2021-05-25T19:12:45.126Z","0.22.0-canary.b9b0e330.0":"2021-05-25T21:00:46.784Z","0.22.0-canary.ea2a8063.0":"2021-05-25T21:05:55.884Z","0.22.0-canary.60cd9178.0":"2021-05-25T23:14:24.923Z","0.22.0-canary.2e2c75f2.0":"2021-05-26T00:11:45.346Z","0.22.0-canary.b99c77d5.0":"2021-05-26T19:13:57.858Z","0.22.0-canary.0de82c12.0":"2021-05-26T21:31:29.221Z","0.22.0-canary.227a4614.0":"2021-05-27T16:03:37.918Z","0.22.0-canary.b3d21d31.0":"2021-05-27T18:45:44.749Z","0.22.0-canary.288c33ec.0":"2021-06-02T19:33:28.066Z","0.22.0-canary.7eb7ccb0.0":"2021-06-03T19:55:29.154Z","0.22.0-canary.7fcc0726.0":"2021-06-08T00:45:57.082Z","0.22.0-canary.220a4e5e.0":"2021-06-08T17:50:33.801Z","0.22.0-canary.6b2d6ab0.0":"2021-06-08T18:37:00.580Z","0.22.0-canary.2b20825e.0":"2021-06-11T23:49:22.590Z","0.22.0-canary.e1511867.0":"2021-06-12T00:57:43.849Z","0.22.0-canary.ef4a0c0d.0":"2021-06-15T19:52:16.202Z","0.22.0-canary.573d8913.0":"2021-06-18T23:27:04.420Z","0.22.0-canary.21dba001.0":"2021-06-21T21:40:59.721Z","0.22.0-canary.6f5bfd0f.0":"2021-06-24T22:56:26.304Z","0.22.0-canary.fd8360b4.0":"2021-06-25T19:09:32.134Z","0.22.0-canary.6f74432f.0":"2021-06-25T20:47:22.367Z","0.22.0-canary.b62f901d.0":"2021-06-25T22:17:37.751Z","0.22.0-canary.73122cba.0":"2021-06-30T19:37:12.897Z","0.22.0-canary.a6912af5.0":"2021-07-01T21:34:23.946Z","0.22.0-canary.134f24bf.0":"2021-07-01T22:32:46.657Z","0.22.0-canary.1debb78f.0":"2021-07-07T00:46:48.298Z","0.22.0-canary.d53edeb6.0":"2021-07-07T17:00:36.468Z","0.22.0-canary.2226489a.0":"2021-07-08T18:01:54.202Z","0.22.0-canary.d4801c11.0":"2021-07-08T20:03:07.934Z","0.22.0-canary.7ec5f2d6.0":"2021-07-12T17:17:15.515Z","0.22.0-canary.86cb4ca7.0":"2021-07-13T17:38:01.734Z","0.22.0-canary.bc9a724e.0":"2021-07-13T18:42:26.334Z","0.22.0-canary.7847b83a.0":"2021-07-14T17:19:01.573Z","0.22.0-canary.8cba18fa.0":"2021-07-14T20:27:05.880Z","0.22.1":"2021-07-14T22:53:00.174Z","0.23.0-canary.fbc09b4e.0":"2021-07-14T22:54:30.119Z","0.23.0-canary.73e9f83c.0":"2021-07-15T20:39:54.497Z","0.23.0-canary.cc0aa7a9.0":"2021-07-15T21:04:09.042Z","0.23.0-canary.a8fcac45.0":"2021-07-15T21:22:59.545Z","0.23.0-canary.3ca580d1.0":"2021-07-15T22:04:24.925Z","0.23.0-canary.9e41cb2e.0":"2021-07-15T23:09:22.884Z","0.23.0-canary.c180db74.0":"2021-07-16T17:25:24.573Z","0.23.0-canary.0d0a9267.0":"2021-07-16T17:57:36.424Z","0.23.0-canary.d234ec3f.0":"2021-07-16T18:08:07.546Z","0.23.0-canary.5cd4bcdb.0":"2021-07-16T21:12:29.317Z","0.23.0-canary.2b133cb2.0":"2021-07-16T22:06:56.471Z","0.23.0-canary.ae4f422b.0":"2021-07-16T23:54:29.577Z","0.23.0-canary.90ff8057.0":"2021-07-19T14:08:11.172Z","0.23.0-canary.dd7b75d1.0":"2021-07-19T17:51:05.875Z","0.23.0-canary.104debd5.0":"2021-07-19T22:53:57.311Z","0.23.0-canary.4612705d.0":"2021-07-20T16:05:04.178Z","0.23.0-canary.b36502a2.0":"2021-07-21T22:35:00.038Z","0.23.0-canary.2c392ab3.0":"2021-07-22T14:53:18.174Z","0.23.0-canary.e8bac95a.0":"2021-07-22T18:53:15.678Z","0.23.0-canary.38f29f8f.0":"2021-07-23T18:16:25.041Z","0.23.0-canary.e0693475.0":"2021-07-23T18:56:34.570Z","0.23.0-canary.d595e030.0":"2021-07-23T20:53:36.112Z","0.23.0-canary.fe7cca31.0":"2021-07-23T21:57:08.951Z","0.23.0-canary.fd9da483.0":"2021-07-26T21:25:23.831Z","0.23.0-canary.8a4c7e06.0":"2021-07-26T22:44:30.687Z","0.23.0-canary.5b395fd1.0":"2021-07-27T22:53:32.937Z","0.23.0-canary.e5efdcc0.0":"2021-07-28T17:23:04.507Z","0.23.0-canary.ab310900.0":"2021-07-28T20:21:48.101Z","0.23.0-canary.21dc9bc5.0":"2021-07-28T20:26:36.764Z","0.23.0-canary.68c7fe5c.0":"2021-07-29T18:32:17.455Z","0.23.0-canary.aebe39e8.0":"2021-07-30T19:14:14.038Z","0.23.0-canary.ea889c69.0":"2021-08-03T18:48:12.519Z","0.23.0-canary.21918905.0":"2021-08-03T21:14:55.197Z","0.23.0-canary.193c87be.0":"2021-08-04T18:08:08.651Z","0.23.0-canary.6fc52d8b.0":"2021-08-05T18:11:20.442Z","0.23.0-canary.e2e9777d.0":"2021-08-05T22:47:56.797Z","0.23.0-canary.72ff1e68.0":"2021-08-06T20:49:19.113Z","0.23.0-canary.c527e93b.0":"2021-08-06T21:10:57.956Z","0.23.0-canary.78b1eaac.0":"2021-08-09T18:04:20.787Z","0.23.0-canary.a8a4ddc9.0":"2021-08-10T18:47:25.639Z","0.23.0-canary.99fc0632.0":"2021-08-11T22:22:05.882Z","0.23.0-canary.3f47ae57.0":"2021-08-12T18:00:29.606Z","0.23.0-canary.6b9bfc32.0":"2021-08-12T18:24:41.151Z","0.23.0-canary.c89ecc63.0":"2021-08-16T17:17:26.775Z","0.23.0-canary.59de86bd.0":"2021-08-18T01:38:54.950Z","0.23.0-canary.dcda879b.0":"2021-08-18T22:23:46.185Z","0.23.0-canary.dbb8b366.0":"2021-08-19T23:00:48.669Z","0.23.0-canary.c6e3060c.0":"2021-08-19T23:02:40.937Z","0.23.0-canary.03120b7d.0":"2021-08-20T00:27:50.050Z","0.23.0-canary.d75a5f74.0":"2021-08-20T07:56:56.488Z","0.23.0-canary.3d79ffe7.0":"2021-08-20T17:21:57.700Z","0.23.0-canary.02213ebe.0":"2021-08-20T17:26:42.723Z","0.23.0-canary.90a999b9.0":"2021-08-20T18:43:07.024Z","0.23.0-canary.6db58716.0":"2021-08-23T09:08:34.236Z","0.23.0-canary.9fb5bc35.0":"2021-08-23T22:50:53.532Z","0.23.0-canary.ddaa5d8e.0":"2021-08-24T18:50:19.773Z","0.23.0-canary.756208fb.0":"2021-08-25T19:51:13.444Z","0.23.0-canary.9576dcd9.0":"2021-08-25T21:44:26.862Z","0.23.0-canary.7531cf97.0":"2021-08-26T17:26:43.012Z","0.23.0-canary.3bab26b4.0":"2021-08-26T21:45:21.521Z","0.23.0-canary.fab48bee.0":"2021-08-26T22:08:12.107Z","0.23.0-canary.dec18df7.0":"2021-08-30T08:29:31.310Z","0.23.0-canary.61fe5b17.0":"2021-08-30T19:29:15.564Z","0.23.0-canary.a8c31f54.0":"2021-08-30T20:32:03.672Z","0.23.0-canary.a096dba8.0":"2021-08-31T22:19:27.978Z","0.23.0-canary.7ec04d47.0":"2021-09-02T23:25:58.077Z","0.23.0-canary.d00b098d.0":"2021-09-03T21:27:10.719Z","0.23.0-canary.f29b3352.0":"2021-09-07T18:16:40.753Z","0.23.0-canary.4962a163.0":"2021-09-07T23:53:52.584Z","0.23.0-canary.33102bf4.0":"2021-09-08T00:14:03.700Z","0.23.0-canary.76c68381.0":"2021-09-08T20:14:16.241Z","0.23.0-canary.17d51f76.0":"2021-09-08T23:26:49.523Z","0.23.0-canary.3fae6c2d.0":"2021-09-10T18:33:27.003Z","0.23.0-canary.f1958c4b.0":"2021-09-13T19:21:09.803Z","0.23.0-canary.78abbd59.0":"2021-09-13T21:26:50.353Z","0.23.0":"2021-09-13T21:35:54.631Z","0.24.0-canary.9830d665.0":"2021-09-13T21:37:33.531Z","0.24.0-canary.20e2081c.0":"2021-09-13T23:32:39.162Z","0.24.0-canary.583613a9.0":"2021-09-14T16:55:45.454Z","0.24.0-canary.0e1bd56f.0":"2021-09-14T17:32:48.037Z","0.24.0-canary.7bb1818e.0":"2021-09-15T00:36:22.092Z","0.24.0-canary.b5e665a9.0":"2021-09-15T18:13:41.342Z","0.24.0-canary.ab1e177c.0":"2021-09-15T18:45:21.494Z","0.24.0-canary.8dff8894.0":"2021-09-15T19:09:03.598Z","0.24.0-canary.9cd7e927.0":"2021-09-15T20:32:44.700Z","0.24.0-canary.a7132082.0":"2021-09-15T21:46:11.277Z","0.24.0-canary.cd9110cd.0":"2021-09-16T17:46:04.493Z","0.24.0-canary.1e5a9883.0":"2021-09-17T20:39:24.768Z","0.24.0-canary.32c830ee.0":"2021-09-17T23:09:03.998Z","0.24.0-canary.1de87bb7.0":"2021-09-18T18:52:26.863Z","0.24.0-canary.f2ea80c4.0":"2021-09-20T17:55:12.570Z","0.24.0-canary.569d739f.0":"2021-09-20T21:24:12.138Z","0.24.0-canary.5a434a50.0":"2021-09-21T02:01:07.333Z","0.26.0-canary.b1c1ab52.0":"2021-09-21T03:12:28.215Z","0.25.1":"2021-09-21T03:12:48.365Z","0.26.0-canary.ae060177.0":"2021-09-21T14:38:26.431Z","0.26.0-canary.b6fe2a12.0":"2021-09-22T20:16:35.804Z","0.26.0-canary.07e91417.0":"2021-09-22T21:06:06.327Z","0.26.0-canary.e2203ffa.0":"2021-09-23T18:27:56.110Z","0.26.0-canary.4abe237e.0":"2021-09-24T17:31:26.816Z","0.26.0-canary.6278ee5d.0":"2021-09-27T18:31:40.212Z","0.26.0-canary.3a5d5f34.0":"2021-09-27T22:41:48.766Z","0.26.0-canary.143ed3c8.0":"2021-09-29T01:51:08.598Z","0.26.0-canary.e5923d68.0":"2021-09-30T00:06:08.710Z","0.26.0-canary.d8ed5109.0":"2021-09-30T23:34:11.368Z","0.26.0-canary.0efb9c2c.0":"2021-10-02T02:08:33.564Z","0.26.0-canary.1c9adcb3.0":"2021-10-04T17:33:52.192Z","0.26.0-canary.dfc00d60.0":"2021-10-09T00:57:36.944Z","0.26.0-canary.c3aa844c.0":"2021-10-11T23:14:38.606Z","0.25.2":"2021-10-11T23:18:38.642Z","0.26.0-canary.406d6fe1.0":"2021-10-13T20:59:45.852Z","0.26.0-canary.ca0a674f.0":"2021-10-18T21:37:14.042Z","0.26.0-canary.eefcf660.0":"2021-10-20T21:23:54.049Z","0.26.0-canary.d21acc8f.0":"2021-10-20T22:32:47.771Z","0.25.3":"2021-10-21T17:55:52.339Z","0.26.0-canary.60449b7b.0":"2021-10-21T18:17:49.533Z","0.26.0-canary.0d8084ed.0":"2021-10-28T17:45:13.181Z","0.26.0-canary.232327ee.0":"2021-11-01T20:16:06.704Z","0.26.0-canary.0a492ae8.0":"2021-11-02T10:00:42.423Z","0.26.0-canary.0aa18745.0":"2021-11-02T18:08:10.461Z","0.26.0-canary.f3e28323.0":"2021-11-02T18:59:52.488Z","0.26.0-canary.27e05c5d.0":"2021-11-03T18:45:18.125Z","0.26.0-canary.b9e44af7.0":"2021-11-03T19:04:20.043Z","0.26.0-canary.448f6cb9.0":"2021-11-04T18:08:12.657Z","0.26.0-canary.8067ce28.0":"2021-11-04T22:22:45.280Z","0.26.0-canary.345c2bb9.0":"2021-12-02T17:10:38.554Z","0.26.0-canary.0547aeeb.0":"2021-12-06T16:36:37.298Z","0.26.0-canary.3b2452cc.0":"2021-12-09T00:06:07.619Z","0.26.0-canary.cf7ba5a9.0":"2021-12-10T19:07:25.979Z","0.26.0-canary.e1bcf14e.0":"2021-12-28T20:46:03.258Z","0.26.0-canary.b9d35b69.0":"2022-01-05T18:27:38.407Z","0.26.0-canary.2afff08e.0":"2022-01-06T22:23:18.946Z","0.26.0-canary.893fc857.0":"2022-01-07T18:54:19.348Z","0.26.0-canary.69ba13b7.0":"2022-01-19T22:24:18.187Z","0.26.0-canary.0af8ade5.0":"2022-02-07T22:05:36.901Z","0.26.0":"2022-05-03T17:30:40.008Z","0.26.1":"2022-05-09T20:31:57.462Z","0.27.0":"2022-08-12T19:12:14.149Z"},"maintainers":[{"email":"abhiomkar@gmail.com","name":"abhiomkar"},{"email":"aomarks@gmail.com","name":"aomarks"},{"email":"andrey.prigogin@gmail.com","name":"aprigogin"},{"email":"asyncliz@gmail.com","name":"asyncliz"},{"email":"dfreedm2@gmail.com","name":"azakus"},{"email":"bicknellr@gmail.com","name":"bicknellr"},{"email":"wangchan518@gmail.com","name":"candysonya"},{"email":"emarquez@google.com","name":"emarquez"},{"email":"esgonzalez@google.com","name":"esgonzalez"},{"email":"aprigogin+npm@google.com","name":"material-admin"},{"email":"prodee@google.com","name":"patrickrodee"},{"email":"sayrisuarez@google.com","name":"ssuarez"},{"email":"brian.t.vann@gmail.com","name":"taylorv"},{"email":"hi@yef.im","name":"yefim"}],"description":"Material Design textarea web component","license":"Apache-2.0","readme":"# `<mwc-textarea>` [![Published on npm](https://img.shields.io/npm/v/@material/mwc-textarea.svg)](https://www.npmjs.com/package/@material/mwc-textarea)\n> IMPORTANT: The Material Web Components are a work in progress and subject to\n> major changes until 1.0 release.\n\nText areas let users enter and edit text.\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6347c3e1b0264cc34cad24e4e52a23e2100a4926/packages/textarea/images/standard.png\" width=\"256px\">\n\n[Material Design Guidelines: text areas](https://material.io/design/components/text-fields.html)\n\n[Demo](https://material-components.github.io/material-web/demos/textarea/)\n\n## Installation\n\n```sh\nnpm install @material/mwc-textarea\n```\n\n> NOTE: The Material Web Components are distributed as ES2017 JavaScript\n> Modules, and use the Custom Elements API. They are compatible with all modern\n> browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional\n> tooling step is required to resolve *bare module specifiers*, as well as\n> transpilation and polyfills for IE11. See\n> [here](https://github.com/material-components/material-components-web-components#quick-start)\n> for detailed instructions.\n\n## Example usage\n\n### Standard\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6347c3e1b0264cc34cad24e4e52a23e2100a4926/packages/textarea/images/standard.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\"></mwc-textarea>\n\n<script type=\"module\">\n  import '@material/mwc-textarea/mwc-textarea.js';\n</script>\n```\n\n### Helper Text\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6347c3e1b0264cc34cad24e4e52a23e2100a4926/packages/textarea/images/helper.png\" width=\"256px\">\n\n```html\n<mwc-textarea label=\"My Textarea\" helper=\"Helper Text\"></mwc-textarea>\n```\n\n### Primary Color\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6347c3e1b0264cc34cad24e4e52a23e2100a4926/packages/textarea/images/color-primary.png\" width=\"256px\">\n\n```html\n<style>\n  mwc-textarea {\n    --mdc-theme-primary: green;\n  }\n</style>\n\n<mwc-textarea\n    label=\"My Textarea\"\n    required>\n</mwc-textarea>\n```\n\n## Variants\n\n\n### Outlined\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6347c3e1b0264cc34cad24e4e52a23e2100a4926/packages/textarea/images/outlined.png\" width=\"256px\">\n\n```html\n<mwc-textarea\n    outlined\n    label=\"My Textarea\">\n</mwc-textarea>\n```\n\n#### Shaped\n\n<img src=\"https://raw.githubusercontent.com/material-components/material-components-web-components/6347c3e1b0264cc34cad24e4e52a23e2100a4926/packages/textarea/images/shape.png\" width=\"212px\">\n\n```html\n<style>\n  mwc-textarea.rounded {\n    --mdc-shape-small: 28px;\n  }\n</style>\n\n<mwc-textarea\n    class=\"rounded\"\n    label=\"My Textarea\"\n    outlined>\n</mwc-textarea>\n```\n\n## API\n\n### Properties/Attributes\n\n| Name                | Type             | Description\n| ------------------- | ---------------- |------------\n| `rows`              | `number`         | Sets number of visible text lines.\n| `cols`              | `number`         | Sets the visible width of the textarea.\n| `value`             | `string`         | The input control's value.\n| `type`              | `TextFieldType*` | A string specifying the type of control to render.\n| `label`             | `string`         | Sets floating label value.\n| `placeholder`       | `string`         | Sets disappearing input placeholder.\n| `icon`              | `string`         | Leading icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `iconTrailing`      | `string`         | Trailing icon to display in input. See [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon).\n| `disabled`          | `boolean`        | Whether or not the input should be disabled.\n| `charCounter`       | `boolean`\\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `\"external\"` or `\"internal\"` `charCounter`. When `true`, textareas display an external character counter by default.\n| `outlined`          | `boolean`        | Whether or not to show the material outlined variant.\n| `helper`            | `string`         | Helper text to display below the input. Display default only when focused.\n| `helperPersistent`  | `boolean`        | Always show the helper text despite focus.\n| `required`          | `boolean`        | Displays error state if value is empty and input is blurred.\n| `maxLength`         | `number`         | Maximum length input to accept.\n| `validationMessage` | `string`         | Message to show in the error color when the textarea is invalid. (Helper text will not be visible)\n| `validity`          | `ValidityState` (readonly) | The [`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState) of the textfield.\n| `willValidate`      | `boolean` (readonly)       | [`HTMLInputElement.prototype.willValidate`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties)\n| `validityTransform` | `ValidityTransform***`\\|`null` | Callback called before each validation check. See the [validation section](#Validation) for more details.\n| `validateOnInitialRender` | `boolean`            | Runs validation check on initial render.\n`name`                | `string`         | Sets the `name` attribute on the internal textarea.\\*\\*\\*\n\n\\*  `TextFieldType` is exported by `mwc-textarea` and `mwc-textarea-base`.\n```ts\ntype TextFieldType = 'text'|'search'|'tel'|'url'|'email'|'password'|\n    'date'|'month'|'week'|'time'|'datetime-local'|'number'|'color';\n```\n\\*\\*  `TextAreaCharCounter` is exported by `mwc-textarea`.\n```ts\ntype TextAreaCharCounter = 'external'|'internal';\n\n\\*\\*\\* `ValidityTransform` is not exported. See the [validation section](#Validation) for more details.\n```ts\ntype ValidityTransform = (value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\n\\*\\*\\* The `name` property should only be used for browser autofill as webcomponent form participation does not currently consider the `name` attribute. See [#289](https://github.com/material-components/material-components-web-components/issues/289).\n\n### Methods\n\n| Name     | Description\n| -------- | -------------\n| `checkValidity() => boolean`   | Returns `true` if the textarea passes validity checks. Returns `false` and fires an [`invalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) event on the textarea otherwise.\n| `reportValidity() => boolean`   | Runs `checkValidity()` method, and if it returns false, then it reports to the user that the input is invalid.\n| `setCustomValidity(message:string) => void`   | Sets a custom validity message (also overwrites `validationMessage`). If this message is not the empty string, then the element is suffering from a  custom validity error and does not validate.\n| `layout() => Promise<void>`   | Re-calculate layout. If a textarea is styled with `display:none` before it is first rendered, and it has a label that is floating, then you must call `layout()` the first time you remove `display:none`, or else the notch surrounding the label will not render correctly.\n\n### CSS Custom Properties\n\nInherits CSS Custom properties from:\n\n* [`mwc-ripple`](https://github.com/material-components/material-web/tree/master/packages/ripple)\n* [`mwc-notched-outline`](https://github.com/material-components/material-web/tree/master/packages/notched-outline).\n* [`mwc-icon`](https://github.com/material-components/material-web/tree/master/packages/icon)\n\n| Name                                              | Default               | Description\n| ------------------------------------------------- | --------------------- |------------\n| `--mdc-text-area-filled-border-radius`           | `4px 4px 0 0`          | Border radius of the standard / filled textarea's background filling.\n| `--mdc-text-area-outlined-idle-border-color`     | `rgba(0, 0, 0, 0.38)`  | Color of the outlined textarea's  outline when idle.\n| `--mdc-text-area-outlined-hover-border-color`    | `rgba(0, 0, 0, 0.87)`  | Color of the outlined textarea's outline when hovering.\n| `--mdc-text-area-outlined-disabled-border-color` | `rgba(0, 0, 0, 0.06)`  | Color of the outlined textarea's outline when disabled.\n\n#### Global Custom Properties\n\nThis component exposes the following global [theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)\ncustom properties.\n\n| Name                  | Description\n| ---------------------  | -----------\n| `--mdc-theme-primary`  | Color when active of the underline ripple, the outline, and the caret.\n| `--mdc-theme-error`    | Color when errored of the underline, the outline, the caret, and the icons.\n| `--mdc-typography-subtitle1-<PROPERTY>` | Styles the typography of the texarea, excluding line-height.\n\n\n### Validation\n\n`<mwc-textarea>` follows the basic `<input>` [constraint validation model](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation).\nIt exposes:\n\n* `required`\n* `maxLength`\n* `validity`\n* `willValidate`\n* `checkValidity()`\n* `reportValidity()`\n* `setCustomValidity(message)`\n\nAdditionally, it implements more features such as:\n* `validationMessage`\n* `validateOnInitialRender`\n* and `validityTransform`\n\nBy default, `<mwc-textarea>` will report validation on `blur`.\n\n#### Custom validation logic\n\nThe `validityTransform` property is a function that can be set on `<mwc-textarea>` to\nimplement custom validation logic that transforms the `ValidityState` of the\ninput control. The type of a `ValidityTransform` is the following:\n\n```ts\n(value: string, nativeValidity: ValidityState) => Partial<ValidityState>\n```\n\nWhere `value` is the new value in the textarea to be validated and\n`nativeValidity` is an interface of\n[`ValidityState`](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)\nof the native input control. For example:\n\n```html\n<mwc-textarea\n    id=\"my-textarea\"\n    maxlength=\"5\"\n    value=\"doggos\">\n</mwc-textarea>\n<script>\n  const textarea = document.querySelector('#my-textarea');\n  textarea.validityTransform = (newValue, nativeValidity) => {\n    if (!nativeValidity.valid) {\n      if (nativeValidity.tooLong) {\n        const hasDog = newValue.includes('dog');\n        // changes to make to the nativeValidity\n        return {\n          valid: hasDog,\n          tooLong: !hasDog;\n        };\n      } else {\n        // no changes\n        return {};\n      }\n    } else {\n      const isValid = someExpensiveOperation(newValue);\n      // changes to make to the native validity\n      return {\n        valid: isValid,\n        // or whatever type of ValidityState prop you would like to set (if any)\n        customError: !isValid,\n      };\n    }\n  }\n</script>\n```\n\nIn this example we first check the native validity which is invalid due to the\nmaxlength (the value is `doggos` which is a string longer than 5). The value\nincludes `dog`, thus we make it valid and undo the `tooLong` error in the\n`ValidityState` by returning a `Partial<ValidityState>` that indicates what to\nchange in the initial validity.\n\nIn this example, we also skip an expensive validity check by short-circuiting\nthe validation by checking the native validation.\n\n*Note:* the UI will only update as valid / invalid by checking the `valid`\nproperty of the transformed `ValidityState`.\n\n## Additional references\n\n- [MDC Web textfields](https://material.io/develop/web/components/input-controls/text-field/)\n","readmeFilename":"README.md","homepage":"https://github.com/material-components/material-components-web-components#readme","keywords":["material design","web components","textarea"],"repository":{"type":"git","url":"git+https://github.com/material-components/material-components-web-components.git","directory":"packages/textarea"},"bugs":{"url":"https://github.com/material-components/material-components-web-components/issues"}}